syzbot


WARNING: ODEBUG bug in process_one_req (2)

Status: auto-closed as invalid on 2019/02/22 10:26
Subsystems: rdma
[Documentation on labels]
Reported-by: syzbot+b8d5eb964e412cfd2678@syzkaller.appspotmail.com
First crash: 2438d, last: 2431d
Discussions (1)
Title Replies (including bot) Last reply
WARNING: ODEBUG bug in process_one_req 8 (9) 2018/03/22 15:31
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: ODEBUG bug in process_one_req rdma C 1577 2438d 2462d 0/28 closed as invalid on 2018/03/22 12:48

Sample crash report:
------------[ cut here ]------------
ODEBUG: free active (active state 0) object type: work_struct hint: process_one_req+0x0/0x6c0 include/net/dst.h:165
WARNING: CPU: 1 PID: 5 at lib/debugobjects.c:291 debug_print_object+0x166/0x220 lib/debugobjects.c:288
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 5 Comm: kworker/u4:0 Not tainted 4.16.0-rc7+ #370
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: ib_addr process_one_req
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x24d lib/dump_stack.c:53
 panic+0x1e4/0x41c kernel/panic.c:183
 __warn+0x1dc/0x200 kernel/panic.c:547
 report_bug+0x1f4/0x2b0 lib/bug.c:186
 fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178
 fixup_bug arch/x86/kernel/traps.c:247 [inline]
 do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
 invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:986
RIP: 0010:debug_print_object+0x166/0x220 lib/debugobjects.c:288
RSP: 0018:ffff8801d9acf210 EFLAGS: 00010086
RAX: dffffc0000000008 RBX: 0000000000000003 RCX: ffffffff815b7bde
RDX: 0000000000000000 RSI: 1ffff1003b359df2 RDI: 1ffff1003b359dc7
RBP: ffff8801d9acf250 R08: 0000000000000000 R09: 1ffff1003b359d99
R10: ffffed003b359e71 R11: ffffffff87b3b658 R12: 0000000000000001
R13: ffffffff87b16640 R14: ffffffff86e59240 R15: ffffffff8147fea0
 __debug_check_no_obj_freed lib/debugobjects.c:745 [inline]
 debug_check_no_obj_freed+0x662/0xf1f lib/debugobjects.c:774
 kfree+0xc7/0x260 mm/slab.c:3800
 process_one_req+0x2e7/0x6c0 drivers/infiniband/core/addr.c:592
 process_one_work+0xc47/0x1bb0 kernel/workqueue.c:2113
 worker_thread+0x223/0x1990 kernel/workqueue.c:2247
 kthread+0x33c/0x400 kernel/kthread.c:238
 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406

======================================================
WARNING: possible circular locking dependency detected
4.16.0-rc7+ #370 Not tainted
------------------------------------------------------
kworker/u4:0/5 is trying to acquire lock:
 ((console_sem).lock){-.-.}, at: [<000000000a74be0b>] down_trylock+0x13/0x70 kernel/locking/semaphore.c:136

but task is already holding lock:
 (&obj_hash[i].lock){-.-.}, at: [<000000005a58f63f>] __debug_check_no_obj_freed lib/debugobjects.c:736 [inline]
 (&obj_hash[i].lock){-.-.}, at: [<000000005a58f63f>] debug_check_no_obj_freed+0x1e9/0xf1f lib/debugobjects.c:774

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&obj_hash[i].lock){-.-.}:
       __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
       _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152
       __debug_object_init+0x109/0x1040 lib/debugobjects.c:343
       debug_object_init+0x17/0x20 lib/debugobjects.c:391
       debug_hrtimer_init kernel/time/hrtimer.c:410 [inline]
       debug_init kernel/time/hrtimer.c:458 [inline]
       hrtimer_init+0x8c/0x410 kernel/time/hrtimer.c:1259
       init_dl_task_timer+0x1b/0x50 kernel/sched/deadline.c:1060
       __sched_fork+0x2bb/0xb60 kernel/sched/core.c:2189
       init_idle+0x75/0x820 kernel/sched/core.c:5352
       sched_init+0xb19/0xc43 kernel/sched/core.c:6049
       start_kernel+0x452/0x819 init/main.c:586
       x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:378
       x86_64_start_kernel+0x77/0x7a arch/x86/kernel/head64.c:359
       secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:239

-> #2 (&rq->lock){-.-.}:
       __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
       _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144
       rq_lock kernel/sched/sched.h:1760 [inline]
       task_fork_fair+0x7a/0x690 kernel/sched/fair.c:9471
       sched_fork+0x450/0xc10 kernel/sched/core.c:2405
       copy_process.part.38+0x17c9/0x4bd0 kernel/fork.c:1763
       copy_process kernel/fork.c:1606 [inline]
       _do_fork+0x1f7/0xf70 kernel/fork.c:2087
       kernel_thread+0x34/0x40 kernel/fork.c:2146
       rest_init+0x22/0xf0 init/main.c:403
       start_kernel+0x7f1/0x819 init/main.c:717
       x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:378
       x86_64_start_kernel+0x77/0x7a arch/x86/kernel/head64.c:359
       secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:239

-> #1 (&p->pi_lock){-.-.}:
       __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
       _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152
       try_to_wake_up+0xbc/0x15f0 kernel/sched/core.c:1989
       wake_up_process+0x10/0x20 kernel/sched/core.c:2152
       __up.isra.0+0x1cc/0x2c0 kernel/locking/semaphore.c:262
       up+0x13b/0x1d0 kernel/locking/semaphore.c:187
       __up_console_sem+0xb2/0x1a0 kernel/printk/printk.c:242
       console_unlock+0x5af/0xfb0 kernel/printk/printk.c:2417
       do_con_write+0x106e/0x1f70 drivers/tty/vt/vt.c:2433
       con_write+0x25/0xb0 drivers/tty/vt/vt.c:2782
       process_output_block drivers/tty/n_tty.c:579 [inline]
       n_tty_write+0x5ef/0xec0 drivers/tty/n_tty.c:2308
       do_tty_write drivers/tty/tty_io.c:958 [inline]
       tty_write+0x3fa/0x840 drivers/tty/tty_io.c:1042
       __vfs_write+0xef/0x970 fs/read_write.c:480
       vfs_write+0x189/0x510 fs/read_write.c:544
       SYSC_write fs/read_write.c:589 [inline]
       SyS_write+0xef/0x220 fs/read_write.c:581
       do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
       entry_SYSCALL_64_after_hwframe+0x42/0xb7

-> #0 ((console_sem).lock){-.-.}:
       lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920
       __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
       _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152
       down_trylock+0x13/0x70 kernel/locking/semaphore.c:136
       __down_trylock_console_sem+0xa2/0x1e0 kernel/printk/printk.c:225
       console_trylock+0x15/0x70 kernel/printk/printk.c:2229
       console_trylock_spinning kernel/printk/printk.c:1643 [inline]
       vprintk_emit+0x5b5/0xb90 kernel/printk/printk.c:1906
       vprintk_default+0x28/0x30 kernel/printk/printk.c:1947
       vprintk_func+0x57/0xc0 kernel/printk/printk_safe.c:379
       printk+0xaa/0xca kernel/printk/printk.c:1980
       __warn_printk+0x90/0xf0 kernel/panic.c:599
       debug_print_object+0x166/0x220 lib/debugobjects.c:288
       __debug_check_no_obj_freed lib/debugobjects.c:745 [inline]
       debug_check_no_obj_freed+0x662/0xf1f lib/debugobjects.c:774
       kfree+0xc7/0x260 mm/slab.c:3800
       process_one_req+0x2e7/0x6c0 drivers/infiniband/core/addr.c:592
       process_one_work+0xc47/0x1bb0 kernel/workqueue.c:2113
       worker_thread+0x223/0x1990 kernel/workqueue.c:2247
       kthread+0x33c/0x400 kernel/kthread.c:238
       ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406

other info that might help us debug this:

Chain exists of:
  (console_sem).lock --> &rq->lock --> &obj_hash[i].lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&obj_hash[i].lock);
                               lock(&rq->lock);
                               lock(&obj_hash[i].lock);
  lock((console_sem).lock);

 *** DEADLOCK ***

3 locks held by kworker/u4:0/5:
 #0:  ((wq_completion)"ib_addr"){+.+.}, at: [<000000006ee28ac5>] work_static include/linux/workqueue.h:198 [inline]
 #0:  ((wq_completion)"ib_addr"){+.+.}, at: [<000000006ee28ac5>] set_work_data kernel/workqueue.c:619 [inline]
 #0:  ((wq_completion)"ib_addr"){+.+.}, at: [<000000006ee28ac5>] set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline]
 #0:  ((wq_completion)"ib_addr"){+.+.}, at: [<000000006ee28ac5>] process_one_work+0xb12/0x1bb0 kernel/workqueue.c:2084
 #1:  ((work_completion)(&(&req->work)->work)){+.+.}, at: [<00000000afd7d54f>] process_one_work+0xb89/0x1bb0 kernel/workqueue.c:2088
 #2:  (&obj_hash[i].lock){-.-.}, at: [<000000005a58f63f>] __debug_check_no_obj_freed lib/debugobjects.c:736 [inline]
 #2:  (&obj_hash[i].lock){-.-.}, at: [<000000005a58f63f>] debug_check_no_obj_freed+0x1e9/0xf1f lib/debugobjects.c:774

stack backtrace:
CPU: 1 PID: 5 Comm: kworker/u4:0 Not tainted 4.16.0-rc7+ #370
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: ib_addr process_one_req
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x24d lib/dump_stack.c:53
 print_circular_bug.isra.38+0x2cd/0x2dc kernel/locking/lockdep.c:1223
 check_prev_add kernel/locking/lockdep.c:1863 [inline]
 check_prevs_add kernel/locking/lockdep.c:1976 [inline]
 validate_chain kernel/locking/lockdep.c:2417 [inline]
 __lock_acquire+0x30a8/0x3e00 kernel/locking/lockdep.c:3431
 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152
 down_trylock+0x13/0x70 kernel/locking/semaphore.c:136
 __down_trylock_console_sem+0xa2/0x1e0 kernel/printk/printk.c:225
 console_trylock+0x15/0x70 kernel/printk/printk.c:2229
 console_trylock_spinning kernel/printk/printk.c:1643 [inline]
 vprintk_emit+0x5b5/0xb90 kernel/printk/printk.c:1906
 vprintk_default+0x28/0x30 kernel/printk/printk.c:1947
 vprintk_func+0x57/0xc0 kernel/printk/printk_safe.c:379
 printk+0xaa/0xca kernel/printk/printk.c:1980
 __warn_printk+0x90/0xf0 kernel/panic.c:599
 debug_print_object+0x166/0x220 lib/debugobjects.c:288
 __debug_check_no_obj_freed lib/debugobjects.c:745 [inline]
 debug_check_no_obj_freed+0x662/0xf1f lib/debugobjects.c:774
 kfree+0xc7/0x260 mm/slab.c:3800
 process_one_req+0x2e7/0x6c0 drivers/infiniband/core/addr.c:592
 process_one_work+0xc47/0x1bb0 kernel/workqueue.c:2113
 worker_thread+0x223/0x1990 kernel/workqueue.c:2247
 kthread+0x33c/0x400 kernel/kthread.c:238
 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled

Crashes (108):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/03/30 01:34 upstream 0b412605ef5f d47f0ed6 .config console log report ci-upstream-kasan-gce
2018/03/29 23:27 upstream 0b412605ef5f d47f0ed6 .config console log report ci-upstream-kasan-gce
2018/03/29 19:11 upstream 0b412605ef5f d47f0ed6 .config console log report ci-upstream-kasan-gce
2018/03/29 13:58 upstream 0b412605ef5f d47f0ed6 .config console log report ci-upstream-kasan-gce-root
2018/03/29 08:20 upstream a2601d78b77a bf5e585c .config console log report ci-upstream-kasan-gce
2018/03/29 05:34 upstream a2601d78b77a bf5e585c .config console log report ci-upstream-kasan-gce
2018/03/29 03:16 upstream a2601d78b77a bf5e585c .config console log report ci-upstream-kasan-gce
2018/03/28 22:25 upstream 3eb2ce825ea1 bf5e585c .config console log report ci-upstream-kasan-gce
2018/03/28 21:13 upstream 3eb2ce825ea1 bf5e585c .config console log report ci-upstream-kasan-gce-root
2018/03/28 15:51 upstream 3eb2ce825ea1 bf5e585c .config console log report ci-upstream-kasan-gce-root
2018/03/28 12:55 upstream 3eb2ce825ea1 bf5e585c .config console log report ci-upstream-kasan-gce
2018/03/28 09:26 upstream 3eb2ce825ea1 bf5e585c .config console log report ci-upstream-kasan-gce-root
2018/03/28 02:08 upstream 3eb2ce825ea1 bf5e585c .config console log report ci-upstream-kasan-gce
2018/03/27 20:58 upstream 3eb2ce825ea1 bf5e585c .config console log report ci-upstream-kasan-gce
2018/03/27 18:27 upstream 3eb2ce825ea1 bf5e585c .config console log report ci-upstream-kasan-gce
2018/03/27 16:40 upstream 3eb2ce825ea1 bf5e585c .config console log report ci-upstream-kasan-gce-root
2018/03/27 13:14 upstream 3eb2ce825ea1 bf5e585c .config console log report ci-upstream-kasan-gce-root
2018/03/27 11:34 upstream 3eb2ce825ea1 bf5e585c .config console log report ci-upstream-kasan-gce
2018/03/27 07:45 upstream 3eb2ce825ea1 0ca7878b .config console log report ci-upstream-kasan-gce
2018/03/26 21:27 upstream 3eb2ce825ea1 0ca7878b .config console log report ci-upstream-kasan-gce
2018/03/26 17:27 upstream 3eb2ce825ea1 0ca7878b .config console log report ci-upstream-kasan-gce
2018/03/26 04:19 upstream cb6416592bc2 e033c1f1 .config console log report ci-upstream-kasan-gce
2018/03/26 03:04 upstream cb6416592bc2 e033c1f1 .config console log report ci-upstream-kasan-gce
2018/03/25 11:39 upstream bcfc1f455466 e033c1f1 .config console log report ci-upstream-kasan-gce
2018/03/25 08:24 upstream bcfc1f455466 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/25 06:04 upstream bcfc1f455466 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/25 00:38 upstream bcfc1f455466 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/24 22:03 upstream bcfc1f455466 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/24 18:28 upstream bcfc1f455466 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/24 18:27 upstream bcfc1f455466 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/24 16:07 upstream 99fec39e7725 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/24 13:53 upstream 99fec39e7725 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/24 09:36 upstream 99fec39e7725 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/24 08:22 upstream 99fec39e7725 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/24 03:11 upstream 99fec39e7725 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/24 02:15 upstream 99fec39e7725 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/24 00:38 upstream f36b7534b833 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/23 23:08 upstream f36b7534b833 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/23 21:27 upstream f36b7534b833 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/22 13:14 upstream 3215b9d57a2c 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/30 05:23 upstream 0b412605ef5f d47f0ed6 .config console log report ci-upstream-kasan-gce-386
2018/03/30 03:45 upstream 0b412605ef5f d47f0ed6 .config console log report ci-upstream-kasan-gce-386
2018/03/29 17:09 upstream 0b412605ef5f d47f0ed6 .config console log report ci-upstream-kasan-gce-386
2018/03/27 23:19 upstream 3eb2ce825ea1 bf5e585c .config console log report ci-upstream-kasan-gce-386
2018/03/26 14:10 upstream 3eb2ce825ea1 e033c1f1 .config console log report ci-upstream-kasan-gce-386
2018/03/26 01:23 upstream cb6416592bc2 e033c1f1 .config console log report ci-upstream-kasan-gce-386
2018/03/25 22:58 upstream cb6416592bc2 e033c1f1 .config console log report ci-upstream-kasan-gce-386
2018/03/25 20:50 upstream cb6416592bc2 e033c1f1 .config console log report ci-upstream-kasan-gce-386
2018/03/25 17:40 upstream bcfc1f455466 e033c1f1 .config console log report ci-upstream-kasan-gce-386
2018/03/25 10:19 upstream bcfc1f455466 2e9d9054 .config console log report ci-upstream-kasan-gce-386
2018/03/25 06:11 upstream bcfc1f455466 2e9d9054 .config console log report ci-upstream-kasan-gce-386
2018/03/24 20:42 upstream bcfc1f455466 2e9d9054 .config console log report ci-upstream-kasan-gce-386
2018/03/24 20:30 upstream bcfc1f455466 2e9d9054 .config console log report ci-upstream-kasan-gce-386
2018/03/24 16:44 upstream 99fec39e7725 2e9d9054 .config console log report ci-upstream-kasan-gce-386
2018/03/24 16:29 upstream 99fec39e7725 2e9d9054 .config console log report ci-upstream-kasan-gce-386
* Struck through repros no longer work on HEAD.