Hello,
I am seeing the following BUG message on boot when running a preemptable kernel with LOCKDEP & etc enabled.
Could you please let me know if this is a real issue and whether there is a fix for it?
Thank you
My configuration:
- Jetson AGX Xavier
- JetPack 4.6.1
- custom built r32.7.1 with rt-patches applied (4.9.253-rt168)
- CONFIG_PREEMPT_RT_FULL=y
- CONFIG_DEBUG_KERNEL=y
- CONFIG_LOCKDEP=y
- CONFIG_PROVE_LOCKING=y
- CONFIG_DEBUG_SPINLOCK=y
[ 3.597425] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:987
[ 3.597431] in_atomic(): 1, irqs_disabled(): 0, pid: 106, name: kworker/u16:3
[ 3.597436] 6 locks held by kworker/u16:3/106:
[ 3.597463] #0: ("events_unbound"){.+.+.+}, at: [<ffffff80080dcef0>] process_one_work+0x1c0/0x7b0
[ 3.597481] #1: ((&entry->work)){+.+.+.}, at: [<ffffff80080dcef0>] process_one_work+0x1c0/0x7b0
[ 3.597501] #2: (&dev->mutex){......}, at: [<ffffff8008889aa4>] __driver_attach+0x5c/0x128
[ 3.597518] #3: (&dev->mutex){......}, at: [<ffffff8008889ab0>] __driver_attach+0x68/0x128
[ 3.597539] #4: (tegra_dc_registration_lock){+.+.+.}, at: [<ffffff80086695c8>] tegra_dc_probe+0x58/0x1aa0
[ 3.597558] #5: (&i2c_dev->xfer_lock){+.+...}, at: [<ffffff8008c11048>] tegra_i2c_xfer_msg+0x1d8/0xc38
[ 3.597567] Preemption disabled at:
[ 3.597568] [<ffffff8008c11048>] tegra_i2c_xfer_msg+0x1d8/0xc38
[ 3.597579] CPU: 5 PID: 106 Comm: kworker/u16:3 Not tainted 4.9.253-rt168 #2
[ 3.597582] Hardware name: Jetson-AGX (DT)
[ 3.597602] Workqueue: events_unbound async_run_entry_fn
[ 3.597606] Call trace:
[ 3.597615] [<ffffff800808c2b8>] dump_backtrace+0x0/0x1a8
[ 3.597622] [<ffffff800808c964>] show_stack+0x24/0x30
[ 3.597631] [<ffffff80090ea3c0>] dump_stack+0xa0/0xd0
[ 3.597637] [<ffffff80080f0794>] ___might_sleep+0x15c/0x230
[ 3.597644] [<ffffff80090f6610>] rt_spin_lock+0x30/0x70
[ 3.597652] [<ffffff8008210438>] get_page_from_freelist+0x180/0xd40
[ 3.597658] [<ffffff80082118c4>] __alloc_pages_nodemask+0x124/0xef8
[ 3.597666] [<ffffff8008276f88>] allocate_slab+0x368/0x570
[ 3.597671] [<ffffff80082771d8>] new_slab+0x48/0x88
[ 3.597678] [<ffffff8008279074>] ___slab_alloc.constprop.33+0x334/0x560
[ 3.597684] [<ffffff8008279308>] __slab_alloc.isra.29.constprop.32+0x68/0xc0
[ 3.597690] [<ffffff800827a4f8>] __kmalloc_track_caller+0x3f8/0x4a8
[ 3.597697] [<ffffff800888e650>] devm_kmalloc+0x38/0x88
[ 3.597706] [<ffffff80087b13dc>] tegra_dma_desc_alloc+0x3c/0xa8
[ 3.597712] [<ffffff80087b14c0>] tegra_dma_desc_get+0x78/0xd8
[ 3.597721] [<ffffff80087b1e74>] tegra_dma_prep_slave_sg+0x10c/0x498
[ 3.597727] [<ffffff8008c110a8>] tegra_i2c_xfer_msg+0x238/0xc38
[ 3.597733] [<ffffff8008c1218c>] tegra_i2c_xfer+0x5e4/0x7a8
[ 3.597741] [<ffffff8008c08690>] __i2c_transfer+0x128/0x9e0
[ 3.597747] [<ffffff8008c08fe0>] i2c_transfer+0x98/0x108
[ 3.597755] [<ffffff800870e9a0>] tegra_hdmi_ddc_i2c_xfer+0x70/0x158
[ 3.597762] [<ffffff800869faf8>] tegra_edid_read_block+0xc0/0x260
[ 3.597768] [<ffffff80086a023c>] tegra_edid_get_monspecs+0x74/0xbf8
[ 3.597775] [<ffffff800870f240>] tegra_hdmi_controller_enable+0x2e8/0xf88
[ 3.597781] [<ffffff800870ff28>] tegra_dc_hdmi_enable+0x48/0xb8
[ 3.597789] [<ffffff800875df60>] tegra_nvdisp_head_enable+0x4a0/0x13b8
[ 3.597795] [<ffffff8008661b50>] _tegra_dc_enable+0xf0/0x110
[ 3.597802] [<ffffff800866a754>] tegra_dc_probe+0x11e4/0x1aa0
[ 3.597808] [<ffffff800888c558>] platform_drv_probe+0x60/0xc0
[ 3.597814] [<ffffff8008889898>] driver_probe_device+0x298/0x448
[ 3.597820] [<ffffff8008889b24>] __driver_attach+0xdc/0x128
[ 3.597828] [<ffffff80088870c4>] bus_for_each_dev+0x5c/0xa8
[ 3.597835] [<ffffff8008888ed8>] driver_attach+0x30/0x40
[ 3.597840] [<ffffff8008887680>] driver_attach_async+0x20/0x60
[ 3.597847] [<ffffff80080e9510>] async_run_entry_fn+0x48/0x150
[ 3.597853] [<ffffff80080dcf98>] process_one_work+0x268/0x7b0
[ 3.597859] [<ffffff80080dd52c>] worker_thread+0x4c/0x518
[ 3.597865] [<ffffff80080e4e6c>] kthread+0xf4/0xf8
[ 3.597871] [<ffffff80080830c0>] ret_from_fork+0x10/0x50