Bug 1141451 - Failures in tests: /dev/sda1: No such file or directory
Summary: Failures in tests: /dev/sda1: No such file or directory
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs
TreeView+ depends on / blocked
 
Reported: 2014-09-13 15:56 UTC by Richard W.M. Jones
Modified: 2015-04-14 10:34 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-04-14 10:34:52 UTC
Embargoed:


Attachments (Terms of Use)
build.log (2.88 MB, text/plain)
2014-09-13 15:56 UTC, Richard W.M. Jones
no flags Details

Description Richard W.M. Jones 2014-09-13 15:56:03 UTC
Created attachment 937243 [details]
build.log

Description of problem:

This is a placeholder for the extremely mysterious heisenbug where
the /dev/sda1 device node does not get created, or magically disappears.

Version-Release number of selected component (if applicable):

It started happening in Fedora 21 and above.

How reproducible:

Rare, but annoying.  Happens a lot more often under Koji than
anywhere else, but can be reproduced in a VM occasionally.

Only appears to happen after we write to the first sector of /dev/sda.

In the attached build log, it happens twice.  Search for the
error message "/dev/sda1: No such file or directory"

Comment 1 Richard W.M. Jones 2014-09-14 11:47:40 UTC
Ugh.

Turns out to be a stupid udev rule.  Whenever you close a device,
the kernel sends a "change" event to udev which fires off a whole
set of rules.  It runs at least: scsi_id, path_id, blkid.  And these
operations overlap the subsequent mkfs or other operation.

More udev workarounds needed.

Thanks agk for pointing me in the right direction.

Comment 2 Richard W.M. Jones 2014-09-14 13:03:00 UTC
Added a workaround:

https://github.com/libguestfs/libguestfs/commit/4515413217c7d4a6fe026254bffa6f82746047c4


Note You need to log in before you can comment on or make changes to this bug.