Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3548643imu; Fri, 18 Jan 2019 12:20:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN58Qa76jlXPSLp+oJPaRKHbtB5FihvEjvEHwzNzxmt3OFgbUXJN5TXN1D0WLwnszyrg2Wn4 X-Received: by 2002:a62:8893:: with SMTP id l141mr20559475pfd.1.1547842833282; Fri, 18 Jan 2019 12:20:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547842833; cv=none; d=google.com; s=arc-20160816; b=qqNQ9mGrg9W9+aTxaBMGdfL+OkF16DSJNgud+9BdYMgnj/TDV48Ei4+sl0kY3P4SWS D7v8RjiQtBH5kG4zTpTFzxeomjExlU2Fygxv1HlYxe5HJTZ76wSv5+fNSjVfaHo3pdQr 8n1iman6O75B0KRV6k5CDaF76+A9qPiMhAITOsiqVahvDZKET15/RUyGfZZdx/tre9W2 ajk56Ju9KHFeQ3FoZLViSY5HS7TCEMoh0sZ89aA3jVQWPU4zW2tsGbZhUaOidDDwRd3q yEX/rLBAT3n3sTYLPhMsFroOCulbClyYTg+W8gIbl0HhXq85qYwgB1i2wkZplameCf6s RWAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature; bh=XkF7gVDF25Qld0fbNrCYfXYzpd5m2RmH8NMredly944=; b=Y0V6earu9xCa+0vXYMS3YFtUqWNq+t2FwAUideCHx+1PpIz3kwjY4+M9pNkZOc/9I4 p14JolOi3KMRioYVThsF2tcGoRFvt45JfVxKsMwVtXEuQptvo5l0CLfKecXlSfPqm2G4 rB8lH2XMpu4VepbfjBnwGfX2fK8t6OvD00t+CsX/l3gTStJaUO1wKqj7+GiP5XinFmVr WOCSwKdxsgcEcBukLfw78FAVWPI6V3QuAT3sLT8Fw4oLptjDMp0VpMoAleKcQfAe1WZr LNCU01V5I0BXO5e92SmIzN8+S9c8D9mcC8KAn5qYiA8Wmn0U6l+0/9GX15Kpt1KKbPvA dSig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BIaY2WQy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1si5515150pfj.276.2019.01.18.12.20.14; Fri, 18 Jan 2019 12:20:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BIaY2WQy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729415AbfARUS4 (ORCPT + 99 others); Fri, 18 Jan 2019 15:18:56 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:54055 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729340AbfARUS4 (ORCPT ); Fri, 18 Jan 2019 15:18:56 -0500 Received: by mail-it1-f196.google.com with SMTP id g85so8536203ita.3 for ; Fri, 18 Jan 2019 12:18:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=XkF7gVDF25Qld0fbNrCYfXYzpd5m2RmH8NMredly944=; b=BIaY2WQyyzl6f/Sx1X7ve1if9C5b5B9cZSeaMeyuGPyvlCd37FXrZJquf2uDifcF3f JqxnNnkxMa0sENUGoVXQGxCrio+Hhsu8+zZxCTeLfVs7e1OnlbPJ/jviQb8l5+fJgpqg DucnfRHLZ+nnX3PPiQ0C1GFP7k+maWZ/PNi2sp1DhAhHumLD+Fj/xaVUwhoosQbJLO2V EcmiLJ+Gwn2XPckZzF4UQGPP8P3h3+flxnT2t35PS3waVQ8Cx1rA/+1/vVy1A4mfHHFm YYnbreFoq8xhm+XGUc8GtGtJCSOWPxlQw1Rn0wiPozm3YektYGkEirTM30+RAnHHW4aO 0aFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=XkF7gVDF25Qld0fbNrCYfXYzpd5m2RmH8NMredly944=; b=g3FBa9B0vBi2fIOS0F+mM+0jINnscfeKffqw6tGfflwTn2fPJeyoHLlhpsxLuvmI2w La+nxDMra8OHsjCwVrFUQ/fz/JUww/+AcDEM6ks+GeXUyqQ/+YGin1mC0x+OpU9lOTq9 kgeBHNetonoRXP6Rg54SmuzhSkDrM7x3BcbdUq7WHLApRn9VuR/EnHsx0YLvlOMdP6a6 uIf2tAaMWXTaiw7Ci9W43P4/PDEkWvN5ZEtaTNC1pslIfUXb27zaLgBPsHmi8pqWfaiz CuIAhIk43PwxUumTZDsNLXGeppGfsErGcYBzYBKzqoDFsfose/LOpplmQbVxSw5suu3b Rxfg== X-Gm-Message-State: AJcUuke7yqOT07+0hrpBdSRFHThDQmnlM5DLLZYOtbZ6wDPHOLpqU2GF LIW/QN4kXQQ7llTL6nIOiMK0idjIqjGuLZWVNpI= X-Received: by 2002:a24:eb0f:: with SMTP id h15mr12150833itj.138.1547842733827; Fri, 18 Jan 2019 12:18:53 -0800 (PST) MIME-Version: 1.0 From: Kyungtae Kim Date: Fri, 18 Jan 2019 15:18:42 -0500 Message-ID: Subject: INFO: task hung in drop_inmem_page To: jaegeuk@kernel.org, yuchao0@huawei.com Cc: Byoungyoung Lee , DaeRyong Jeong , linux-kernel@vger.kernel.org, syzkaller@googlegroups.com, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I'm reporting a bug in linux-4.17.19: "INFO: task hung in drop_inmem_page" (no reproducer) I think this might be somehow related to the following: https://groups.google.com/forum/#!searchin/syzkaller-bugs/INFO$3A$20task$20hung$20in$20%7Csort:date/syzkaller-bugs/c6soBTrdaIo/AjAzPeIzCgAJ ========================================= INFO: task syz-executor7:10822 blocked for more than 120 seconds. Not tainted 4.17.19 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor7 D27024 10822 6346 0x00000004 Call Trace: context_switch kernel/sched/core.c:2867 [inline] __schedule+0x721/0x1e60 kernel/sched/core.c:3515 schedule+0x88/0x1c0 kernel/sched/core.c:3559 schedule_preempt_disabled+0x18/0x30 kernel/sched/core.c:3617 __mutex_lock_common kernel/locking/mutex.c:833 [inline] __mutex_lock+0x5bd/0x1410 kernel/locking/mutex.c:893 mutex_lock_nested+0x1b/0x20 kernel/locking/mutex.c:908 drop_inmem_page+0xcb/0x810 fs/f2fs/segment.c:327 f2fs_invalidate_page+0x337/0x5e0 fs/f2fs/data.c:2401 do_invalidatepage mm/truncate.c:165 [inline] truncate_cleanup_page+0x261/0x330 mm/truncate.c:187 truncate_inode_pages_range+0x552/0x1610 mm/truncate.c:367 truncate_inode_pages mm/truncate.c:478 [inline] truncate_pagecache+0x6d/0x90 mm/truncate.c:801 truncate_setsize+0x81/0xa0 mm/truncate.c:826 f2fs_setattr+0x44f/0x1270 fs/f2fs/file.c:781 notify_change+0xa62/0xe80 fs/attr.c:313 do_truncate+0x12e/0x1e0 fs/open.c:63 do_last fs/namei.c:2955 [inline] path_openat+0x2042/0x29f0 fs/namei.c:3505 do_filp_open+0x1bd/0x2c0 fs/namei.c:3540 do_sys_open+0x35e/0x4e0 fs/open.c:1101 __do_sys_open fs/open.c:1119 [inline] __se_sys_open fs/open.c:1114 [inline] __x64_sys_open+0x89/0xc0 fs/open.c:1114 do_syscall_64+0xc4/0x4e0 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4497b9 RSP: 002b:00007f734e459c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f734e45a6cc RCX: 00000000004497b9 RDX: 0000000000000104 RSI: 00000000000a8280 RDI: 0000000020000080 RBP: 000000000071bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000007230 R14: 00000000006f02d0 R15: 00007f734e45a700 INFO: task syz-executor7:10858 blocked for more than 120 seconds. Not tainted 4.17.19 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor7 D28880 10858 6346 0x00000004 Call Trace: context_switch kernel/sched/core.c:2867 [inline] __schedule+0x721/0x1e60 kernel/sched/core.c:3515 schedule+0x88/0x1c0 kernel/sched/core.c:3559 __rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:565 [inline] rwsem_down_write_failed+0x5e6/0xc90 kernel/locking/rwsem-xadd.c:594 call_rwsem_down_write_failed+0x17/0x30 arch/x86/lib/rwsem.S:117 __down_write arch/x86/include/asm/rwsem.h:142 [inline] down_write+0x58/0xa0 kernel/locking/rwsem.c:72 inode_lock include/linux/fs.h:713 [inline] do_truncate+0x120/0x1e0 fs/open.c:61 do_last fs/namei.c:2955 [inline] path_openat+0x2042/0x29f0 fs/namei.c:3505 do_filp_open+0x1bd/0x2c0 fs/namei.c:3540 do_sys_open+0x35e/0x4e0 fs/open.c:1101 __do_sys_open fs/open.c:1119 [inline] __se_sys_open fs/open.c:1114 [inline] __x64_sys_open+0x89/0xc0 fs/open.c:1114 do_syscall_64+0xc4/0x4e0 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4497b9 RSP: 002b:00007f734e3b4c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f734e3b56cc RCX: 00000000004497b9 RDX: 0000000000000104 RSI: 00000000000a8280 RDI: 0000000020000080 RBP: 000000000071c238 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000007230 R14: 00000000006f02d0 R15: 00007f734e3b5700 INFO: task syz-executor5:10829 blocked for more than 120 seconds. Not tainted 4.17.19 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor5 D28760 10829 6308 0x80000002 Call Trace: context_switch kernel/sched/core.c:2867 [inline] __schedule+0x721/0x1e60 kernel/sched/core.c:3515 schedule+0x88/0x1c0 kernel/sched/core.c:3559 io_schedule+0x21/0x80 kernel/sched/core.c:5179 wait_on_page_bit_common mm/filemap.c:1100 [inline] __lock_page+0x2b5/0x390 mm/filemap.c:1273 lock_page include/linux/pagemap.h:483 [inline] __revoke_inmem_pages+0xb35/0x11c0 fs/f2fs/segment.c:231 drop_inmem_pages+0xa3/0x3e0 fs/f2fs/segment.c:306 f2fs_release_file+0x2c7/0x330 fs/f2fs/file.c:1556 __fput+0x2c7/0x780 fs/file_table.c:209 ____fput+0x1a/0x20 fs/file_table.c:243 task_work_run+0x151/0x1d0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x8ba/0x30a0 kernel/exit.c:865 do_group_exit+0x13b/0x3a0 kernel/exit.c:968 get_signal+0x6bb/0x1650 kernel/signal.c:2482 do_signal+0x84/0x1b70 arch/x86/kernel/signal.c:810 exit_to_usermode_loop+0x155/0x190 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_64+0x445/0x4e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4497b9 RSP: 002b:00007f1c68e74ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000071bf80 RCX: 00000000004497b9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000071bf80 RBP: 000000000071bf80 R08: 0000000000000000 R09: 000000000071bf58 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c68e759c0 R15: 00007f1c68e75700 Showing all locks held in the system: 1 lock held by khungtaskd/1715: #0: 00000000aeb8cd00 (tasklist_lock){.+.+}, at: debug_show_all_locks+0x7c/0x2b0 kernel/locking/lockdep.c:4470 2 locks held by getty/6180: #0: 000000009ffda690 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 00000000405232cd (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x20a/0x1860 drivers/tty/n_tty.c:2140 2 locks held by getty/6181: #0: 0000000084ba3035 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 0000000071a219d9 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x20a/0x1860 drivers/tty/n_tty.c:2140 2 locks held by getty/6182: #0: 00000000477179e0 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 00000000be4fe263 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x20a/0x1860 drivers/tty/n_tty.c:2140 2 locks held by getty/6183: #0: 00000000b3d05924 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 0000000020e3b19b (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x20a/0x1860 drivers/tty/n_tty.c:2140 2 locks held by getty/6184: #0: 0000000049b0e21f (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 000000003929ab1b (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x20a/0x1860 drivers/tty/n_tty.c:2140 2 locks held by getty/6185: #0: 00000000c90895c5 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 00000000896e1fe7 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x20a/0x1860 drivers/tty/n_tty.c:2140 2 locks held by getty/6186: #0: 00000000eb674307 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 00000000fa43aebb (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x20a/0x1860 drivers/tty/n_tty.c:2140 4 locks held by syz-executor7/10822: #0: 000000006dfdd6d5 (sb_writers#8){.+.+}, at: sb_start_write include/linux/fs.h:1550 [inline] #0: 000000006dfdd6d5 (sb_writers#8){.+.+}, at: mnt_want_write+0x46/0xc0 fs/namespace.c:386 #1: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: inode_lock include/linux/fs.h:713 [inline] #1: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: do_truncate+0x120/0x1e0 fs/open.c:61 #2: 000000001b235d12 (&fi->i_mmap_sem){+.+.}, at: f2fs_setattr+0x421/0x1270 fs/f2fs/file.c:780 #3: 000000004a9caf7f (&fi->inmem_lock){+.+.}, at: drop_inmem_page+0xcb/0x810 fs/f2fs/segment.c:327 2 locks held by syz-executor7/10858: #0: 000000006dfdd6d5 (sb_writers#8){.+.+}, at: sb_start_write include/linux/fs.h:1550 [inline] #0: 000000006dfdd6d5 (sb_writers#8){.+.+}, at: mnt_want_write+0x46/0xc0 fs/namespace.c:386 #1: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: inode_lock include/linux/fs.h:713 [inline] #1: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: do_truncate+0x120/0x1e0 fs/open.c:61 1 lock held by syz-executor5/10829: #0: 000000004a9caf7f (&fi->inmem_lock){+.+.}, at: drop_inmem_pages+0x86/0x3e0 fs/f2fs/segment.c:305 2 locks held by syz-executor5/10893: #0: 000000006dfdd6d5 (sb_writers#8){.+.+}, at: sb_start_write include/linux/fs.h:1550 [inline] #0: 000000006dfdd6d5 (sb_writers#8){.+.+}, at: mnt_want_write_file+0x12a/0x340 fs/namespace.c:497 #1: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: inode_lock include/linux/fs.h:713 [inline] #1: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: f2fs_ioc_start_atomic_write fs/f2fs/file.c:1671 [inline] #1: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: f2fs_ioctl+0x101b/0x6c50 fs/f2fs/file.c:2853 3 locks held by syz-executor5/10894: #0: 000000001e9f4016 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xd6/0x100 fs/file.c:766 #1: 000000006dfdd6d5 (sb_writers#8){.+.+}, at: file_start_write include/linux/fs.h:2719 [inline] #1: 000000006dfdd6d5 (sb_writers#8){.+.+}, at: vfs_write+0x469/0x570 fs/read_write.c:548 #2: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: inode_lock include/linux/fs.h:713 [inline] #2: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: f2fs_file_write_iter+0x27a/0xcd0 fs/f2fs/file.c:2917 1 lock held by syz-executor5/10895: #0: 000000001e9f4016 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xd6/0x100 fs/file.c:766 2 locks held by syz-executor5/10896: #0: 000000006dfdd6d5 (sb_writers#8){.+.+}, at: sb_start_write include/linux/fs.h:1550 [inline] #0: 000000006dfdd6d5 (sb_writers#8){.+.+}, at: mnt_want_write_file+0x12a/0x340 fs/namespace.c:497 #1: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: inode_lock include/linux/fs.h:713 [inline] #1: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: f2fs_ioc_start_atomic_write fs/f2fs/file.c:1671 [inline] #1: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: f2fs_ioctl+0x101b/0x6c50 fs/f2fs/file.c:2853 3 locks held by syz-executor5/10897: #0: 00000000b6b59b71 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xd6/0x100 fs/file.c:766 #1: 000000006dfdd6d5 (sb_writers#8){.+.+}, at: file_start_write include/linux/fs.h:2719 [inline] #1: 000000006dfdd6d5 (sb_writers#8){.+.+}, at: vfs_write+0x469/0x570 fs/read_write.c:548 #2: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: inode_lock include/linux/fs.h:713 [inline] #2: 00000000dc29e189 (&sb->s_type->i_mutex_key#16){+.+.}, at: f2fs_file_write_iter+0x27a/0xcd0 fs/f2fs/file.c:2917 1 lock held by syz-executor5/10898: #0: 00000000b6b59b71 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xd6/0x100 fs/file.c:766 ========================================= Thanks, Kyungtae Kim