Bug 726025

Summary: Stale mounts after closing schroot
Product: [Fedora] Fedora Reporter: Andris Pavenis <andris.pavenis>
Component: schrootAssignee: Zach Carter <os>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: os
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: schroot-1.4.23-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-26 19:06:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
schroot configuration file none

Description Andris Pavenis 2011-07-27 10:50:12 UTC
Description of problem:

Schroot works OK (I have CentOS in chroots under F15), but when I close shell,
I'm getting error messages:

E: 10mount: umount: /var/lib/schroot/mount/centos-i386-45be89ec-a808-4083-aa9a-f33b6ca7c87d/dev/hugepages: Too many levels of symbolic links
E: centos-i386-45be89ec-a808-4083-aa9a-f33b6ca7c87d: Chroot setup failed: stage=setup-stop

and df shows that following mounts are not closed:
/dev/sda5             62955112  26189816  33515752  44% /var/lib/schroot/mount/centos-i386-45be89ec-a808-4083-aa9a-f33b6ca7c87d
tmpfs                  1992432         0   1992432   0% /var/lib/schroot/mount/centos-i386-45be89ec-a808-4083-aa9a-f33b6ca7c87d/sys/fs/cgroup
udev                   1983192         0   1983192   0% /var/lib/schroot/mount/centos-i386-45be89ec-a808-4083-aa9a-f33b6ca7c87d/dev
tmpfs                  1992432      3256   1989176   1% /var/lib/schroot/mount/centos-i386-45be89ec-a808-4083-aa9a-f33b6ca7c87d/dev/shm

I can of course unmount them manually:

for x in /var/lib/schroot/mount/*; do umount -l $x; done

(dos not work without command line parameter -l), but perhaps some resource leak still remains

Running schroot more than once stale directories accumulates.



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

kernel 2.6.38.8-5.x86_64
schroot-1.4.21-1.fc15.x86_64

How reproducible:

Always


Steps to Reproduce:
1. Create some chroot using schroot configuration (if not already done)
2. from shell 'schroot -pc <chroot_name>'
3. close schroot
  
Actual results:

Error messages like mentioned above
Directories not unmounted

Expected results:

No error messages
/var/lib/schroot/mounts/* which belongs to the current session being unmounted

Comment 1 Andris Pavenis 2011-07-27 10:55:50 UTC
Created attachment 515471 [details]
schroot configuration file

Comment 2 Zach Carter 2011-07-27 15:52:48 UTC
I have a feeling you've hit this bug:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622756

To confirm, can you please edit the /etc/schroot/default/fstab file, change all entries from rbind to bind, and see if the problem goes away?

thanks.

Comment 3 Andris Pavenis 2011-07-27 17:10:02 UTC
Tried. It fixes problem.

Changes below:

*** fstab.orig  2011-07-27 20:04:43.000000000 +0300
--- fstab       2011-07-27 20:07:52.000000000 +0300
***************
*** 3,10 ****
  # (CHROOT_PATH)
  #
  # <file system>       <mount point>   <type>  <options>       <dump>  <pass>
! /proc         /proc           none    rw,rbind        0       0
! /sys          /sys            none    rw,rbind        0       0
! /dev            /dev            none    rw,rbind        0       0
  /home         /home           none    rw,bind         0       0
  /tmp          /tmp            none    rw,bind         0       0
--- 3,10 ----
  # (CHROOT_PATH)
  #
  # <file system>       <mount point>   <type>  <options>       <dump>  <pass>
! /proc         /proc           none    rw,bind        0       0
! /sys          /sys            none    rw,bind        0       0
! /dev            /dev            none    rw,bind        0       0
  /home         /home           none    rw,bind         0       0
  /tmp          /tmp            none    rw,bind         0       0

Comment 4 Fedora Update System 2011-07-27 20:40:27 UTC
schroot-1.4.23-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/schroot-1.4.23-1.fc15

Comment 5 Andris Pavenis 2011-07-28 06:54:01 UTC
Installed a new RPM package downloaded from koji.fedoraproject.org.
Seems OK for me.

Comment 6 Fedora Update System 2011-07-31 04:02:53 UTC
Package schroot-1.4.23-1.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing schroot-1.4.23-1.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/schroot-1.4.23-1.fc15
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2011-08-26 19:06:51 UTC
schroot-1.4.23-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.