Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

portage fails - errno 16 Device or resource busy

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
22 posts • Page 1 of 1
Author
Message
madman2003
Apprentice
Apprentice
Posts: 178
Joined: Sun Feb 20, 2005 12:59 pm

portage fails - errno 16 Device or resource busy

  • Quote

Post by madman2003 » Sun Sep 10, 2006 7:01 pm

Performing Global Updates: /usr/portage/profiles/updates/3Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
.='update pass' *='binary update' @='/var/db move'
s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
......
ppTraceback (most recent call last):
File "/usr/lib/portage/bin/emerge", line 4049, in ?
emerge_main()
File "/usr/lib/portage/bin/emerge", line 3770, in emerge_main
portage.global_updates(settings, trees, mtimedb["updates"])
File "/usr/lib/portage/pym/portage.py", line 6656, in global_updates
myupd)
File "/usr/lib/portage/pym/portage_update.py", line 198, in update_config_files
write_atomic(updating_file, "".join(file_contents[x]))
File "/usr/lib/portage/pym/portage_util.py", line 728, in write_atomic
f.close()
File "/usr/lib/portage/pym/portage_util.py", line 696, in close
os.rename(self.name, self._real_name)
OSError: [Errno 16] Device or resource busy

It's definately being caused by the 3Q-2006, because i moved it to be sure. With it in place not even --help worked.
Any clue what might cause this?

Mod Edit: mad sticky and changed the topic from 'portage fails at global updates with errno 16' to 'portage fails - errno 16 Device or resource busy' - tomk
Top
avx
Advocate
Advocate
User avatar
Posts: 2152
Joined: Mon Jun 21, 2004 4:06 am

  • Quote

Post by avx » Sun Sep 10, 2006 7:06 pm

Same problem here.

No chance of syncing again or emerge an older portage :(

EDIT:

I overlooked
It's definately being caused by the 3Q-2006, because i moved it to be sure.
before. Emerge works when the file is moved.
Last edited by avx on Sun Sep 10, 2006 7:23 pm, edited 1 time in total.
Top
madman2003
Apprentice
Apprentice
Posts: 178
Joined: Sun Feb 20, 2005 12:59 pm

  • Quote

Post by madman2003 » Sun Sep 10, 2006 7:09 pm

Portage 2.1.1 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.
17-ck1-r3 x86_64)
=================================================================
System uname: 2.6.17-ck1-r3 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.4
Last Sync: Sun, 10 Sep 2006 18:20:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-lang/python: 2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache: [Not Present]
dev-util/confcache: [Not Present]
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.59-r7
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils: 2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -Os -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shu
tdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/shar
e/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms
/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=k8 -Os -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer nostrip sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwe
nte.nl/pub/os/linux/gentoo"
INSTALL_MASK="/usr/bin/emerge"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en nl"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/d
istfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/nouveau /usr/portage/local/layman
/sunrise /usr/portage/local/layman/pro-audio /usr/portage/local/layman/science"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="amd64 X alsa aotuv avi berkdb bitmap-fonts cairo caps cdr cli crypt cups db
us dhcp dlloader dri dvd dvdr eds elibc_glibc emboss encode fam firefox flac for
tran gdbm gif gimpprint gpm gstreamer gtk gtk2 hal input_devices_keyboard input_
devices_mouse ipv6 isdnlog jack jpeg kernel_linux ldap libg++ linguas_en linguas
_nl mad mikmod minimal mp3 mpeg musepack ncurses nls nptl nptlonly nvidia offens
ive ogg oggvorbis opengl pam pcre pdf pdflib perl png ppds pppd python qt3 qt4 q
uicktime readline reflection sdl session spell spl ssl svg tcpd truetype truetyp
e-fonts type1-fonts udev unicode usb userland_GNU video_cards_nouveau video_card
s_nv vorbis xml xorg xv zlib"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, LANG, PORTAGE_RSYNC_EXTRA_OPTS
Top
radfoj
Guru
Guru
User avatar
Posts: 490
Joined: Fri Dec 31, 2004 12:02 pm
Location: Tísek, Czech Republic
Contact:
Contact radfoj
Website

  • Quote

Post by radfoj » Sun Sep 10, 2006 8:21 pm

Same here. We spoke about this in bugzilla: emerge crashes every time I try to use it.
Come on guys there, yours comments are welcome. :D
Top
lyonsd
Apprentice
Apprentice
User avatar
Posts: 153
Joined: Wed Mar 02, 2005 6:00 pm
Location: Flowery Branch, GA

Same problem here

  • Quote

Post by lyonsd » Mon Sep 11, 2006 12:50 pm

Code: Select all

# emerge --sync


Performing Global Updates: /usr/portage/profiles/updates/2Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
........................................


Performing Global Updates: /usr/portage/profiles/updates/3Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
......
pTraceback (most recent call last):
  File "/usr/bin/emerge", line 4049, in ?
    emerge_main()
  File "/usr/bin/emerge", line 3770, in emerge_main
    portage.global_updates(settings, trees, mtimedb["updates"])
  File "/usr/lib/portage/pym/portage.py", line 6656, in global_updates
    myupd)
  File "/usr/lib/portage/pym/portage_update.py", line 198, in update_config_files
    write_atomic(updating_file, "".join(file_contents[x]))
  File "/usr/lib/portage/pym/portage_util.py", line 728, in write_atomic
    f.close()
  File "/usr/lib/portage/pym/portage_util.py", line 696, in close
    os.rename(self.name, self._real_name)
OSError: [Errno 16] Device or resource busy
Dave
Top
Apetrini
Veteran
Veteran
User avatar
Posts: 1158
Joined: Wed Feb 09, 2005 1:24 pm

  • Quote

Post by Apetrini » Wed Sep 13, 2006 2:15 am

I had the same error too. I solved moving package.keywords and package.unmask in another place then type
emerge -pv xxxx (where xxx the name of one packet dbus or nmap for example) and then put back these files on thier original path.

Try...
Linux ape 2.6.31-vanilla. Paludis since 0.28.0.
Top
GladRags
n00b
n00b
Posts: 15
Joined: Tue Jul 11, 2006 6:57 pm

  • Quote

Post by GladRags » Wed Sep 13, 2006 2:35 am

Apetrini wrote:I had the same error too. I solved moving package.keywords and package.unmask in another place then type
emerge -pv xxxx (where xxx the name of one packet dbus or nmap for example) and then put back these files on thier original path.

Try...
I got away with this one by commenting the lines having "kazehakase" in /etc/portage/package.use.

Hope that helps.
Have a pleasant time ahead.
Top
abay
n00b
n00b
Posts: 1
Joined: Mon Sep 18, 2006 3:31 pm
Location: Taiwan

  • Quote

Post by abay » Mon Sep 18, 2006 3:34 pm

re-emerge --sync
Top
optiluca
Guru
Guru
User avatar
Posts: 551
Joined: Mon Jan 16, 2006 5:20 pm
Location: Rivergaro, Italy

  • Quote

Post by optiluca » Sat Oct 28, 2006 12:37 pm

I had this same problem. I simply got rid of this speedup I'd installed previously : http://gentoo-wiki.com/TIP_speed_up_portage_with_cdb , and then it worked...

Hope it helps

Luca
# "Hmm, sounds like your system froze up."
# "I don't know why. It's about 80 degrees in here!"

http://www.rinkworks.com/stupid/cs_mincing.shtml
Top
GNUtoo
Veteran
Veteran
User avatar
Posts: 1919
Joined: Thu May 05, 2005 9:39 pm

  • Quote

Post by GNUtoo » Sat Oct 28, 2006 3:52 pm

Code: Select all

 emerge -av nano


Performing Global Updates: /usr/portage/profiles/updates/4Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
......
Traceback (most recent call last):
  File "/usr/bin/emerge", line 4503, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 4214, in emerge_main
    portage.global_updates(settings, trees, mtimedb["updates"])
  File "/usr/lib/portage/pym/portage.py", line 7128, in global_updates
    trees["/"]["bintree"].move_ent(update_cmd)
  File "/usr/lib/portage/pym/portage.py", line 5510, in move_ent
    self.populate()
  File "/usr/lib/portage/pym/portage.py", line 5755, in populate
    mycat = mytbz2.getfile("CATEGORY").strip()
AttributeError: 'NoneType' object has no attribute 'strip'
what should i do?
Top
GNUtoo
Veteran
Veteran
User avatar
Posts: 1919
Joined: Thu May 05, 2005 9:39 pm

  • Quote

Post by GNUtoo » Sat Oct 28, 2006 4:16 pm

solved see bugzilla for more details
Top
Raboo
n00b
n00b
Posts: 20
Joined: Wed Nov 13, 2002 6:28 pm
Location: Stockholm, Sweden
Contact:
Contact Raboo
Website

  • Quote

Post by Raboo » Sun Oct 29, 2006 4:57 pm

new_to_non_X86 wrote:solved see bugzilla for more details
Do you have an URL?
Top
jancici
Apprentice
Apprentice
Posts: 284
Joined: Tue Jan 27, 2004 8:30 am
Location: Slovakia

  • Quote

Post by jancici » Mon Oct 30, 2006 8:24 am

yes, problem is that 4Q-2006 file is saying about moving packages which are included in portage.keywords or portage.*

- so you need move portage.keyword and portage.* file somewhere else
- then run emerge --sync
- move portage.keywords ..... back
- and it;s working as before
Top
GNUtoo
Veteran
Veteran
User avatar
Posts: 1919
Joined: Thu May 05, 2005 9:39 pm

  • Quote

Post by GNUtoo » Mon Oct 30, 2006 9:23 am

Raboo wrote:
new_to_non_X86 wrote:solved see bugzilla for more details
Do you have an URL?
solved for ME
http://bugs.gentoo.org/show_bug.cgi?id=147010
se comment 30
Top
Zach1188
n00b
n00b
Posts: 64
Joined: Fri Oct 13, 2006 5:52 pm

  • Quote

Post by Zach1188 » Wed Nov 08, 2006 12:25 am

Thanks, I got it working again, but it happens again every time I do emerge --sync, forcing me to re-untar the portage tarball.
Top
Autie
Guru
Guru
User avatar
Posts: 309
Joined: Fri Jul 25, 2003 11:13 pm
Location: Ledegem - Belgium
Contact:
Contact Autie
Website

  • Quote

Post by Autie » Tue Dec 12, 2006 9:19 pm

re-sync, emerge portage did the tric for me
The capacity to learn is a gift; The ability to learn is a skill; The willingness to learn is a choice.
Top
CyD
Tux's lil' helper
Tux's lil' helper
Posts: 117
Joined: Fri Jul 23, 2004 11:04 pm

  • Quote

Post by CyD » Tue Jan 02, 2007 3:00 am

in my case syncing again was not an option, as running emerge <anything> was non-functional, including just typing 'emerge'. anyways, renamed package.keywords real quick, ran emerge with no options, moved package.keywords back, all ok. haven't tried another sync, just went to work updating software.
Top
Non_E
Apprentice
Apprentice
User avatar
Posts: 160
Joined: Tue Jan 17, 2006 2:11 pm
Location: Czech Republic

  • Quote

Post by Non_E » Wed May 23, 2007 9:22 am

I got such error too. The problem was corrupted reiser partition with portage.
Only Sith deals in absolutes.
Top
DonLorenzo
n00b
n00b
Posts: 12
Joined: Fri Jan 26, 2007 12:24 pm

  • Quote

Post by DonLorenzo » Fri Sep 28, 2007 3:44 pm

I also get a OSError: [Errno 16] but in a different context
I cannot unmerge packages anymore:

Code: Select all

Traceback (most recent call last):
  File "/usr/bin/emerge", line 6529, in <module>
    retval = emerge_main()
  File "/usr/bin/emerge", line 6516, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 5707, in action_depclean
    "unmerge", cleanlist, ldpath_mtimes)
  File "/usr/bin/emerge", line 4340, in unmerge
    vartree=vartree, ldpath_mtimes=ldpath_mtimes)
  File "/usr/lib64/portage/pym/portage.py", line 4304, in unmerge
    ldpath_mtimes=ldpath_mtimes)
  File "/usr/lib64/portage/pym/portage.py", line 7390, in unmerge
    self._unmerge_pkgfiles(pkgfiles, others_in_slot)
  File "/usr/lib64/portage/pym/portage.py", line 7632, in _unmerge_pkgfiles
    os.rmdir(obj)
OSError: [Errno 16] Device or resource busy: '/usr'
I don't know what cases the error but I looked into pym/portage.py:

Code: Select all

			for obj in mydirs:
				try:
					if bsd_chflags:
						lstatobj = os.lstat(obj)
						if lstatobj.st_flags != 0:
							bsd_chflags.lchflags(obj, 0)
						parent_name = os.path.dirname(obj)
						# Use normal stat/chflags for the parent since we want to
						# follow any symlinks to the real parent directory.
						pflags = os.stat(parent_name).st_flags
						if pflags != 0:
							bsd_chflags.chflags(parent_name, 0)
					try:
						os.rmdir(obj) ### <----------------- THIS IS LINE 7632 <------------------
					finally:
						if bsd_chflags and pflags != 0:
							# Restore the parent flags we saved before unlinking
							bsd_chflags.chflags(parent_name, pflags)
					show_unmerge("<<<", "", "dir", obj)
				except EnvironmentError, e:
					if e.errno not in (errno.ENOENT,
						errno.EEXIST, errno.ENOTEMPTY,
						errno.ENOTDIR):
						raise
					if e.errno != errno.ENOENT:
						show_unmerge("---", "!empty", "dir", obj)
					del e
So there it does catches EnvironmentErrors (and thus also OSErrors) but raises them again if they do not have the errno explicitly listed which are:
  • errno.ENOENT - No such file or directory
  • errno.EEXIST - File exists
  • errno.ENOTEMPTY - Directory not empty
  • errno.ENOTDIR - Not a directory
(taken from the python docs)

adding
errno.EBUSY - Device or resource busy
to the list solved the symptom (the inability to unmerge stuff) for me but I think it doesn't really solve the problem that the device is busy.
But I have to admit that I don't really understand the process of unmerging so maybe not catching the errno.EBUSY maybe really is a bug. I leave that for others to decide.

yours
//Lorenz
Top
Arfrever
Bodhisattva
Bodhisattva
Posts: 2463
Joined: Sat Apr 29, 2006 5:27 pm
Location: 異世界

  • Quote

Post by Arfrever » Fri Sep 28, 2007 9:59 pm

DonLorenzo wrote:I also get a OSError: [Errno 16] but in a different context
I cannot unmerge packages anymore:

Code: Select all

Traceback (most recent call last):
  File "/usr/bin/emerge", line 6529, in <module>
    retval = emerge_main()
  File "/usr/bin/emerge", line 6516, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 5707, in action_depclean
    "unmerge", cleanlist, ldpath_mtimes)
  File "/usr/bin/emerge", line 4340, in unmerge
    vartree=vartree, ldpath_mtimes=ldpath_mtimes)
  File "/usr/lib64/portage/pym/portage.py", line 4304, in unmerge
    ldpath_mtimes=ldpath_mtimes)
  File "/usr/lib64/portage/pym/portage.py", line 7390, in unmerge
    self._unmerge_pkgfiles(pkgfiles, others_in_slot)
  File "/usr/lib64/portage/pym/portage.py", line 7632, in _unmerge_pkgfiles
    os.rmdir(obj)
OSError: [Errno 16] Device or resource busy: '/usr'
See [bug=194081]Bug 194081[/bug].

Perduodu linkėjimus
Arfrever
Top
DonLorenzo
n00b
n00b
Posts: 12
Joined: Fri Jan 26, 2007 12:24 pm

  • Quote

Post by DonLorenzo » Fri Sep 28, 2007 10:06 pm

yup! that's the one I've been looking for.

Thanks for the link!
Top
think4urs11
Bodhisattva
Bodhisattva
User avatar
Posts: 6659
Joined: Wed Jun 25, 2003 9:51 pm
Location: above the cloud

  • Quote

Post by think4urs11 » Tue Feb 19, 2008 12:34 pm

removed sticky
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Top
Post Reply

22 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic