linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug 218932] New: Serious problem with ext4 with all kernels, auto-commits do not settle to block device
@ 2024-06-03 11:40 bugzilla-daemon
  2024-06-05 18:32 ` [Bug 218932] " bugzilla-daemon
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bugzilla-daemon @ 2024-06-03 11:40 UTC (permalink / raw)
  To: linux-ext4

https://bugzilla.kernel.org/show_bug.cgi?id=218932

            Bug ID: 218932
           Summary: Serious problem with ext4 with all kernels,
                    auto-commits do not settle to block device
           Product: File System
           Version: 2.5
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: ext4
          Assignee: fs_ext4@kernel-bugs.osdl.org
          Reporter: sirius@mailhaven.com
        Regression: No

Tested in kernel 5.11, 6.1, 6.8
Some writes to ext4 (default commit=5) do not commit to block device in more
than 25 seconds.

How to reproduce:
apt install php-cli -y
Instead of iostat create io watcher, that shows real writes to block device in
Mb every second:
show_writes.php
=================================
#!/usr/bin/php
<?php
if(!isset($argv[1])) die("provide device\n");
if(!($device = realpath($argv[1]))) die("can't realpath device\n");
if(!preg_match("@[^/]+$@", $device, $m)) die();
$device = $m[0];
$prev = 0;
while(1) {
        $data = preg_split("/\s+/",
trim(file_get_contents("/sys/block/$device/stat")));
        if(empty($data)) die("can't get device info");
        if($prev) echo date("h:i:s")."
".number_format(($data[6]-$prev)*512/1024/1024,2)." M\n";
        $prev = $data[6];
        sleep(1);
}
=================================
Add free HDD/partition of 20Mb+ size (/dev/vdb)
In first console run:
php show_writes.php /dev/vdb

In second console run:
mkfs.ext4 -E lazy_itable_init=0 -E lazy_journal_init=0 /dev/vdb
mount /dev/vdb /mnt/

rm -f /mnt/test; sync; sleep 1; date && dd if=/dev/urandom of=/mnt/test bs=1M
count=10
# watch that 10Mb write has settled in 5 seconds, good
rm -f /mnt/test; sync; sleep 1; date && dd if=/dev/urandom of=/mnt/test bs=1M
count=10
# watch, that second 10Mb write does not commit to block device in more than 25
seconds, but should in 5 seconds, repeat if did.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-07-19 20:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-03 11:40 [Bug 218932] New: Serious problem with ext4 with all kernels, auto-commits do not settle to block device bugzilla-daemon
2024-06-05 18:32 ` [Bug 218932] " bugzilla-daemon
2024-06-05 18:39 ` bugzilla-daemon
2024-06-05 20:16 ` bugzilla-daemon
2024-06-05 20:21 ` bugzilla-daemon
2024-06-05 20:47 ` bugzilla-daemon
2024-06-05 21:01 ` bugzilla-daemon
2024-07-19 12:33 ` bugzilla-daemon
2024-07-19 20:07 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).