Hi, all: A ltp test leads to guest hung(io hung), the test releases virtio device resource and then reassign. I find device’s mem prefetchable resource 64-bit is changed.
ltp test: https://github.com/linux-test-project/ltp/blob/522d7fba4afc84e07b252aa4cd91b241e81d6613/testcases/kernel/device-drivers/pci/tpci_kernel/ltp_tpci.c#L428 Do you know what cause the problem? Thanks very much. -------------------------- ENV: kernel 5.10.0, qemu 6.2 ——————————— [ 301.194813] ltp_tpci: name = 0000:00:05.0, flags = 1319436, start 0xfe004000, end 0xfe007fff [ 301.194814] virtio-pci 0000:00:05.0: BAR 4: releasing [mem 0xfe004000-0xfe007fff 64bit pref] [ 301.194816] virtio-pci 0000:00:05.0: BAR 4: assigned [mem 0x240004000-0x240007fff 64bit pref] ---------------------- ps -aux| grep D root 7 0.0 0.0 0 0 ? D 14:37 0:00 [kworker/u16:0+flush-253:0] root 483 0.0 0.0 0 0 ? D 14:37 0:00 [jbd2/vda3-8] ——————hung task panic————--- [ 9585.419571][ T62] INFO: task jbd2/vda3-8:475 blocked for more than 122 seconds. [ 9585.420274][ T62] Tainted: G W OE 5.10.0-60.67.0.96.ule3.x86_64 #1 [ 9585.421027][ T62] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 9585.421854][ T62] task:jbd2/vda3-8 state:D stack: 0 pid: 475 ppid: 2 flags:0x00004000 [ 9585.422715][ T62] Call Trace: [ 9585.423020][ T62] __schedule+0x3f6/0x7d0 [ 9585.423435][ T62] ? bit_wait+0x60/0x60 [ 9585.423825][ T62] schedule+0x46/0xb0 [ 9585.424194][ T62] io_schedule+0x42/0x70 [ 9585.424597][ T62] bit_wait_io+0xd/0x60 [ 9585.424977][ T62] __wait_on_bit+0x28/0x90 [ 9585.425383][ T62] out_of_line_wait_on_bit+0x92/0xb0 [ 9585.425879][ T62] ? var_wake_function+0x30/0x30 [ 9585.426341][ T62] jbd2_journal_commit_transaction+0xd02/0x15e0 [jbd2] [ 9585.427005][ T62] kjournald2+0xab/0x270 [jbd2] [ 9585.427455][ T62] ? wait_woken+0x80/0x80 [ 9585.427863][ T62] ? commit_timeout+0x10/0x10 [jbd2] [ 9585.428355][ T62] kthread+0xfb/0x140 [ 9585.428733][ T62] ? kthread_park+0x90/0x90 [ 9585.429144][ T62] ret_from_fork+0x1f/0x30 [ 9585.429578][ T62] INFO: task kworker/u16:0:4392 blocked for more than 122 seconds. [ 9585.430303][ T62] Tainted: G W OE 5.10.0-60.67.0.96.ule3.x86_64 #1 [ 9585.431062][ T62] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 9585.431885][ T62] task:kworker/u16:0 state:D stack: 0 pid: 4392 ppid: 2 flags:0x00004080 [ 9585.432751][ T62] Workqueue: writeback wb_workfn (flush-253:0) [ 9585.433328][ T62] Call Trace: [ 9585.433642][ T62] __schedule+0x3f6/0x7d0 [ 9585.434035][ T62] ? bit_wait+0x60/0x60 [ 9585.434424][ T62] schedule+0x46/0xb0 [ 9585.434809][ T62] io_schedule+0x42/0x70 [ 9585.435201][ T62] bit_wait_io+0xd/0x60 [ 9585.435605][ T62] __wait_on_bit+0x28/0x90 [ 9585.436016][ T62] out_of_line_wait_on_bit+0x92/0xb0 [ 9585.436507][ T62] ? var_wake_function+0x30/0x30 [ 9585.437006][ T62] do_get_write_access+0x244/0x320 [jbd2] [ 9585.437613][ T62] jbd2_journal_get_write_access+0x67/0x90 [jbd2] [ 9585.438222][ T62] __ext4_journal_get_write_access+0x44/0x90 [ext4] [ 9585.438859][ T62] ? ext4_get_inode_loc+0x3e/0xa0 [ext4] [ 9585.439390][ T62] ext4_reserve_inode_write+0x83/0xc0 [ext4] [ 9585.439956][ T62] __ext4_mark_inode_dirty+0x50/0x120 [ext4] [ 9585.440528][ T62] ext4_ext_insert_extent+0x386/0x670 [ext4] [ 9585.441099][ T62] ? ext4_mb_new_blocks+0x14c/0x540 [ext4] [ 9585.441663][ T62] ext4_ext_map_blocks+0x30e/0x8f0 [ext4] [ 9585.442187][ T62] ? find_get_pages_range_tag+0x1b0/0x220 [ 9585.442736][ T62] ext4_map_blocks+0x18e/0x5a0 [ext4] [ 9585.443239][ T62] ? mpage_prepare_extent_to_map+0x2db/0x300 [ext4] [ 9585.443866][ T62] mpage_map_one_extent+0x64/0x150 [ext4] [ 9585.444401][ T62] mpage_map_and_submit_extent+0x77/0x210 [ext4] [ 9585.444996][ T62] ext4_writepages+0x627/0x790 [ext4] [ 9585.445499][ T62] ? update_nohz_stats+0x43/0x60 [ 9585.445967][ T62] do_writepages+0x31/0xc0 [ 9585.446378][ T62] __writeback_single_inode+0x39/0x200 [ 9585.446888][ T62] writeback_sb_inodes+0x20a/0x4f0 [ 9585.447358][ T62] __writeback_inodes_wb+0x4c/0xd0 [ 9585.447837][ T62] wb_writeback+0x1d8/0x2a0 [ 9585.448256][ T62] wb_check_old_data_flush+0xb6/0xc0 [ 9585.448764][ T62] wb_do_writeback+0xc1/0x180 [ 9585.449199][ T62] ? set_worker_desc+0xaa/0xc0 [ 9585.449652][ T62] wb_workfn+0x5a/0x180 [ 9585.450035][ T62] process_one_work+0x1ad/0x350 [ 9585.450490][ T62] worker_thread+0x49/0x310 [ 9585.450912][ T62] ? rescuer_thread+0x370/0x370 [ 9585.451364][ T62] kthread+0xfb/0x140 [ 9585.451738][ T62] ? kthread_park+0x90/0x90 [ 9585.452145][ T62] ret_from_fork+0x1f/0x30 [ 9585.452571][ T62] Kernel panic - not syncing: hung_task: blocked tasks