<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>194081</bug_id>
          
          <creation_ts>2007-09-28 12:02 0000</creation_ts>
          <short_desc>sys-apps/portage-2.1.3.10 backtrace during unmerge: OSError: [Errno 16] Device or resource busy</short_desc>
          <delta_ts>2007-10-03 20:40:33 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Portage Development</product>
          <component>Core - Interface (emerge)</component>
          <version>2.1</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <keywords>InSVN, REGRESSION</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>194041</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>togge.gentoo@gmail.com</reporter>
          <assigned_to>dev-portage@gentoo.org</assigned_to>
          <cc>chad.simmons@member.fsf.org</cc>
    
    <cc>rose@rz.uni-potsdam.de</cc>
    
    <cc>srrijkers@gmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>togge.gentoo@gmail.com</who>
            <bug_when>2007-09-28 12:02:41 0000</bug_when>
            <thetext>While emerge depcleans unmerge action the following backtrace occurred:
 
 --- !empty   dir /var/www
 Traceback (most recent call last):
   File &quot;/usr/bin/emerge&quot;, line 6529, in ?
     retval = emerge_main()
   File &quot;/usr/bin/emerge&quot;, line 6516, in emerge_main
     myopts, myaction, myfiles, spinner)
   File &quot;/usr/bin/emerge&quot;, line 5707, in action_depclean
     &quot;unmerge&quot;, cleanlist, ldpath_mtimes)
   File &quot;/usr/bin/emerge&quot;, line 4340, in unmerge
     vartree=vartree, ldpath_mtimes=ldpath_mtimes)
   File &quot;/usr/lib/portage/pym/portage.py&quot;, line 4304, in unmerge
     ldpath_mtimes=ldpath_mtimes)
   File &quot;/usr/lib/portage/pym/portage.py&quot;, line 7390, in unmerge
     self._unmerge_pkgfiles(pkgfiles, others_in_slot)
   File &quot;/usr/lib/portage/pym/portage.py&quot;, line 7632, in _unmerge_pkgfiles
     os.rmdir(obj)
 OSError: [Errno 16] Device or resource busy: &apos;/var&apos;                       [     !! ]

I get this only on the unmerge phase of an installed package, that is not during  cleaning of an older version ( emerge: ... merge foo-1.1 -&gt; clean foo-1.0 )

Portage 2.1.3.10 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r4, 2.6.21-gentoo-r4 i686)
=================================================================
System uname: 2.6.21-gentoo-r4 i686 Pentium III (Coppermine)
Timestamp of tree: Fri, 28 Sep 2007 04:00:01 +0000
distcc[9149] (dcc_set_trace_from_env) ERROR: failed to open logfile /var/log/distcc.log: Permission denied [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.10
sys-devel/binutils:  2.17-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS=&quot;x86&quot;
CBUILD=&quot;i686-pc-linux-gnu&quot;
CFLAGS=&quot;-Os -march=pentium3 -fomit-frame-pointer&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/share/X11/xkb&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/env.d/java/ /etc/gconf /etc/init.d /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo&quot;
CXXFLAGS=&quot;-Os -march=pentium3 -fomit-frame-pointer&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
EMERGE_DEFAULT_OPTS=&quot;--usepkg&quot;
FEATURES=&quot;ccache distcc distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch&quot;
GENTOO_MIRRORS=&quot;http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/&quot;
LANG=&quot;en_US.utf8&quot;
MAKEOPTS=&quot;-j3&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/var/www/localhost/htdocs/pub/gentoo/portage-overlay/local-overlay&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;X aac acl acpi apache apache2 authdaemond bash-completion berkdb bitmap-fonts bzip2 cli cracklib crypt curl cvsgraph dri enscript fam font-server gdbm geoip gif gpm iconv idn imap ipv6 isdnlog java javascript jpeg libwww maildir midi mime mmx mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl php png pppd python readline reflection ruby sasl session spell spl ssl symlink tcltk tcpd tiff truetype-fonts type1-fonts unicode x86 xml xorg zlib&quot; ALSA_CARDS=&quot;ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci&quot; ALSA_PCM_PLUGINS=&quot;adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol&quot; ELIBC=&quot;glibc&quot; INPUT_DEVICES=&quot;keyboard mouse&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;none dummy nvidia&quot;
Unset:  CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Reproducible: Always

Steps to Reproduce:</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>chad.simmons@member.fsf.org</who>
            <bug_when>2007-09-28 12:21:40 0000</bug_when>
            <thetext>same issue here with an emerge -C tunesbrowser

chadgentoo tmp # emerge -C tunesbrowser

 media-sound/tunesbrowser
    selected: 0.3.0-r1
   protected: none
     omitted: none

&gt;&gt;&gt; &apos;Selected&apos; packages are slated for removal.
&gt;&gt;&gt; &apos;Protected&apos; and &apos;omitted&apos; packages will not be removed.

&gt;&gt;&gt; Waiting 5 seconds before starting...
&gt;&gt;&gt; (Control-C to abort)...
&gt;&gt;&gt; Unmerging in: 5 4 3 2 1
&gt;&gt;&gt; Unmerging media-sound/tunesbrowser-0.3.0-r1...
No package files given... Grabbing a set.
--- !found   obj /usr/share/tunesbrowser.glade
--- !found   obj /usr/share/tips.txt
--- !found   obj /usr/share/soundfile.png
--- !found   obj /usr/share/sound2.png
--- !found   obj /usr/share/sound1.png
--- !found   obj /usr/share/man/man1/tunesbrowser.1.bz2
--- !found   obj /usr/share/doc/tunesbrowser-0.3.0-r1/ChangeLog.bz2
--- !found   obj /usr/share/doc/tunesbrowser-0.3.0-r1/AUTHORS.bz2
--- !found   dir /usr/share/doc/tunesbrowser-0.3.0-r1
--- !found   obj /usr/share/comp.red.png
--- !found   obj /usr/share/comp.blue.png
--- !found   obj /usr/bin/tunesbrowser
--- !empty   dir /usr/share/man/man1
--- !empty   dir /usr/share/man
--- !empty   dir /usr/share/doc
--- !empty   dir /usr/share
--- !empty   dir /usr/bin
Traceback (most recent call last):
  File &quot;/usr/bin/emerge&quot;, line 6529, in &lt;module&gt;
    retval = emerge_main()
  File &quot;/usr/bin/emerge&quot;, line 6509, in emerge_main
    mtimedb[&quot;ldpath&quot;]):
  File &quot;/usr/bin/emerge&quot;, line 4340, in unmerge
    vartree=vartree, ldpath_mtimes=ldpath_mtimes)
  File &quot;/usr/lib64/portage/pym/portage.py&quot;, line 4304, in unmerge
    ldpath_mtimes=ldpath_mtimes)
  File &quot;/usr/lib64/portage/pym/portage.py&quot;, line 7390, in unmerge
    self._unmerge_pkgfiles(pkgfiles, others_in_slot)
  File &quot;/usr/lib64/portage/pym/portage.py&quot;, line 7632, in _unmerge_pkgfiles
    os.rmdir(obj)
OSError: [Errno 16] Device or resource busy: &apos;/usr&apos;
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-09-28 12:44:08 0000</bug_when>
            <thetext>*** Bug 194083 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>srrijkers@gmail.com</who>
            <bug_when>2007-09-28 17:04:19 0000</bug_when>
            <thetext>Exact same thing here (-C gentoo-sources) on ~x86, portage 2.1.3.10.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zmedico@gentoo.org</who>
            <bug_when>2007-09-28 17:20:08 0000</bug_when>
            <thetext>Created an attachment (id=132105)
ignore EBUSY during unmerge

If this patch is saved as /tmp/ebusy.patch, then it can be applied as follows:

patch /usr/lib/portage/pym/portage.py &lt; /tmp/ebusy.patch

I&apos;ve masked portage-2.1.3.10 to prevent others from hitting this bug.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zmedico@gentoo.org</who>
            <bug_when>2007-09-28 23:17:01 0000</bug_when>
            <thetext>This has been released in 2.1.3.11.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>arfrever@gentoo.org</who>
            <bug_when>2007-10-03 18:29:05 0000</bug_when>
            <thetext>FIXED?</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>132105</attachid>
            <date>2007-09-28 17:20 0000</date>
            <desc>ignore EBUSY during unmerge</desc>
            <filename>ebusy.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IHB5bS9wb3J0YWdlLnB5Cj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHB5bS9wb3J0YWdlLnB5CShyZXZp
c2lvbiA3ODY5KQorKysgcHltL3BvcnRhZ2UucHkJKHJldmlzaW9uIDc4NzApCkBAIC03NDcxLDcg
Kzc0NzEsMTMgQEAKIAogCQkJI3Byb2Nlc3Mgc3ltbGlua3Mgc2Vjb25kLXRvLWxhc3QsIGRpcmVj
dG9yaWVzIGxhc3QuCiAJCQlteWRpcnMgPSBbXQotCQkJaWdub3JlZF91bmxpbmtfZXJybm9zID0g
KGVycm5vLkVOT0VOVCwgZXJybm8uRU5PVERJUiwgZXJybm8uRUlTRElSKQorCQkJaWdub3JlZF91
bmxpbmtfZXJybm9zID0gKAorCQkJCWVycm5vLkVCVVNZLCBlcnJuby5FTk9FTlQsCisJCQkJZXJy
bm8uRU5PVERJUiwgZXJybm8uRUlTRElSKQorCQkJaWdub3JlZF9ybWRpcl9lcnJub3MgPSAoCisJ
CQkJZXJybm8uRUVYSVNULCBlcnJuby5FTk9URU1QVFksCisJCQkJZXJybm8uRUJVU1ksIGVycm5v
LkVOT0VOVCwKKwkJCQllcnJuby5FTk9URElSLCBlcnJuby5FSVNESVIpCiAJCQltb2Rwcm90ZWN0
ID0gb3MucGF0aC5qb2luKHNlbGYudmFydHJlZS5yb290LCAibGliL21vZHVsZXMvIikKIAogCQkJ
ZGVmIHVubGluayhmaWxlX25hbWUsIGxzdGF0b2JqKToKQEAgLTc2MzYsOSArNzY0Miw3IEBACiAJ
CQkJCQkJYnNkX2NoZmxhZ3MuY2hmbGFncyhwYXJlbnRfbmFtZSwgcGZsYWdzKQogCQkJCQlzaG93
X3VubWVyZ2UoIjw8PCIsICIiLCAiZGlyIiwgb2JqKQogCQkJCWV4Y2VwdCBFbnZpcm9ubWVudEVy
cm9yLCBlOgotCQkJCQlpZiBlLmVycm5vIG5vdCBpbiAoZXJybm8uRU5PRU5ULAotCQkJCQkJZXJy
bm8uRUVYSVNULCBlcnJuby5FTk9URU1QVFksCi0JCQkJCQllcnJuby5FTk9URElSKToKKwkJCQkJ
aWYgZS5lcnJubyBub3QgaW4gaWdub3JlZF9ybWRpcl9lcnJub3M6CiAJCQkJCQlyYWlzZQogCQkJ
CQlpZiBlLmVycm5vICE9IGVycm5vLkVOT0VOVDoKIAkJCQkJCXNob3dfdW5tZXJnZSgiLS0tIiwg
IiFlbXB0eSIsICJkaXIiLCBvYmopCg==
</data>        

          </attachment>
    </bug>

</bugzilla>