syzbot


INFO: task hung in process_measurement (3)

Status: upstream: reported C repro on 2025/05/21 17:47
Subsystems: integrity lsm
[Documentation on labels]
Reported-by: syzbot+cb9e66807bcb882cd0c5@syzkaller.appspotmail.com
First crash: 15d, last: 1d14h
Cause bisection: introduced by (bisect log) :
commit 1d16c605cc55ef26f0c65b362665a6c99080ccbc
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Thu Nov 9 19:22:46 2023 +0000

  bcachefs: Disk space accounting rewrite

Crash: INFO: task hung in __closure_sync (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [integrity?] [lsm?] INFO: task hung in process_measurement (3) 0 (1) 2025/05/21 17:47
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in process_measurement (2) 1 134d 134d 0/3 auto-obsoleted due to no activity on 2025/04/20 01:13
linux-5.15 INFO: task hung in process_measurement (3) 1 17d 17d 0/3 upstream: reported on 2025/05/07 00:26
linux-5.15 INFO: task hung in process_measurement 1 671d 671d 0/3 auto-obsoleted due to no activity on 2023/10/31 09:35
linux-4.19 INFO: task hung in process_measurement 2 2001d 2077d 0/1 auto-closed as invalid on 2020/03/29 20:33
upstream INFO: task hung in process_measurement integrity lsm C done inconclusive 52 1395d 2427d 0/28 closed as invalid on 2022/02/08 10:56
upstream INFO: task hung in process_measurement (2) integrity lsm C done 607 19d 623d 28/28 fixed on 2025/05/06 15:33
linux-4.19 INFO: task hung in process_measurement (3) 5 809d 814d 0/1 upstream: reported on 2023/03/02 09:48
linux-4.14 INFO: task hung in process_measurement 3 1896d 1952d 0/1 auto-closed as invalid on 2020/07/13 00:59
linux-6.1 INFO: task hung in process_measurement 39 313d 322d 0/3 auto-obsoleted due to no activity on 2024/09/23 07:47
linux-5.15 INFO: task hung in process_measurement (2) 97 213d 322d 0/3 auto-obsoleted due to no activity on 2025/01/01 08:25
linux-4.19 INFO: task hung in process_measurement (2) 1 1671d 1671d 0/1 auto-closed as invalid on 2021/02/23 17:00

Sample crash report:
INFO: task syz-executor236:5862 blocked for more than 143 seconds.
      Not tainted 6.15.0-rc6-syzkaller-00278-g172a9d94339c #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor236 state:D stack:26936 pid:5862  tgid:5849  ppid:5845   task_flags:0x400140 flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x168f/0x4c70 kernel/sched/core.c:6767
 __schedule_loop kernel/sched/core.c:6845 [inline]
 schedule+0x165/0x360 kernel/sched/core.c:6860
 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6917
 rwsem_down_write_slowpath+0xbec/0x1030 kernel/locking/rwsem.c:1176
 __down_write_common kernel/locking/rwsem.c:1304 [inline]
 __down_write kernel/locking/rwsem.c:1313 [inline]
 down_write+0x1ab/0x1f0 kernel/locking/rwsem.c:1578
 inode_lock include/linux/fs.h:867 [inline]
 process_measurement+0x3d8/0x1a40 security/integrity/ima/ima_main.c:260
 ima_file_check+0xd7/0x120 security/integrity/ima/ima_main.c:613
 security_file_post_open+0xbb/0x290 security/security.c:3130
 do_open fs/namei.c:3882 [inline]
 path_openat+0x2f26/0x3830 fs/namei.c:4039
 do_filp_open+0x1fa/0x410 fs/namei.c:4066
 do_sys_openat2+0x121/0x1c0 fs/open.c:1429
 do_sys_open fs/open.c:1444 [inline]
 __do_sys_creat fs/open.c:1522 [inline]
 __se_sys_creat fs/open.c:1516 [inline]
 __x64_sys_creat+0x8f/0xc0 fs/open.c:1516
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd31f9f4ef9
RSP: 002b:00007fd31f95f218 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007fd31fa9b6e8 RCX: 00007fd31f9f4ef9
RDX: ffffffffffffffb0 RSI: c9028ba210c11e9b RDI: 00002000000000c0
RBP: 00007fd31fa9b6e0 R08: 0000000000000000 R09: 0000000000000000
R10: 00007ffcb62f60c7 R11: 0000000000000246 R12: 00007fd31fa67314
R13: 00002000000000c0 R14: 0030656c69662f2e R15: 00007ffcb62f60c8
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/31:
 #0: ffffffff8df3dce0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #0: ffffffff8df3dce0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
 #0: ffffffff8df3dce0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180 kernel/locking/lockdep.c:6764
1 lock held by kworker/u8:3/53:
 #0: ffff8880b88399d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:605
1 lock held by klogd/5178:
 #0: ffff8880b88399d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:605
2 locks held by getty/5577:
 #0: ffff8880340120a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc900036ec2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400 drivers/tty/n_tty.c:2222
3 locks held by syz-executor236/5850:
 #0: ffff888078b629b8 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x247/0x320 fs/file.c:1213
 #1: ffff88823bfbe420 (sb_writers#9){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:3041 [inline]
 #1: ffff88823bfbe420 (sb_writers#9){.+.+}-{0:0}, at: vfs_write+0x211/0xa90 fs/read_write.c:680
 #2: ffff8880761b08e0 (&sb->s_type->i_mutex_key#14){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:867 [inline]
 #2: ffff8880761b08e0 (&sb->s_type->i_mutex_key#14){+.+.}-{4:4}, at: bch2_direct_write+0x267/0x2d50 fs/bcachefs/fs-io-direct.c:612
2 locks held by syz-executor236/5862:
 #0: ffff88823bfbe420 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:556
 #1: ffff8880761b08e0 (&sb->s_type->i_mutex_key#14){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:867 [inline]
 #1: ffff8880761b08e0 (&sb->s_type->i_mutex_key#14){+.+.}-{4:4}, at: process_measurement+0x3d8/0x1a40 security/integrity/ima/ima_main.c:260

=============================================

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 31 Comm: khungtaskd Not tainted 6.15.0-rc6-syzkaller-00278-g172a9d94339c #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 nmi_cpu_backtrace+0x39e/0x3d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x17a/0x300 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:158 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:274 [inline]
 watchdog+0xfee/0x1030 kernel/hung_task.c:437
 kthread+0x70e/0x8a0 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.15.0-rc6-syzkaller-00278-g172a9d94339c #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:81
Code: 43 d4 02 00 cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d a3 9f 18 00 f3 0f 1e fa fb f4 <e9> 18 d4 02 00 cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc90000197de0 EFLAGS: 000002c6
RAX: a55f7e0638390b00 RBX: ffffffff81977048 RCX: a55f7e0638390b00
RDX: 0000000000000001 RSI: ffffffff8d73a84c RDI: ffffffff8bc12000
RBP: ffffc90000197f20 R08: ffff8880b8932b5b R09: 1ffff1101712656b
R10: dffffc0000000000 R11: ffffed101712656c R12: ffffffff8f7e0670
R13: 0000000000000001 R14: 0000000000000001 R15: 1ffff110038dcb40
FS:  0000000000000000(0000) GS:ffff8881261f6000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055b5f126d168 CR3: 000000000dd38000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline]
 default_idle+0x13/0x20 arch/x86/kernel/process.c:748
 default_idle_call+0x74/0xb0 kernel/sched/idle.c:117
 cpuidle_idle_call kernel/sched/idle.c:185 [inline]
 do_idle+0x1e8/0x510 kernel/sched/idle.c:325
 cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:423
 start_secondary+0x101/0x110 arch/x86/kernel/smpboot.c:315
 common_startup_64+0x13e/0x147
 </TASK>

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/17 17:33 upstream 172a9d94339c f41472b0 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-upstream-fs INFO: task hung in process_measurement
2025/05/23 02:52 upstream 94305e83eccb fa44301a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in process_measurement
2025/05/22 06:00 upstream d608703fcdd9 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in process_measurement
2025/05/17 12:01 upstream 172a9d94339c f41472b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in process_measurement
2025/05/10 05:28 upstream 0e1329d4045c 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in process_measurement
2025/05/09 22:20 upstream 9c69f8884904 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in process_measurement
2025/05/09 11:57 upstream 2c89c1b655c0 bb813bcc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in process_measurement
* Struck through repros no longer work on HEAD.