You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few weeks ago I spent some time investigating a similar report for a volume-basic-test. My preliminary conclusion was that the storage was overwhelmed by the volume of kernel logs.
My preliminary conclusion was that the storage was overwhelmed by the volume of kernel logs.
Another side effect: on some devices we have less than 1 week of logs:
jf-cml-hel-rt5682-02 $ journalctl --disk-usage
Archived and active journals take up 3.6G in the file system.
jf-cml-hel-rt5682-02 $ journalctl -b| head
-- Logs begin at Sat 2022-02-05 20:51:08 UTC, end at Fri 2022-02-11 23:31:14 UTC. --
@plbossart is there an easy way to reduce the log volume of this test? sof-logger has the ability to fine-tune per component log levels at run time silly me these are kernel logs.
Here is the first round of test result for 2 Dell platforms which are easy to hit this issue: https://sof-ci.sh.intel.com/#/result/planresultdetail/12875
There's only one failure and caused by the new debugging code for checking the write speed of storage.
@keqiaozhang can you try with 5.18 to see if that already fixes the problem? linux-next includes stuff that will be provided later, or in 5.19-rc1 and that in itself will add other issues.
This is really a good news, it seems that this issue has been fixed in latest upstream kernel.
Maybe a newer kernel has marginally better performance but that's IMHO only hiding the real, device-specific issue here.
As noticed by @plbossart , we've observed these hangs only on certain TGL devices with (normally!) very high performance NVMe storage. I just discovered that the storage performance on some of our old BYT devices is ONE HUNDRED times lower than on those recent TGL devices:
Yet we never ever noticed anything like this on BYT!? Something does not add up.
Be noticed that some BYT devices use the SD card for storage, not SSD or NVME. please check the storage size for the low performance BYT devices. the storage size should be 16G or 32G if it uses SD card.
Be noticed that some BYT devices use the SD card for storage, not SSD or NVME.
Very interesting but that's not my point. My point is: incredibly slow BYT storage never triggered any "hung task" or TIMEOUT. So this is not just a "slow storage" issue, something else is really wrong with these devices and we still have no idea what it is. Maybe storage hangs sometimes, or maybe it's not even storage. So neither the newer kernel versions or vm_dirty changes can really fix these issues, they only make it less likely. So these failures will be back.
@keqiaozhang can you try with 5.18 to see if that already fixes the problem? linux-next includes stuff that will be provided later, or in 5.19-rc1 and that in itself will add other issues.
Reproduced again in daily 12927?model=TGLU_SKU0A32_SDCA&testcase=multiple-pause-resume-50
I had a look at the results of the quick storage test I just added in thesofproject/sof-test@34ca191b92a32 and write speed was blazingly fast as usual before and after this failure, zero issue found with actual storage.
Start Time: 2022-05-26 22:28:02 UTC
End Time: 2022-05-27 04:34:14 UTC
Kernel Branch: topic/sof-dev
Kernel Commit: 46f61a08b40c
SOF Branch: main
SOF Commit: 13b659259de2
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel:
Showing all locks held in the system:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: 1 lock held by khungtaskd/56:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #0: ffffffff94b65cc0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x15/0xf7
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: 1 lock held by journal-offline/20653:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #0: ffff9cdb49d06c80 (&sbi->s_writepages_rwsem){....}-{0:0}, at: do_writepages+0xbf/0x1>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: 1 lock held by in:imklog/581:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #0: ffff9cdb4bac9af8 (&f->f_pos_lock){....}-{3:3}, at: __fdget_pos+0x4a/0x60
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: 4 locks held by kworker/u16:1/7388:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #0: ffff9cdb41002548 ((wq_completion)writeback){....}-{0:0}, at: process_one_work+0x208>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #1: ffffa3a5c8053e58 ((work_completion)(&(&wb->dwork)->work)){....}-{0:0}, at: process_>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #2: ffff9cdb49d020e8 (&type->s_umount_key#35){....}-{3:3}, at: trylock_super+0x16/0x50
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #3: ffff9cdb49d06c80 (&sbi->s_writepages_rwsem){....}-{0:0}, at: do_writepages+0xbf/0x1>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: 3 locks held by kworker/0:2/18951:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0x60070000: GLB_STREAM_MSG: TRIG_RELEASE
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: pcm: trigger stream 1 dir 1 cmd 3
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0x60060000: GLB_STREAM_MSG: TRIG_PAUSE
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: FW Poll Status: reg[0xa0]=0x20240000 successful
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: pcm: trigger stream 1 dir 1 cmd 4
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: FW Poll Status: reg[0xa0]=0x2024001e successful
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0x60070000: GLB_STREAM_MSG: TRIG_RELEASE
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: INFO: task journal-offline:20653 blocked for more than 245 seconds.
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: Tainted: G I 5.18.0-rc2-daily-default-20220526-0-g46f61a08b40c #dev
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: task:journal-offline state:D stack:13784 pid:20653 ppid: 1 flags:0x00004000
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: Call Trace:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: <TASK>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: __schedule+0x2b4/0x8c0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ? __blk_flush_plug+0xdf/0x120
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: schedule+0x4e/0xb0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ? folio_wait_bit+0xdd/0x1d0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: io_schedule+0x12/0x40
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: folio_wait_bit+0xdd/0x1d0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ? filemap_invalidate_unlock_two+0x40/0x40
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: folio_wait_writeback+0x56/0xb0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: mpage_prepare_extent_to_map+0x185/0x450
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ext4_writepages+0x311/0xeb0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: do_writepages+0xbf/0x180
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ? __lock_acquire.isra.0+0x125/0x550
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: file_write_and_wait_range+0xa6/0xe0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ext4_sync_file+0x1a5/0x3e0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: do_fsync+0x38/0x70
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: __x64_sys_fsync+0x10/0x20
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: do_syscall_64+0x38/0x90
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: entry_SYSCALL_64_after_hwframe+0x44/0xae
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: RIP: 0033:0x7fc65e7771fb
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: RSP: 002b:00007fc6548fdc70 EFLAGS: 00000293 ORIG_RAX: 000000000000004a
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: RAX: ffffffffffffffda RBX: 0000563bbce09990 RCX: 00007fc65e7771fb
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: RDX: 00007fc65e5c69de RSI: 00007fc65e5c69de RDI: 0000000000000012
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: RBP: 00007fc65e5c81a0 R08: 0000000000000000 R09: 00007fc6548fe700
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: R10: 000000000000001e R11: 0000000000000293 R12: 0000000000000002
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: R13: 00007ffc382eec6f R14: 00007ffc382eec70 R15: 00007fc6548fdd80
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: </TASK>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: INFO: task kworker/u16:1:7388 blocked for more than 245 seconds.
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: Tainted: G I 5.18.0-rc2-daily-default-20220526-0-g46f61a08b40c #dev
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: task:kworker/u16:1 state:D stack:12920 pid: 7388 ppid: 2 flags:0x00004000
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: Workqueue: writeback wb_workfn (flush-259:0)
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: Call Trace:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: <TASK>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: __schedule+0x2b4/0x8c0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ? __blk_flush_plug+0xdf/0x120
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: schedule+0x4e/0xb0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: io_schedule+0x12/0x40
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: blk_mq_get_tag+0x11c/0x280
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ? sched_clock_cpu+0xd/0xd0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ? complete_all+0x60/0x60
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: __blk_mq_alloc_requests+0x188/0x2e0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ? blk_attempt_plug_merge+0x76/0x90
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: blk_mq_submit_bio+0x421/0x700
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: submit_bio_noacct_nocheck+0x259/0x2b0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ext4_io_submit+0x20/0x40
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ext4_bio_write_page+0x16e/0x520
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: mpage_submit_page+0x4e/0x70
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: mpage_process_page_bufs+0xf8/0x110
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: mpage_prepare_extent_to_map+0x1f9/0x450
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ext4_writepages+0x311/0xeb0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: do_writepages+0xbf/0x180
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ? find_held_lock+0x32/0x90
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ? sched_clock_cpu+0xd/0xd0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: __writeback_single_inode+0x6f/0x470
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: writeback_sb_inodes+0x214/0x4d0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: __writeback_inodes_wb+0x4c/0xe0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: wb_writeback+0x2df/0x360
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: wb_workfn+0x371/0x500
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: process_one_work+0x29c/0x530
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: worker_thread+0x4d/0x3c0
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ? process_one_work+0x530/0x530
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: kthread+0xf0/0x120
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ? kthread_complete_and_exit+0x20/0x20
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: ret_from_fork+0x1f/0x30
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: </TASK>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel:
Showing all locks held in the system:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: 1 lock held by khungtaskd/56:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #0: ffffffff94b65cc0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x15/0xf7
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: 1 lock held by journal-offline/20653:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #0: ffff9cdb49d06c80 (&sbi->s_writepages_rwsem){....}-{0:0}, at: do_writepages+0xbf/0x1>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: 1 lock held by in:imklog/581:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #0: ffff9cdb4bac9af8 (&f->f_pos_lock){....}-{3:3}, at: __fdget_pos+0x4a/0x60
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: 4 locks held by kworker/u16:1/7388:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #0: ffff9cdb41002548 ((wq_completion)writeback){....}-{0:0}, at: process_one_work+0x208>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #1: ffffa3a5c8053e58 ((work_completion)(&(&wb->dwork)->work)){....}-{0:0}, at: process_>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #2: ffff9cdb49d020e8 (&type->s_umount_key#35){....}-{3:3}, at: trylock_super+0x16/0x50
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: #3: ffff9cdb49d06c80 (&sbi->s_writepages_rwsem){....}-{0:0}, at: do_writepages+0xbf/0x1>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: 3 locks held by kworker/0:2/18951:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel:
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: =============================================
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: pcm: trigger stream 7 dir 0 cmd 3
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0x60060000: GLB_STREAM_MSG: TRIG_PAUSE
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: FW Poll Status: reg[0x160]=0x20140000 successful
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc3_hda_dai_trigger: cmd=3 dai iDisp3 Pin directi>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0x80010000: GLB_DAI_MSG: CONFIG
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc3_hda_dai_trigger: cmd=4 dai iDisp3 Pin directi>
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: pcm: trigger stream 7 dir 0 cmd 4
May 26 23:32:52 jf-tglu-sku0a32-sdca-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: FW Poll Status: reg[0x160]=0x2014001e successful
Whatever the problem is, it is definitely triggered by more intense logging. The sudo sync I recently added makes that obvious.
In daily test run 13008?model=TGLH_SKU0A70_HDA&testcase=check-ipc-flood
after 10,000 lines like this:
May 31 22:32:02 sh-tglh-0a70-hda-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0xb0010000: GLB_TEST_MSG: IPC_FLOOD
May 31 22:32:02 sh-tglh-0a70-hda-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0xb0010000: GLB_TEST_MSG: IPC_FLOOD
May 31 22:32:02 sh-tglh-0a70-hda-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0xb0010000: GLB_TEST_MSG: IPC_FLOOD
May 31 22:32:02 sh-tglh-0a70-hda-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0xb0010000: GLB_TEST_MSG: IPC_FLOOD
...
May 31 22:32:36 sh-tglh-0a70-hda-01 sudo[3291]: ... ; USER=root ; COMMAND=/usr/bin/sync
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: INFO: task kworker/u32:2:113 blocked for more than 122 seconds.
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: Not tainted 5.18.0-rc2-daily-default-20220531-0-g46f61a08b40c #dev
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: task:kworker/u32:2 state:D stack:13032 pid: 113 ppid: 2 flags:0x00004000
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: Workqueue: writeback wb_workfn (flush-259:0)
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: Call Trace:
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: <TASK>
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: __schedule+0x2b4/0x8c0
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: ? __blk_flush_plug+0xdf/0x120
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: schedule+0x4e/0xb0
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: io_schedule+0x12/0x40
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: INFO: task kworker/u32:2:113 blocked for more than 122 seconds.
May 31 22:34:22 sh-tglh-0a70-hda-01 kernel: INFO: task sync:3213 blocked for more than 122 seconds.
May 31 22:48:09 sh-tglh-0a70-hda-01 kernel: INFO: task kworker/u32:2:113 blocked for more than 245 seconds.
May 31 22:48:09 sh-tglh-0a70-hda-01 kernel: INFO: task sync:3213 blocked for more than 245 seconds.
May 31 22:48:09 sh-tglh-0a70-hda-01 kernel: INFO: task sync:3292 blocked for more than 122 seconds.
May 31 22:48:09 sh-tglh-0a70-hda-01 kernel: INFO: task kworker/u32:2:113 blocked for more than 368 seconds.
May 31 22:48:09 sh-tglh-0a70-hda-01 kernel: INFO: task journal-offline:3349 blocked for more than 122 seconds.
May 31 22:48:09 sh-tglh-0a70-hda-01 kernel: INFO: task sync:3213 blocked for more than 368 seconds.
May 31 22:48:09 sh-tglh-0a70-hda-01 kernel: INFO: task sync:3292 blocked for more than 245 seconds.
May 31 22:48:09 sh-tglh-0a70-hda-01 kernel: INFO: task kworker/u32:2:113 blocked for more than 491 seconds.
Same on the day before; 10,000 lines like these in only 2 seconds and then hang after sync.
May 30 22:32:33 sh-tglh-0a70-hda-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0xb0010000: GLB_TEST_MSG: IPC_FLOOD
May 30 22:32:33 sh-tglh-0a70-hda-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0xb0010000: GLB_TEST_MSG: IPC_FLOOD
May 30 22:32:33 sh-tglh-0a70-hda-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0xb0010000: GLB_TEST_MSG: IPC_FLOOD
May 30 22:32:33 sh-tglh-0a70-hda-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0xb0010000: GLB_TEST_MSG: IPC_FLOOD
May 30 22:32:33 sh-tglh-0a70-hda-01 kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0xb0010000: GLB_TEST_MSG: IPC_FLOOD
....
May 30 22:32:33 sh-tglh-0a70-hda-01 sudo[3228]: .... ; USER=root ; COMMAND=/usr/bin/sync
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: INFO: task kworker/u32:0:8 blocked for more than 122 seconds.
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: Not tainted 5.18.0-rc2-daily-default-20220530-0-g46f61a08b40c #dev
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: task:kworker/u32:0 state:D stack:13208 pid: 8 ppid: 2 flags:0x00004000
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: Workqueue: writeback wb_workfn (flush-259:0)
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: Call Trace:
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: <TASK>
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: __schedule+0x2b4/0x8c0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? __blk_flush_plug+0xdf/0x120
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: schedule+0x4e/0xb0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: io_schedule+0x12/0x40
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: blk_mq_get_tag+0x11c/0x280
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? sched_clock_cpu+0xd/0xd0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? complete_all+0x60/0x60
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: __blk_mq_alloc_requests+0x188/0x2e0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? blk_attempt_plug_merge+0x76/0x90
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: blk_mq_submit_bio+0x421/0x700
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: submit_bio_noacct_nocheck+0x259/0x2b0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ext4_io_submit+0x20/0x40
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ext4_bio_write_page+0x16e/0x520
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: mpage_submit_page+0x4e/0x70
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: mpage_process_page_bufs+0xf8/0x110
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: mpage_prepare_extent_to_map+0x1f9/0x450
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ext4_writepages+0x311/0xeb0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? sched_clock_cpu+0xd/0xd0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? __lock_acquire.isra.0+0x125/0x550
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: do_writepages+0xbf/0x180
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? find_held_lock+0x32/0x90
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? sched_clock_cpu+0xd/0xd0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: __writeback_single_inode+0x6f/0x470
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: writeback_sb_inodes+0x214/0x4d0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: wb_writeback+0xde/0x360
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: wb_workfn+0xda/0x500
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? lock_acquire+0xb3/0x180
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? process_one_work+0x208/0x530
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: process_one_work+0x29c/0x530
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: worker_thread+0x4d/0x3c0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? process_one_work+0x530/0x530
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: kthread+0xf0/0x120
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? kthread_complete_and_exit+0x20/0x20
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ret_from_fork+0x1f/0x30
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: </TASK>
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: INFO: task sync:3229 blocked for more than 122 seconds.
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: Not tainted 5.18.0-rc2-daily-default-20220530-0-g46f61a08b40c #dev
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: task:sync state:D stack:14520 pid: 3229 ppid: 3228 flags:0x00000000
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: Call Trace:
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: <TASK>
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: __schedule+0x2b4/0x8c0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? __x64_sys_tee+0xd0/0xd0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: schedule+0x4e/0xb0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: wb_wait_for_completion+0x63/0x90
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? complete_all+0x60/0x60
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: sync_inodes_sb+0xe5/0x310
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ? __x64_sys_tee+0xd0/0xd0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: iterate_supers+0x8e/0xe0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: ksys_sync+0x40/0xa0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: __do_sys_sync+0xa/0x10
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: do_syscall_64+0x38/0x90
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: entry_SYSCALL_64_after_hwframe+0x44/0xae
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: RIP: 0033:0x7f44a85eb25b
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: RSP: 002b:00007ffd6ff37b68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a2
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: RAX: ffffffffffffffda RBX: 00007ffd6ff37ca8 RCX: 00007f44a85eb25b
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: RDX: 00007f44a86c5501 RSI: 0000000000000000 RDI: 00007f44a868bbc0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: R10: 00007f44a86c2be0 R11: 0000000000000246 R12: 0000000000000000
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: </TASK>
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel:
Showing all locks held in the system:
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: 3 locks held by kworker/u32:0/8:
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: #0: ffff9134c1e7b948 ((wq_completion)writeback){....}-{0:0}, at: process_one_work+0x208/0x530
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: #1: ffff9e16000ffe58 ((work_completion)(&(&wb->dwork)->work)){....}-{0:0}, at: process_one_work>
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: #2: ffff9134c145ac80 (&sbi->s_writepages_rwsem){....}-{0:0}, at: do_writepages+0xbf/0x180
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: 1 lock held by khungtaskd/96:
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: #0: ffffffff82b65cc0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x15/0xf7
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: 4 locks held by kworker/1:2/190:
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: 1 lock held by in:imklog/583:
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: #0: ffff9134c1830af8 (&f->f_pos_lock){....}-{3:3}, at: __fdget_pos+0x4a/0x60
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: 1 lock held by sync/3229:
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: #0: ffff9134c14590e8 (&type->s_umount_key#35){....}-{3:3}, at: iterate_supers+0x78/0xe0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: 1 lock held by sync/3308:
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: #0: ffff9134c14590e8 (&type->s_umount_key#35){....}-{3:3}, at: iterate_supers+0x78/0xe0
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel:
May 30 22:34:42 sh-tglh-0a70-hda-01 kernel: =============================================
It is still happening on some devices that have not been "serviced" yet, however the failure signature is usually very different since I added this quick storage test: thesofproject/sof-test#910
Activity
marc-hb commentedon Jan 21, 2022
A few weeks ago I spent some time investigating a similar report for a volume-basic-test. My preliminary conclusion was that the storage was overwhelmed by the volume of kernel logs.
kv2019i commentedon Jan 28, 2022
marc-hb commentedon Feb 3, 2022
Just found by chance that journald.conf has some rate limit options, worth a try.
marc-hb commentedon Feb 11, 2022
Another side effect: on some devices we have less than 1 week of logs:
Would some log level tuning make sense?
cc: @fredoh9 , @keqiaozhang , @aiChaoSONG , @kv2019i
plbossart commentedon Feb 12, 2022
new one: https://sof-ci.01.org/linuxpr/PR3338/build7152/devicetest/?model=CML_SKU0955_HDA&testcase=check-playback-3times
looks like file system issues again
keqiaozhang commentedon Feb 17, 2022
Another one:
http://sof-ci.sh.intel.com/#/result/planresultdetail/10270?model=CML_SKU0955_HDA&testcase=volume-basic-test-50
plbossart commentedon Feb 17, 2022
yes, but look further and it's again ext4 locking issues. Nothing apparently to do with SOF.
marc-hb commentedon Apr 8, 2022
Here's another interesting issue that happened in daily 11687?model=TGLH_SKU0A70_HDA&testcase=volume-basic-test-50
Note the 35 minutes gap!
@plbossart is there an easy way to reduce the log volume of this test?
sof-logger has the ability to fine-tune per component log levels at run timesilly me these are kernel logs.Tracepoints maybe? #3482
plbossart commentedon Apr 8, 2022
Indeed this GLB_TRACE_MSG: DMA_POSITION is not very useful, we should check if we can remove it.
marc-hb commentedon May 10, 2022
This recent one also has a ton of
WARN dai_copy(): Copy_bytes 0 + avail bytes 0 < period bytes 384, possible glitch(logs also going to the disk)https://sof-ci.01.org/softestpr/PR903/build21/devicetest/?model=CML_SKU0955_HDA&testcase=check-pause-resume-playback-10
marc-hb commentedon May 10, 2022
Other interesting logs just found by chance.
Also linking to
which could help mitigate a bit?
Daily 12389?model=CML_SKU0955_HDA&testcase=check-ipc-flood
19 remaining items
keqiaozhang commentedon May 25, 2022
Thanks for @ujfalusi suggestion.
@marc-hb and @plbossart
I verified this issue with latest
linux-nextkernel https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/ and this issue cannot be reproduced anymore.Here is the first round of test result for 2 Dell platforms which are easy to hit this issue: https://sof-ci.sh.intel.com/#/result/planresultdetail/12875
There's only one failure and caused by the new debugging code for checking the write speed of storage.
So I triggered another round of test on all 4 Dell platforms and also remove the workaround(pagecache setting), the results are really good and consistent.
Please refer to: https://sof-ci.sh.intel.com/#/result/planresultdetail/12877
This is really a good news, it seems that this issue has been fixed in latest upstream kernel.
plbossart commentedon May 25, 2022
@keqiaozhang can you try with 5.18 to see if that already fixes the problem? linux-next includes stuff that will be provided later, or in 5.19-rc1 and that in itself will add other issues.
marc-hb commentedon May 25, 2022
Maybe a newer kernel has marginally better performance but that's IMHO only hiding the real, device-specific issue here.
As noticed by @plbossart , we've observed these hangs only on certain TGL devices with (normally!) very high performance NVMe storage. I just discovered that the storage performance on some of our old BYT devices is ONE HUNDRED times lower than on those recent TGL devices:
Yet we never ever noticed anything like this on BYT!? Something does not add up.
Anyway we're not in the storage business so whatever hides this issue is good enough for me.
EDIT: CML TIMEOUT in
syncin https://sof-ci.01.org/linuxpr/PR3645/build166/devicetestbase-config: add FRAMEBUFFER_CONSOLE
keqiaozhang commentedon May 26, 2022
Be noticed that some BYT devices use the SD card for storage, not SSD or NVME. please check the storage size for the low performance BYT devices. the storage size should be 16G or 32G if it uses SD card.
marc-hb commentedon May 26, 2022
Very interesting but that's not my point. My point is: incredibly slow BYT storage never triggered any "hung task" or TIMEOUT. So this is not just a "slow storage" issue, something else is really wrong with these devices and we still have no idea what it is. Maybe storage hangs sometimes, or maybe it's not even storage. So neither the newer kernel versions or
vm_dirtychanges can really fix these issues, they only make it less likely. So these failures will be back.keqiaozhang commentedon May 26, 2022
I tested with https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/log/?h=for-5.18 kernel before, the hung task timeout issue is still reproducible.
The last update of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/log/?h=for-5.18 is 14 days ago. Same commit ID as I tested before.
Then I tested with today's
for-next, the hung task timeout issue remains.I also checked with
linux-nexthttps://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tag/?h=v5.18, the hung task timeout is still exists.So it seems that the fix only landed on
linux-nextmaster branch.marc-hb commentedon May 27, 2022
Reproduced again in daily 12927?model=TGLU_SKU0A32_SDCA&testcase=multiple-pause-resume-50
I had a look at the results of the quick storage test I just added in thesofproject/sof-test@34ca191b92a32 and write speed was blazingly fast as usual before and after this failure, zero issue found with actual storage.
Start Time: 2022-05-26 22:28:02 UTC
End Time: 2022-05-27 04:34:14 UTC
Kernel Branch: topic/sof-dev
Kernel Commit: 46f61a08b40c
SOF Branch: main
SOF Commit: 13b659259de2
marc-hb commentedon May 27, 2022
This issue is intermittent, so the lack of reproduction can be just luck.
marc-hb commentedon Jun 2, 2022
Whatever the problem is, it is definitely triggered by more intense logging. The
sudo syncI recently added makes that obvious.In daily test run 13008?model=TGLH_SKU0A70_HDA&testcase=check-ipc-flood
after 10,000 lines like this:
Same on the day before; 10,000 lines like these in only 2 seconds and then hang after
sync.plbossart commentedon Jun 29, 2022
@marc-hb I don't recall having seen this in recent PR or daily tests, should we close or is this still current?
marc-hb commentedon Jun 29, 2022
It's been root-caused to failing hard drives, probably because of SSD firmware bugs, like for instance this one:
https://www.dell.com/support/home/en-us/drivers/driversdetails?driverid=754y5
(This is just random example; I'm not saying we use this particular model)
See internal issue 233 for more details.
Flash storage is complex, so it is buggy:
https://en.wikipedia.org/wiki/Write_amplification
https://www.bunniestudios.com/blog/?p=3554
It is still happening on some devices that have not been "serviced" yet, however the failure signature is usually very different since I added this quick storage test: thesofproject/sof-test#910
marc-hb commentedon Jun 30, 2022
And now for something different:
https://sof-ci.01.org/sofpr/PR5959/build785/devicetest/?model=TGLU_UP_HDA_ZEPHYR&testcase=check-suspend-resume-with-playback-5
Never a dull moment...