Description of problem: I am running into this issue on a semi-regular basis in the process of building Fedora on ia64. Under certain rpmbuild failure cases mock cleanup will destroy /dev on the build system. Note that this is the REAL /dev, not just inside the chroot. What I believe to be happening is after some rpmbuild failures /dev in the chroot is busy and the umount fails. When mock then does it's cleanup I am guessing it does an rm -rf which would be OK if the chroot /dev was umounted but since it is a bind mount to the real /dev the files in the systems /dev get trashed. I am able to recover if I run /sbin/start_udev on the build system but in the meantime a lot of builds fail, mostly because of the sudden lack of /dev/null. I have also seen this in some cases where I ^c to stop a mock build. Version-Release number of selected component (if applicable): mock-0.7.6-1.fc8 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
I did a little more experimenting with this. It seems that it is the "clean" stage that it runs at the beginning of a mock build that is to fault. If a previous build did not umount /dev in the chroot env then another build that uses the same chroot directory will fail because it does an rm -rf while that old /dev was still mounted. So, we probably have 2 bugs here. The /dev not getting properly unmounted on the previous failed mock build and also the fact that another mock build in the same directory trashes /dev without realizing it is still mounted from the previous build.
Created attachment 233171 [details] patch to umount /dev during initial clean Found it, during the clean stage we umount /proc and /dev/pts but not /dev. This patch adds that.
This is actually fixed in a different way in mock 0.8.0. The 0.8.0 tree is at http://linux.dell.com/git/mock-v2.git and is under review before merging for F9. I'll merge this patch into the 0.7.x trunk.
mock-0.8.4-2.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update mock'
mock-0.8.4-2.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.
mock-0.8.4-2.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update mock'
mock-0.8.4-2.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.
Fedora 6 is affected by this, too. $ rpm -q mock mock-0.7.2-1.fc6.1
I have tagged mock-0.7.7 in the git repo with fixes for this. Since FC6 is almost frozen, I had not planned on pushing this update. If Jesse and Clark agree, we could possibly push it before FC6 freezes completely. Please test 0.7.7 from git to see that it fixes your issue.
I have checked 0.7.7 into FC6 tree and run 'make tag', but I have not run a build yet. Can you please test 0.7.7 before I push it?