Hi dann,

* dann frazier [Tue Nov 17, 2020 at 03:05:32PM -0700]:

> grml2usb autopkgtest frequently fail in Ubuntu's CI. For example:
>   
> https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-hirsute/hirsute/amd64/g/grml2usb/20201116_194744_cbe0f@/log.gz

> An excerpt showing the error:
> 2020-11-17 14:14:49,362 Installing default MBR
> 2020-11-17 14:14:49,363 executing: dd if='/dev/loop0' of='/tmp/tmpa2umy9df' 
> bs=5
> 12 count=1
> 2020-11-17 14:14:49,381 executing: dd if=/usr/share/grml2usb/mbr/mbrldr 
> of=/tmp/
> tmpa2umy9df bs=439 count=1 conv=notrunc
> 2020-11-17 14:14:49,385 executing: dd if='/tmp/tmpa2umy9df' of='/dev/loop0' 
> bs=5
> 12 count=1 conv=notrunc
> 2020-11-17 14:14:49,401 executing: sync
> 2020-11-17 14:14:49,433 Probing device via 'blockdev --rereadpt /dev/loop0'
> blockdev: ioctl error on BLKRRPART: Device or resource busy
> 2020-11-17 14:14:49,452 Execution failed: ("Couldn't execute blockdev on '%s' 
> (i
> nstall util-linux?)", '/dev/loop0')

Wow, interesting.

> I am able to reproduce this on an OpenStack instance with a failure rate of
> 33% (36 failures, 110 passes). My theory is that the sync is not sufficient,
> and that we really need to do a targeted fsync of the file. With the
> attached patch, I've yet to see a failure in 42 iterations.

Very nice catch! Thanks for your bug report and many thanks also for
providing a patch with it!


Quoting your other mail (Message-ID: <20201117222219.GA35687@xps13.dannf> /
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975015#10):

> Looking at git history, I see this commit that makes an assertion
> counter to my test results:
>   http://git.grml.org/?p=grml2usb.git;a=commit;h=7a6e10df

> Previous to that commit, I did not see fsync being used. Michael: is
> that commit message based on experimentation? If so, perhaps neither
> sync approach is really sufficient, and maybe we need to implement a
> retry loop :/

I'm afraid I don't have any further details available anymore
nowadays, so I'd tend to say I was wrong. :) Your patch looks fine
to me and I'm all for giving this a try, if it should fail anywhere
I'm more than happy to give a closer look at it.

regards
-mika-

Attachment: signature.asc
Description: Digital signature

Reply via email to