syzbot


possible deadlock in pipe_write

Status: auto-obsoleted due to no activity on 2024/10/06 23:47
Bug presence: origin:lts-only
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+f90104cef4fc1b3b3194@syzkaller.appspotmail.com
First crash: 571d, last: 256d
Fix commit to backport (bisect log) :
tree: upstream
commit 055ca83559912f2cfd91c9441427bac4caf3c74e
Author: Jann Horn <jannh@google.com>
Date: Fri Nov 24 15:08:22 2023 +0000

  fs/pipe: Fix lockdep false-positive in watchqueue pipe_write()

  
Fix bisection: failed (error log, bisect log)
  
Bug presence (2)
Date Name Commit Repro Result
2024/01/27 linux-5.15.y (ToT) 6139f2a02fe0 C [report] possible deadlock in pipe_write
2024/01/27 upstream (ToT) 3a5879d495b2 C Didn't crash
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in pipe_write origin:upstream missing-backport C inconclusive 31 256d 627d 0/3 upstream: reported C repro on 2023/04/03 17:51
upstream possible deadlock in pipe_write fs C inconclusive 181 328d 1006d 25/28 fixed on 2024/01/30 15:47
Last patch testing requests (5)
Created Duration User Patch Repo Result
2024/10/06 21:34 14m retest repro linux-5.15.y OK log
2024/10/06 21:34 14m retest repro linux-5.15.y OK log
2024/10/06 21:34 1h07m retest repro linux-5.15.y OK log
2024/10/06 21:34 17m retest repro linux-5.15.y OK log
2024/10/06 21:34 17m retest repro linux-5.15.y OK log
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2024/03/12 19:17 3h44m fix candidate upstream OK (1) job log
2024/01/21 22:27 0m fix candidate upstream error job log
2023/10/11 17:06 0m bisect fix linux-5.15.y error job log

Sample crash report:
============================================
WARNING: possible recursive locking detected
5.15.153-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.0/4504 is trying to acquire lock:
ffff8880195fdc68 (&pipe->mutex/1){+.+.}-{3:3}, at: __pipe_lock fs/pipe.c:102 [inline]
ffff8880195fdc68 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_write+0x12f/0x1b60 fs/pipe.c:430

but task is already holding lock:
ffff8880195fe068 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_lock_nested fs/pipe.c:81 [inline]
ffff8880195fe068 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_lock fs/pipe.c:89 [inline]
ffff8880195fe068 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_wait_readable+0x3e1/0x550 fs/pipe.c:1046

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&pipe->mutex/1);
  lock(&pipe->mutex/1);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

1 lock held by syz-executor.0/4504:
 #0: ffff8880195fe068 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_lock_nested fs/pipe.c:81 [inline]
 #0: ffff8880195fe068 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_lock fs/pipe.c:89 [inline]
 #0: ffff8880195fe068 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_wait_readable+0x3e1/0x550 fs/pipe.c:1046

stack backtrace:
CPU: 1 PID: 4504 Comm: syz-executor.0 Not tainted 5.15.153-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2946 [inline]
 check_deadlock kernel/locking/lockdep.c:2989 [inline]
 validate_chain+0x46d2/0x5930 kernel/locking/lockdep.c:3775
 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
 __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 __pipe_lock fs/pipe.c:102 [inline]
 pipe_write+0x12f/0x1b60 fs/pipe.c:430
 do_iter_readv_writev+0x594/0x7a0
 do_iter_write+0x1ea/0x760 fs/read_write.c:855
 iter_file_splice_write+0x806/0xfa0 fs/splice.c:689
 do_splice_from fs/splice.c:767 [inline]
 do_splice+0xfe6/0x1790 fs/splice.c:1079
 __do_splice fs/splice.c:1144 [inline]
 __do_sys_splice fs/splice.c:1350 [inline]
 __se_sys_splice+0x340/0x420 fs/splice.c:1332
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fe6de0c0e69
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe6dc6330c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 00007fe6de1eef80 RCX: 00007fe6de0c0e69
RDX: 0000000000000006 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007fe6de10d47a R08: 0000000000008002 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fe6de1eef80 R15: 00007ffc0576f558
 </TASK>

Crashes (106):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/08 16:54 linux-5.15.y 9465fef4ae35 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/04/04 15:00 linux-5.15.y 9465fef4ae35 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/31 01:55 linux-5.15.y 9465fef4ae35 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/29 10:29 linux-5.15.y 9465fef4ae35 c52bcb23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/12 15:38 linux-5.15.y 574362648507 c35c26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/12 13:35 linux-5.15.y 574362648507 c35c26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/09 08:18 linux-5.15.y 574362648507 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/09 05:12 linux-5.15.y 574362648507 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/08 20:07 linux-5.15.y 574362648507 8e75c913 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/08 07:55 linux-5.15.y 574362648507 cf82cde1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/08 05:33 linux-5.15.y 574362648507 cf82cde1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/07 18:30 linux-5.15.y 574362648507 2b789849 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/07 15:14 linux-5.15.y 574362648507 2b789849 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/06 21:36 linux-5.15.y 574362648507 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/06 18:48 linux-5.15.y 574362648507 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/05 14:40 linux-5.15.y 80efc6265290 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/05 06:01 linux-5.15.y 80efc6265290 5fc53669 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/04 18:02 linux-5.15.y 80efc6265290 3717835d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/04 12:48 linux-5.15.y 80efc6265290 3717835d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/02 07:16 linux-5.15.y 80efc6265290 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/02 02:20 linux-5.15.y 80efc6265290 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/01 17:37 linux-5.15.y 80efc6265290 83acf9e0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/03/01 16:12 linux-5.15.y 80efc6265290 83acf9e0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/29 02:41 linux-5.15.y 458ce51d0356 352ab904 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/28 16:33 linux-5.15.y 458ce51d0356 55d6f11d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/27 23:25 linux-5.15.y 458ce51d0356 d367cbe5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/27 08:10 linux-5.15.y 458ce51d0356 05e69c83 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/27 03:16 linux-5.15.y 458ce51d0356 05e69c83 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/26 20:42 linux-5.15.y 458ce51d0356 da36a36b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/23 14:01 linux-5.15.y 458ce51d0356 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/23 12:14 linux-5.15.y 458ce51d0356 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/22 21:46 linux-5.15.y 6139f2a02fe0 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/22 15:35 linux-5.15.y 6139f2a02fe0 345111b5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/21 23:06 linux-5.15.y 6139f2a02fe0 345111b5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/19 19:13 linux-5.15.y 6139f2a02fe0 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/19 13:14 linux-5.15.y 6139f2a02fe0 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/02/17 16:15 linux-5.15.y 6139f2a02fe0 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/01/26 21:56 linux-5.15.y 6139f2a02fe0 cc4a4020 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/01/26 21:40 linux-5.15.y 6139f2a02fe0 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2023/07/04 09:54 linux-5.15.y 4af60700a60c 6e553898 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2023/06/23 15:38 linux-5.15.y f67653019430 79782afc .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2024/04/08 11:55 linux-5.15.y 9465fef4ae35 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in pipe_write
2024/04/01 05:27 linux-5.15.y 9465fef4ae35 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in pipe_write
2023/12/28 13:39 linux-5.15.y d93fa2c78854 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in pipe_write
2023/06/09 02:55 linux-5.15.y d7af3e5ba454 058b3a5a .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in pipe_write
2023/05/30 03:39 linux-5.15.y 1fe619a7d252 cf184559 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in pipe_write
2023/08/09 09:20 linux-5.15.y c275eaaaa342 8ad1a287 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2023/08/09 06:35 linux-5.15.y c275eaaaa342 8ad1a287 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2023/08/09 01:08 linux-5.15.y c275eaaaa342 9552ae77 .config console log report info ci2-linux-5-15-kasan possible deadlock in pipe_write
2023/08/08 21:48 linux-5.15.y c275eaaaa342 9552ae77 .config console log report info ci2-linux-5-15-kasan possible deadlock in pipe_write
2023/08/08 16:35 linux-5.15.y 38d4ca22a528 9552ae77 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in pipe_write
2023/08/26 12:28 linux-5.15.y f6f7927ac664 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in pipe_write
2023/05/30 03:03 linux-5.15.y 1fe619a7d252 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in pipe_write
* Struck through repros no longer work on HEAD.