Public bug reported:

[Impact]

When configuring ext4 with data=journal and reboot the machine, sometimes we 
can see the following call trace:
[   29.050046] Call Trace:
[   29.050241]  <TASK>
[   29.050429]  __ext4_journal_start_sb+0x3c/0x1f0
[   29.050737]  mpage_prepare_extent_to_map+0x4ac/0x590
[   29.051110]  ext4_do_writepages+0x3dc/0x1140
[   29.051417]  ext4_writepages+0xc8/0x1b0
[   29.051693]  ? ext4_writepages+0xc8/0x1b0
[   29.051976]  do_writepages+0xc4/0x180
[   29.052242]  __writeback_single_inode+0x45/0x340
[   29.052552]  ? _raw_spin_unlock+0xe/0x40
[   29.052830]  writeback_sb_inodes+0x26b/0x5e0
[   29.053124]  __writeback_inodes_wb+0x54/0x100
[   29.053426]  ? queue_io+0x86/0x170
[   29.053674]  wb_writeback+0x1ac/0x350
[   29.053937]  wb_workfn+0x367/0x460
[   29.054192]  ? __schedule+0x46f/0x1a00
[   29.054455]  process_one_work+0x1af/0x420
[   29.054737]  worker_thread+0x1bf/0x350
[   29.055000]  ? __pfx_worker_thread+0x10/0x10
[   29.055298]  kthread+0xfb/0x140
[   29.055530]  ? __pfx_kthread+0x10/0x10
[   29.055795]  ret_from_fork+0x2a3/0x360
[   29.056059]  ? __pfx_kthread+0x10/0x10
[   29.056327]  ret_from_fork_asm+0x1a/0x30
[   29.056598]  </TASK>
[   29.056780] ---[ end trace 0000000000000000 ]---
[   29.101478] EXT4-fs warning (device vda1): ext4_evict_inode:195: inode 
#21309: comm (sd-umount): data will be lost

[Fix]

Upstream commit:
https://github.com/torvalds/linux/commit/ec524aae479b4b2078c47492b90ec21200bce434

[Test Plan]

This can be reproduced on a VM with ext4 and data=journal:
sudo tune2fs -o journal_data /dev/vda1

Run fio:
fio --name=fiotest --rw=randwrite --bs=4k --runtime=6 --ioengine=libaio
--iodepth=256 --numjobs=8 --filename=fiotest --filesize=30G
--group_reporting

Reboot the VM, and check the console output from:
virsh console testvm

[Where problems could occur]

This issue is caused by stale flags during reboot, when there is no dirty data 
and PG_dirty has also been cleared, but PAGECACHE_TAG_DIRTY and 
PAGECACHE_TAG_TOWRITE are stale.
Since there is no dirty data, the risk is very low.

** Affects: linux (Ubuntu)
     Importance: Medium
         Status: In Progress

** Affects: linux (Ubuntu Noble)
     Importance: Medium
         Status: In Progress

** Affects: linux (Ubuntu Resolute)
     Importance: Medium
         Status: In Progress

** Affects: linux (Ubuntu Stonking)
     Importance: Medium
         Status: In Progress

** Also affects: linux (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: linux (Ubuntu Resolute)
   Importance: Undecided
       Status: New

** Also affects: linux (Ubuntu Stonking)
   Importance: Undecided
       Status: New

** Changed in: linux (Ubuntu Noble)
       Status: New => In Progress

** Changed in: linux (Ubuntu Resolute)
       Status: New => In Progress

** Changed in: linux (Ubuntu Stonking)
       Status: New => In Progress

** Changed in: linux (Ubuntu Noble)
   Importance: Undecided => Medium

** Changed in: linux (Ubuntu Resolute)
   Importance: Undecided => Medium

** Changed in: linux (Ubuntu Stonking)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2164716

Title:
  Reboot machine with ext4 configured to data=journal could dump
  spurious call trace

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2164716/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to