syzbot


possible deadlock in pipe_lock (2)

Status: upstream: reported C repro on 2019/12/26 07:17
Reported-by: syzbot+53f68fd7f9d60fc0f4b3@syzkaller.appspotmail.com
First crash: 1805d, last: 639d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in pipe_lock fs 50806 2543d 2591d 0/28 closed as invalid on 2018/02/14 14:20
upstream possible deadlock in pipe_lock (6) overlayfs 5 5d01h 26d 0/28 upstream: reported on 2024/11/08 04:47
upstream possible deadlock in pipe_lock (4) overlayfs 1 1310d 1306d 0/28 auto-closed as invalid on 2021/07/03 13:02
upstream possible deadlock in pipe_lock (2) overlayfs 3 2054d 2124d 0/28 auto-closed as invalid on 2019/10/18 15:02
upstream possible deadlock in pipe_lock (5) overlayfs C done 5 1229d 1229d 20/28 fixed on 2021/11/10 00:50
android-49 possible deadlock in pipe_lock 5 1868d 2061d 0/3 auto-closed as invalid on 2020/02/21 12:40
linux-4.19 possible deadlock in pipe_lock C done 2 2047d 2050d 1/1 fixed on 2019/11/29 10:34
android-44 possible deadlock in pipe_lock C 82 1828d 2061d 0/2 public: reported C repro on 2019/04/14 08:51
upstream possible deadlock in pipe_lock (3) overlayfs C inconclusive done 4 1767d 1804d 15/28 fixed on 2020/08/18 22:40
Fix bisection attempts (20)
Created Duration User Patch Repo Result
2021/10/30 22:20 13m bisect fix linux-4.19.y error job log
2021/09/27 15:53 31m bisect fix linux-4.19.y OK (0) job log log
2021/08/28 15:23 29m bisect fix linux-4.19.y OK (0) job log log
2021/06/20 09:28 34m bisect fix linux-4.19.y OK (0) job log log
2021/05/21 04:14 30m bisect fix linux-4.19.y OK (0) job log log
2021/04/21 03:31 26m bisect fix linux-4.19.y OK (0) job log log
2021/03/22 01:53 31m bisect fix linux-4.19.y OK (0) job log log
2021/02/19 22:16 31m bisect fix linux-4.19.y OK (0) job log log
2021/02/17 16:01 19m bisect fix linux-4.19.y error job log
2021/02/02 01:35 1m bisect fix linux-4.19.y error job log
2020/12/31 01:04 34m bisect fix linux-4.19.y OK (0) job log log
2020/11/30 22:48 29m bisect fix linux-4.19.y OK (0) job log log
2020/10/31 22:19 25m bisect fix linux-4.19.y OK (0) job log log
2020/10/01 21:52 26m bisect fix linux-4.19.y OK (0) job log log
2020/09/01 18:01 28m bisect fix linux-4.19.y OK (0) job log log
2020/06/17 19:39 26m bisect fix linux-4.19.y OK (0) job log log
2020/05/18 19:09 29m bisect fix linux-4.19.y OK (0) job log log
2020/04/18 18:42 26m bisect fix linux-4.19.y OK (0) job log log
2020/02/24 12:10 26m bisect fix linux-4.19.y OK (0) job log log
2020/01/25 11:44 26m bisect fix linux-4.19.y OK (0) job log log

Sample crash report:
overlayfs: failed to resolve './file0': -2
======================================================
WARNING: possible circular locking dependency detected
4.19.211-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor256/22187 is trying to acquire lock:
000000009314fca8 (&pipe->mutex/1){+.+.}, at: pipe_lock_nested fs/pipe.c:77 [inline]
000000009314fca8 (&pipe->mutex/1){+.+.}, at: pipe_lock+0x63/0x80 fs/pipe.c:85

but task is already holding lock:
00000000fdb1f0b3 (sb_writers#3){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline]
00000000fdb1f0b3 (sb_writers#3){.+.+}, at: do_splice fs/splice.c:1153 [inline]
00000000fdb1f0b3 (sb_writers#3){.+.+}, at: __do_sys_splice fs/splice.c:1428 [inline]
00000000fdb1f0b3 (sb_writers#3){.+.+}, at: __se_sys_splice+0x11de/0x16d0 fs/splice.c:1408

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (sb_writers#3){.+.+}:
       sb_start_write include/linux/fs.h:1579 [inline]
       mnt_want_write+0x3a/0xb0 fs/namespace.c:360
       ovl_setattr+0xdd/0x920 fs/overlayfs/inode.c:30
       notify_change+0x70b/0xfc0 fs/attr.c:334
       do_truncate+0x134/0x1f0 fs/open.c:63
       handle_truncate fs/namei.c:3009 [inline]
       do_last fs/namei.c:3427 [inline]
       path_openat+0x2308/0x2df0 fs/namei.c:3537
       do_filp_open+0x18c/0x3f0 fs/namei.c:3567
       do_sys_open+0x3b3/0x520 fs/open.c:1085
       do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
       entry_SYSCALL_64_after_hwframe+0x49/0xbe

-> #1 (&ovl_i_mutex_key[depth]){+.+.}:
       inode_lock include/linux/fs.h:748 [inline]
       ovl_write_iter+0x148/0xb40 fs/overlayfs/file.c:270
       call_write_iter include/linux/fs.h:1821 [inline]
       new_sync_write fs/read_write.c:474 [inline]
       __vfs_write+0x51b/0x770 fs/read_write.c:487
       __kernel_write+0x109/0x370 fs/read_write.c:506
       write_pipe_buf+0x153/0x1f0 fs/splice.c:798
       splice_from_pipe_feed fs/splice.c:503 [inline]
       __splice_from_pipe+0x389/0x800 fs/splice.c:627
       splice_from_pipe fs/splice.c:662 [inline]
       default_file_splice_write+0xd8/0x180 fs/splice.c:810
       do_splice_from fs/splice.c:852 [inline]
       do_splice fs/splice.c:1154 [inline]
       __do_sys_splice fs/splice.c:1428 [inline]
       __se_sys_splice+0xfe7/0x16d0 fs/splice.c:1408
       do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
       entry_SYSCALL_64_after_hwframe+0x49/0xbe

-> #0 (&pipe->mutex/1){+.+.}:
       __mutex_lock_common kernel/locking/mutex.c:937 [inline]
       __mutex_lock+0xd7/0x1190 kernel/locking/mutex.c:1078
       pipe_lock_nested fs/pipe.c:77 [inline]
       pipe_lock+0x63/0x80 fs/pipe.c:85
       iter_file_splice_write+0x183/0xbb0 fs/splice.c:700
       do_splice_from fs/splice.c:852 [inline]
       do_splice fs/splice.c:1154 [inline]
       __do_sys_splice fs/splice.c:1428 [inline]
       __se_sys_splice+0xfe7/0x16d0 fs/splice.c:1408
       do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
       entry_SYSCALL_64_after_hwframe+0x49/0xbe

other info that might help us debug this:

Chain exists of:
  &pipe->mutex/1 --> &ovl_i_mutex_key[depth] --> sb_writers#3

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sb_writers#3);
                               lock(&ovl_i_mutex_key[depth]);
                               lock(sb_writers#3);
  lock(&pipe->mutex/1);

 *** DEADLOCK ***

1 lock held by syz-executor256/22187:
 #0: 00000000fdb1f0b3 (sb_writers#3){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline]
 #0: 00000000fdb1f0b3 (sb_writers#3){.+.+}, at: do_splice fs/splice.c:1153 [inline]
 #0: 00000000fdb1f0b3 (sb_writers#3){.+.+}, at: __do_sys_splice fs/splice.c:1428 [inline]
 #0: 00000000fdb1f0b3 (sb_writers#3){.+.+}, at: __se_sys_splice+0x11de/0x16d0 fs/splice.c:1408

stack backtrace:
CPU: 0 PID: 22187 Comm: syz-executor256 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222
 check_prev_add kernel/locking/lockdep.c:1866 [inline]
 check_prevs_add kernel/locking/lockdep.c:1979 [inline]
 validate_chain kernel/locking/lockdep.c:2420 [inline]
 __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416
 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908
 __mutex_lock_common kernel/locking/mutex.c:937 [inline]
 __mutex_lock+0xd7/0x1190 kernel/locking/mutex.c:1078
 pipe_lock_nested fs/pipe.c:77 [inline]
 pipe_lock+0x63/0x80 fs/pipe.c:85
 iter_file_splice_write+0x183/0xbb0 fs/splice.c:700
 do_splice_from fs/splice.c:852 [inline]
 do_splice fs/splice.c:1154 [inline]
 __do_sys_splice fs/splice.c:1428 [inline]
 __se_sys_splice+0xfe7/0x16d0 fs/splice.c:1408
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f7796c20649
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 18 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f7796bc92e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 00007f7796ca24c0 RCX: 00007f7796c20649
RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f7796c6f140 R08: 000000000000fdef R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 3d7269647265776f R14: 0079616c7265766f R15: 00007f7796ca24c8

Crashes (155):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/26 02:13 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/25 16:04 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/21 07:12 linux-4.19.y 3f8a27f9e27b cc0f9968 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/19 23:53 linux-4.19.y 3f8a27f9e27b 71197f3a .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/19 11:41 linux-4.19.y 3f8a27f9e27b 66fca3ae .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/09/07 14:08 linux-4.19.y 3f8a27f9e27b c5b7bc57 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/09/06 01:42 linux-4.19.y 3f8a27f9e27b 9dcd38fc .config console log report syz C ci2-linux-4-19 possible deadlock in pipe_lock
2022/09/05 14:33 linux-4.19.y 3f8a27f9e27b 922294ab .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/09/05 13:22 linux-4.19.y 3f8a27f9e27b 922294ab .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/09/03 23:10 linux-4.19.y 3f8a27f9e27b 28811d0a .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/08/16 03:43 linux-4.19.y 3f8a27f9e27b 7a7cb304 .config console log report syz C ci2-linux-4-19 possible deadlock in pipe_lock
2022/08/14 17:17 linux-4.19.y 3f8a27f9e27b 8dfcaa3d .config console log report syz C ci2-linux-4-19 possible deadlock in pipe_lock
2021/07/29 15:23 linux-4.19.y a89b48fe9308 b44001ce .config console log report syz C ci2-linux-4-19 possible deadlock in pipe_lock
2021/07/26 21:36 linux-4.19.y 4938296e03bd fd511809 .config console log report syz C ci2-linux-4-19 possible deadlock in pipe_lock
2019/12/26 07:16 linux-4.19.y 672481c2deff be5c2c81 .config console log report syz C ci2-linux-4-19
2023/01/27 14:58 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report syz [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/25 12:54 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report syz [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/21 07:35 linux-4.19.y 3f8a27f9e27b cc0f9968 .config console log report syz [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/14 15:16 linux-4.19.y 3f8a27f9e27b a63719e7 .config console log report syz [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/13 17:37 linux-4.19.y 3f8a27f9e27b 529798b0 .config console log report syz [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/10/22 11:33 linux-4.19.y 3f8a27f9e27b c0b80a55 .config console log report syz [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/09/08 01:29 linux-4.19.y 3f8a27f9e27b 435aeef7 .config console log report syz [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/09/06 12:52 linux-4.19.y 3f8a27f9e27b 65aea2b9 .config console log report syz ci2-linux-4-19 possible deadlock in pipe_lock
2022/08/14 02:01 linux-4.19.y 3f8a27f9e27b 8dfcaa3d .config console log report syz ci2-linux-4-19 possible deadlock in pipe_lock
2020/08/02 18:01 linux-4.19.y 13af6c74b14a 96dd3623 .config console log report syz ci2-linux-4-19
2020/07/17 01:03 linux-4.19.y 17a87580a885 54b3c45e .config console log report syz ci2-linux-4-19
2023/03/06 14:54 linux-4.19.y 3f8a27f9e27b f8902b57 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/03/06 05:48 linux-4.19.y 3f8a27f9e27b f8902b57 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/03/05 17:30 linux-4.19.y 3f8a27f9e27b f8902b57 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/03/05 08:43 linux-4.19.y 3f8a27f9e27b f8902b57 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/03/01 22:08 linux-4.19.y 3f8a27f9e27b f8902b57 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/02/27 22:09 linux-4.19.y 3f8a27f9e27b 95aee97a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/02/27 08:58 linux-4.19.y 3f8a27f9e27b 9189cb53 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/02/27 02:29 linux-4.19.y 3f8a27f9e27b ee50e71c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/02/26 14:23 linux-4.19.y 3f8a27f9e27b ee50e71c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/02/25 19:59 linux-4.19.y 3f8a27f9e27b ee50e71c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/02/23 10:45 linux-4.19.y 3f8a27f9e27b 9e2ebb3c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/02/21 23:15 linux-4.19.y 3f8a27f9e27b 42a4d508 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/02/21 07:17 linux-4.19.y 3f8a27f9e27b f949448d .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/02/21 05:06 linux-4.19.y 3f8a27f9e27b 2414209c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/02/19 08:01 linux-4.19.y 3f8a27f9e27b bcdf85f8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/31 22:29 linux-4.19.y 3f8a27f9e27b b68fb8d6 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/31 01:13 linux-4.19.y 3f8a27f9e27b b68fb8d6 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/29 08:56 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/23 15:15 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/23 01:57 linux-4.19.y 3f8a27f9e27b cc0f9968 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/22 10:45 linux-4.19.y 3f8a27f9e27b cc0f9968 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/22 06:44 linux-4.19.y 3f8a27f9e27b cc0f9968 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/18 17:28 linux-4.19.y 3f8a27f9e27b 4620c2d9 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/17 16:58 linux-4.19.y 3f8a27f9e27b 42660d9e .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/16 00:46 linux-4.19.y 3f8a27f9e27b a63719e7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/14 13:49 linux-4.19.y 3f8a27f9e27b a63719e7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/11 07:08 linux-4.19.y 3f8a27f9e27b 48bc529a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/10 00:02 linux-4.19.y 3f8a27f9e27b 48bc529a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/09 12:59 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/08 03:06 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/08 00:46 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/07 10:05 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2023/01/05 00:53 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/12/19 17:08 linux-4.19.y 3f8a27f9e27b 05494336 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/12/18 11:03 linux-4.19.y 3f8a27f9e27b 05494336 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/12/17 01:42 linux-4.19.y 3f8a27f9e27b 05494336 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/12/13 19:45 linux-4.19.y 3f8a27f9e27b f6511626 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/12/12 15:27 linux-4.19.y 3f8a27f9e27b 67be1ae7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/12/12 13:07 linux-4.19.y 3f8a27f9e27b 67be1ae7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/12/11 13:34 linux-4.19.y 3f8a27f9e27b 67be1ae7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/12/02 03:47 linux-4.19.y 3f8a27f9e27b e080de16 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/12/01 19:10 linux-4.19.y 3f8a27f9e27b e080de16 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/11/30 19:02 linux-4.19.y 3f8a27f9e27b 4c2a66e8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/11/28 02:20 linux-4.19.y 3f8a27f9e27b f4470a7b .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2022/11/25 19:20 linux-4.19.y 3f8a27f9e27b 74a66371 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in pipe_lock
2021/01/03 01:35 linux-4.19.y 3207316b3bee 79264ae3 .config console log report info ci2-linux-4-19
* Struck through repros no longer work on HEAD.