syzbot


INFO: task hung in nilfs_segctor_thread

Status: upstream: reported C repro on 2023/02/16 07:03
Subsystems: nilfs2
[Documentation on labels]
Reported-by: syzbot+4fe7dca454f0d535125b@syzkaller.appspotmail.com
First crash: 521d, last: 521d
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in nilfs_segctor_thread nilfs2 C 41 523d 624d 0/1 upstream: reported C repro on 2022/11/05 03:06
linux-5.15 INFO: task hung in nilfs_segctor_thread (2) 1 70d 70d 0/3 upstream: reported on 2024/05/12 07:59
upstream INFO: task hung in nilfs_segctor_thread (3) nilfs 49 4d12h 2d06h 0/27 upstream: reported on 2024/07/19 19:17
upstream INFO: task hung in nilfs_segctor_thread nilfs C error 94 446d 620d 22/27 fixed on 2023/06/08 14:41
linux-5.15 INFO: task hung in nilfs_segctor_thread 3 456d 468d 0/3 auto-obsoleted due to no activity on 2023/08/20 05:29
upstream INFO: task hung in nilfs_segctor_thread (2) nilfs C inconclusive 98 43d 153d 27/27 fixed on 2024/07/09 19:14
linux-6.1 INFO: task hung in nilfs_segctor_thread 2 33d 70d 0/3 upstream: reported on 2024/05/12 09:28

Sample crash report:
NILFS (loop0): unable to move secondary superblock to block 18446744073709551612
audit: type=1804 audit(1676530624.284:3): pid=7977 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor157" name="/root/file0/bus" dev="loop0" ino=12 res=1
INFO: task segctord:7982 blocked for more than 140 seconds.
      Not tainted 4.14.305-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
segctord        D27400  7982      2 0x80000000
Call Trace:
 context_switch kernel/sched/core.c:2811 [inline]
 __schedule+0x88b/0x1de0 kernel/sched/core.c:3386
 schedule+0x8d/0x1b0 kernel/sched/core.c:3430
 __rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:588 [inline]
 rwsem_down_write_failed+0x343/0x6d0 kernel/locking/rwsem-xadd.c:617
 call_rwsem_down_write_failed+0x13/0x20 arch/x86/lib/rwsem.S:105
 __down_write arch/x86/include/asm/rwsem.h:126 [inline]
 down_write+0x4f/0x90 kernel/locking/rwsem.c:56
 nilfs_transaction_lock+0x1f9/0x860 fs/nilfs2/segment.c:371
 nilfs_segctor_thread_construct fs/nilfs2/segment.c:2501 [inline]
 nilfs_segctor_thread+0x3a2/0xdb0 fs/nilfs2/segment.c:2586
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406

Showing all locks held in the system:
1 lock held by khungtaskd/1534:
 #0:  (tasklist_lock){.+.+}, at: [<ffffffff8702d99c>] debug_show_all_locks+0x7c/0x21a kernel/locking/lockdep.c:4548
1 lock held by segctord/7982:
 #0:  (&nilfs->ns_segctor_sem){++++}, at: [<ffffffff826ff8f9>] nilfs_transaction_lock+0x1f9/0x860 fs/nilfs2/segment.c:371

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

NMI backtrace for cpu 0
CPU: 0 PID: 1534 Comm: khungtaskd Not tainted 4.14.305-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 nmi_cpu_backtrace.cold+0x57/0x93 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x13a/0x180 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:195 [inline]
 watchdog+0x5b9/0xb40 kernel/hung_task.c:274
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 7977 Comm: syz-executor157 Not tainted 4.14.305-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
task: ffff8880b565c540 task.stack: ffff8880b3040000
RIP: 0010:arch_local_save_flags arch/x86/include/asm/paravirt.h:774 [inline]
RIP: 0010:arch_local_irq_save arch/x86/include/asm/paravirt.h:796 [inline]
RIP: 0010:lock_release+0xc2/0x870 kernel/locking/lockdep.c:4013
RSP: 0018:ffff8880b30470f0 EFLAGS: 00000086
RAX: 0000000000000086 RBX: 1ffff11016608e21 RCX: 0000000000007feb
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff8880b565cdc4
RBP: ffff88813fffb758 R08: ffffffff8b9e5ad8 R09: 00000000000e001f
R10: 0000000000000000 R11: ffff8880b565c540 R12: ffffffff816a3f10
R13: ffff8880b565c540 R14: 1ffffffff11e13da R15: 0000000000000086
FS:  0000555555cd0300(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6594058160 CR3: 00000000af5fb000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 seqcount_lockdep_reader_access include/linux/seqlock.h:82 [inline]
 read_seqcount_begin include/linux/seqlock.h:164 [inline]
 read_seqbegin include/linux/seqlock.h:441 [inline]
 zone_span_seqbegin include/linux/memory_hotplug.h:80 [inline]
 page_outside_zone_boundaries+0xcf/0x310 mm/page_alloc.c:496
 bad_range mm/page_alloc.c:525 [inline]
 __free_one_page mm/page_alloc.c:828 [inline]
 free_pcppages_bulk+0x2e0/0x1460 mm/page_alloc.c:1162
 free_hot_cold_page+0x90e/0xca0 mm/page_alloc.c:2646
 slab_destroy mm/slab.c:1723 [inline]
 slabs_destroy+0x90/0xd0 mm/slab.c:1739
 cache_flusharray mm/slab.c:3483 [inline]
 ___cache_free+0x213/0x2c0 mm/slab.c:3525
 qlink_free mm/kasan/quarantine.c:147 [inline]
 qlist_free_all+0x79/0x140 mm/kasan/quarantine.c:166
 quarantine_reduce+0x185/0x200 mm/kasan/quarantine.c:259
 kasan_kmalloc+0xa2/0x160 mm/kasan/kasan.c:536
 slab_post_alloc_hook mm/slab.h:442 [inline]
 slab_alloc mm/slab.c:3390 [inline]
 kmem_cache_alloc+0x111/0x3c0 mm/slab.c:3550
 kmem_cache_zalloc include/linux/slab.h:651 [inline]
 alloc_buffer_head+0x20/0x110 fs/buffer.c:3429
 alloc_page_buffers+0xb3/0x1f0 fs/buffer.c:874
 create_empty_buffers+0x2c/0x470 fs/buffer.c:1590
 __nilfs_get_page_block fs/nilfs2/page.c:46 [inline]
 nilfs_grab_buffer+0x1fb/0x420 fs/nilfs2/page.c:70
 nilfs_mdt_submit_block.constprop.0+0x8e/0x970 fs/nilfs2/mdt.c:130
 nilfs_mdt_read_block+0x7c/0x320 fs/nilfs2/mdt.c:184
 nilfs_mdt_get_block+0xc7/0xb90 fs/nilfs2/mdt.c:259
 nilfs_sufile_get_segment_usage_block fs/nilfs2/sufile.c:101 [inline]
 nilfs_sufile_truncate_range fs/nilfs2/sufile.c:691 [inline]
 nilfs_sufile_resize+0x6b7/0x1060 fs/nilfs2/sufile.c:789
 nilfs_resize_fs+0x1c3/0xd20 fs/nilfs2/super.c:434
 nilfs_ioctl_resize fs/nilfs2/ioctl.c:1063 [inline]
 nilfs_ioctl+0x123e/0x1930 fs/nilfs2/ioctl.c:1335
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7fa0d3c07619
RSP: 002b:00007ffdb60d1908 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa0d3c07619
RDX: 0000000020000040 RSI: 0000000040086e8b RDI: 0000000000000006
RBP: 0000000000000000 R08: 00007fa0d3c75ec0 R09: 00007fa0d3c75ec0
R10: 00007fa0d3c75ec0 R11: 0000000000000246 R12: 00007ffdb60d1930
R13: 0000000000000000 R14: 431bde82d7b634db R15: 0000000000000000
Code: 9e f0 88 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 0f 85 98 06 00 00 48 83 3d 26 be ae 07 00 0f 84 0e 05 00 00 9c 58 <0f> 1f 44 00 00 48 ba 00 00 00 00 00 fc ff df 48 89 04 24 48 c7 

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/16 07:02 linux-4.14.y a8ad60f2af58 6be0f1f5 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 INFO: task hung in nilfs_segctor_thread
* Struck through repros no longer work on HEAD.