Bug 618507 - CTRL-C during livecd-creator process doesn't cleanup() properly
CTRL-C during livecd-creator process doesn't cleanup() properly
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: livecd-tools (Show other bugs)
14
All Linux
low Severity medium
: ---
: ---
Assigned To: Brian Lane
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-27 01:46 EDT by Jasper O'neal Hartline
Modified: 2012-08-16 18:38 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-16 18:38:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jasper O'neal Hartline 2010-07-27 01:46:03 EDT
Description of problem:
Problem in Summary

  Installing: libnih                       ##################### [261/706] 
  Installing: upstart-sysvinit             ##################### [262/706] 
  Installing: upstart                      ##################### [263/706] 
^C^C/var/tmp/imgcreate-RpWjtf/install_root/var/lib/rpm: No such file or directory
[root@ip70-190-121-13 tmp]# mount
/dev/sda2 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda3 on /home type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /home/autopsy/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=autopsy)
/dev/sdb1 on /media/36198FEB4325CAB5 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/loop1 on /var/tmp/imgcreate-RpWjtf/install_root type ext3 (rw)
/sys on /var/tmp/imgcreate-RpWjtf/install_root/sys type none (rw,bind)
/proc on /var/tmp/imgcreate-RpWjtf/install_root/proc type none (rw,bind)
/dev/pts on /var/tmp/imgcreate-RpWjtf/install_root/dev/pts type none (rw,bind)
/dev/shm on /var/tmp/imgcreate-RpWjtf/install_root/dev/shm type none (rw,bind)
/var/tmp/imgcreate-RpWjtf/yum-cache on /var/tmp/imgcreate-RpWjtf/install_root/var/cache/yum type none (rw,bind)
[root@ip70-190-121-13 tmp]# losetup -a
/dev/loop0: [0802]:3940446 (/var/tmp/imgcreate-GvY1fH/tmp-OhVgIR/ext3fs.img)
/dev/loop1: [0802]:3965072 (/var/tmp/imgcreate-RpWjtf/tmp-hEsR5u/ext3fs.img)
[root@ip70-190-121-13 tmp]#

CTRL-C leaves bind mounts and loop devices used, imgcreate/var/lib/rpm no such file or directory

 
Version-Release number of selected component (if applicable):
livecd-tools-031-1.fc12.1.i686

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Bruno Wolff III 2010-07-27 10:31:20 EDT
The lazy umount patch that is in the rawhide version of livecd-tools (which you'll need to grab from koji today) should fix this unless not all devices are umounted in this error path.
Comment 2 Jasper O'neal Hartline 2010-07-27 10:55:05 EDT
No the lazy umount doesn't help here because when I hit CTRL-C it seems urlgrabber or yumRepo somewhere is catching my KeyboardInterrupt and simply exiting straight out.

I'm trying to track this down now.

Here is an example:

Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Retrieving file:///pub/repo/rawhide/repodata/repomd.xml ...OK
Retrieving file:///pub/repo/rawhide/repodata/8a0b976967886f5a4abe3710a0b5b2b00e771e5ffa2cb16472e908ad19906946-primary.sqlite.bz2 ...OK
Retrieving file:///pub/repo/rawhide/repodata/2d85828b5fbb0a86822c702ba615da8a96bd8d805a81272732971b7bbd0e9f15-comps-rawhide.xml.gz ...OK
  Installing: control-center-filesystem    ##################### [  1/707] 
  Installing: setup                        ##################### [  2/707] 
  Installing: filesystem                   ##################### [  3/707] 
  Installing: dmz-cursor-themes            ##################### [  4/707] C
/var/tmp/imgcreate-oKO5Mx/install_root/var/lib/rpm: No such file or directory
[root@ip70-190-121-13 tmp]# losetup -a
/dev/loop0: [0802]:3956801 (/var/tmp/imgcreate-oKO5Mx/tmp-GJb7bz/ext3fs.img)
[root@ip70-190-121-13 tmp]# mount | grep install_root
/dev/loop0 on /var/tmp/imgcreate-oKO5Mx/install_root type ext3 (rw)
/sys on /var/tmp/imgcreate-oKO5Mx/install_root/sys type none (rw,bind)
/proc on /var/tmp/imgcreate-oKO5Mx/install_root/proc type none (rw,bind)
/dev/pts on /var/tmp/imgcreate-oKO5Mx/install_root/dev/pts type none (rw,bind)
/dev/shm on /var/tmp/imgcreate-oKO5Mx/install_root/dev/shm type none (rw,bind)
/var/tmp/imgcreate-oKO5Mx/yum-cache on /var/tmp/imgcreate-oKO5Mx/install_root/var/cache/yum type none (rw,bind)
[root@ip70-190-121-13 tmp]#
Comment 3 Bruno Wolff III 2010-07-27 11:50:38 EDT
It might be that we that we need to handle also OSError exceptions when calling urlgrabber and pykickstart.
Comment 4 Jasper O'neal Hartline 2010-07-27 18:28:49 EDT
I am not sure it is raising an OSError here.
in rpmUtils.miscutils there is checkSignals() which is part of Yum package, I can see that they are using sys.exit(1) to exit right out. I also ran across this in another place I think in urlgrabber where they except KeyboardInterrupt and sys.exit(1) again. 

Unfortunately all attempts to locate where I am within all of these modules when the RPM transaction is taking place is failing, so this is preventing me from actually walking through any blocks and seeing why, not only we are just exiting, but if we are not, what is actually going on because of the /var/lib/rpm no such file or directory message, I have a feeling we might be getting into cleanup() or at least around any of the CleanRpmdbLocks functions and these are failing some other way, also causing the bind mounts and loop devices to be left behind (e.g. we don't even get to unmount yet)
Comment 5 Jasper O'neal Hartline 2010-07-27 18:42:45 EDT
Using livecd-creator with --debug and --verbose are also completely useless.
Comment 6 Bug Zapper 2010-07-30 08:52:33 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Jasper O'neal Hartline 2010-08-08 06:43:15 EDT
This is nearly impossible to fix within livecd-creator.

I've tried implementing a signal handler, which has random results since every RPM %post script does a chroot() to the install directory. So sometimes what we need to clean up is or isn't really there.

I've tried forking, and allowin g the parent process to cleanup after the child, which also doesn't work because we chroot early on, in kickstart.py in livecd-creator several other issues.

This needs to be handled either via rpm-python or Yum. Not sure which is better.
Comment 8 Fedora Admin XMLRPC Client 2010-10-21 13:56:24 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 9 Fedora End Of Life 2012-08-16 18:38:26 EDT
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

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