Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 205044 - Portage 2.1.4_rc14: The ebuild phase 'unpack' has exited unexpectedly.
Summary: Portage 2.1.4_rc14: The ebuild phase 'unpack' has exited unexpectedly.
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 200044
  Show dependency tree
 
Reported: 2008-01-09 12:07 UTC by Alexander Skwar
Modified: 2008-12-18 18:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
when processing SANDBOX_* variables set LANG=C LC_ALL=C (lang.patch,517 bytes, patch)
2008-01-10 22:20 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Skwar 2008-01-09 12:07:57 UTC
>>> Emerging (1 of 44) sys-libs/pam-0.99.9.0 to /
 * Linux-PAM-0.99.9.0.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                              [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                       [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                      [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                     [ ok ]
 * checking Linux-PAM-0.99.9.0.tar.bz2 ;-) ...                                                                                             [ ok ]
>>> Unpacking source...
>>> Unpacking Linux-PAM-0.99.9.0.tar.bz2 to /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/work
ACCESS DENIED  open_wr:   /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/unpack.INFO
/usr/lib/portage/bin/isolated-functions.sh: line 164: /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/unpack.INFO: Keine Berechtigung
[...]
ACCESS DENIED  open_wr:   /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/Linux-PAM-0.99.7.0-disable-regenerate-man.patch-3254.out
/Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/environment: line 1576: /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/Linux-PAM-0.99.7.0-disable-regenerate-man.patch-3254.out: Keine Berechtigung
[...]
 * The specific snippet of code:
ACCESS DENIED  open_wr:   /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/unpack.ERROR
/usr/lib/portage/bin/isolated-functions.sh: line 164: /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/unpack.ERROR: Keine Berechtigung
 *                   diefunc "$FUNCNAME" "$LINENO" "$?" "Failed Patch: ${patchname}!";
ACCESS DENIED  open_wr:   /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/unpack.ERROR
/usr/lib/portage/bin/isolated-functions.sh: line 164: /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/unpack.ERROR: Keine Berechtigung
 *  The die message:
ACCESS DENIED  open_wr:   /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/unpack.ERROR
/usr/lib/portage/bin/isolated-functions.sh: line 164: /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/unpack.ERROR: Keine Berechtigung
[...]
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-3249.log"

open_wr:   /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/unpack.INFO
[...]
open_wr:   /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/unpack.ERROR
open_wr:   /dev/null
--------------------------------------------------------------------------------
 * The ebuild phase 'unpack' has exited unexpectedly. This type of behavior
 * is known to be triggered by things such as failed variable assignments
 * (bug #190128) or bad substitution errors (bug #200313).

 * Messages for package sys-libs/pam-0.99.9.0:

 * The ebuild phase 'unpack' has exited unexpectedly. This type of behavior
 * is known to be triggered by things such as failed variable assignments
 * (bug #190128) or bad substitution errors (bug #200313).

I've got no idea, why this is:

/usr/lib/portage/bin/isolated-functions.sh: line 164: /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/unpack.ERROR: Keine Berechtigung

askwar@hetzner ~ $ ls -la /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/
insgesamt 8
drwxrwxr-x 2 portage portage 4096  9. Jan 13:06 .
drwxrwxr-x 3 portage portage 4096  9. Jan 13:05 ..

askwar@hetzner ~ $ cd /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging/
askwar@hetzner /Gentoo/Portage/build/portage/sys-libs/pam-0.99.9.0/temp/logging 

$ df -T .
Dateisystem   Typ    1K-Blöcke   Benutzt Verfügbar Ben% Eingehängt auf
/dev/mapper/sys-GentooBuild
              ext3     1550184    325632   1224552  22% /Gentoo/Portage/build

I'm getting this error with every package.
Comment 1 Alexander Skwar 2008-01-09 12:08:13 UTC
askwar@hetzner ~ $ emerge --info
Portage 2.1.4_rc14 (default-linux/x86/2007.0, gcc-4.2.2, glibc-2.7-r1, 2.6.22-gentoo-r2.04.non-hardened i686)
=================================================================
System uname: 2.6.22-gentoo-r2.04.non-hardened i686 AMD Athlon(tm) XP 2000+
Timestamp of tree: Tue, 08 Jan 2008 09:16:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4, 2.5.1-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17-r1, 2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/Gentoo/Portage/build/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="        http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/    http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/      http://ftp.gentoo.or.kr/         http://distfiles.gentoo.org/ "
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de en"
MAKEOPTS="-j2"
PKGDIR="/Gentoo/Portage/packages"
PORTAGE_RSYNC_OPTS="--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-*"
PORTAGE_TMPDIR="/Gentoo/Portage/build"
PORTDIR="/Gentoo/Portage/tree"
PORTDIR_OVERLAY="/Gentoo/Portage/local-tree/misc /Gentoo/Portage/local-tree/overlays/nx/nx/testing /Gentoo/Portage/local-tree/overlays/gentoo-de"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip acl apache2 async bash-completion berkdb bzip2 cap caps ccache checkpath chroot cli cracklib crypt cyrus dcc discard-path dri ecc erandom exif extensions firefox gdbm glep glibc-omitfp hardenedphp iconv idea idled idn imagemagick imap imlib imlib2 isdnlog jikes jpeg kdeenablefinal linuxthreads-tls logrotate lynxkeymap maildir midi mime mmap mmx mmxext mode-owner moznoirc mozsvg mudflap ncurses nls no-old-linux noaudio nocd nodrm nolvm1 nopop3d offensive pam pam-mysql pcre pdf php png posix postfix pppd prelude pyzor razor readline recode reflection reiserfs sasl sendfile server session sftplogging sguil sharedmem spl sse ssl static svg sysvipc szip tcpd threads tiff tokenizer tools unicode utf8 vhosts vim-pager x86 xfs xinetd xorg zlib" ALSA_CARDS="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" ALSA_PCM_PLUGINS="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" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="dummy none"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Zac Medico gentoo-dev 2008-01-09 12:16:23 UTC
Do you remember anything that changed before this started happening? Sandbox isn't working for some reason. Maybe you can do `FEAUTURES=-sandbox emerge sandbox` to rebuild sandbox. 
Comment 3 Alexander Skwar 2008-01-09 12:21:09 UTC
No, I don't remember doing anything "special" - I was in the middle of a (lengthy) update, as I hadn't run emerge -DuvN world for too long.

Now all of a sudden, it broke.

Trying what you suggested:

askwar@hetzner ~ $ FEAUTURES=-sandbox sudo emerge  -1 sandbox
Password:
Calculating dependencies... done!
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) sys-apps/sandbox-1.2.18.1-r2 to /
>>> Downloading 'http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/distfiles/sandbox-1.2.18.1.tar.bz2'
--13:27:02--  http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/distfiles/sandbox-1.2.18.1.tar.bz2
           => `/Gentoo/Portage/build/distfiles/sandbox-1.2.18.1.tar.bz2'
Resolving ftp-stud.fht-esslingen.de... 129.143.116.10
Connecting to ftp-stud.fht-esslingen.de|129.143.116.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 236.755 (231K) [application/x-bzip2]

100%[=====================================================================================================>] 236.755       --.--K/s             

13:27:02 (1.51 MB/s) - `/Gentoo/Portage/build/distfiles/sandbox-1.2.18.1.tar.bz2' saved [236755/236755]

 * checking ebuild checksums ;-) ...                                                                                                       [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                      [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                     [ ok ]
 * checking sandbox-1.2.18.1.tar.bz2 ;-) ...                                                                                               [ ok ]
>>> Unpacking source...
>>> Unpacking sandbox-1.2.18.1.tar.bz2 to /Gentoo/Portage/build/portage/sys-apps/sandbox-1.2.18.1-r2/work
ACCESS DENIED  open_wr:   /Gentoo/Portage/build/portage/sys-apps/sandbox-1.2.18.1-r2/temp/logging/unpack.INFO
/usr/lib/portage/bin/isolated-functions.sh: line 164: /Gentoo/Portage/build/portage/sys-apps/sandbox-1.2.18.1-r2/temp/logging/unpack.INFO: Keine Berechtigung
 * Applying sandbox-1.2.18.1-open-normal-fail.patch ...
[...]

:(

I don't get, why it thinks, that it doesn't have permission to the unpack.INFO file.
Comment 4 Alec Warner (RETIRED) archtester gentoo-dev Security 2008-01-09 14:13:18 UTC
(In reply to comment #3)
> No, I don't remember doing anything "special" - I was in the middle of a
> (lengthy) update, as I hadn't run emerge -DuvN world for too long.
> 
> Now all of a sudden, it broke.
> 
> Trying what you suggested:
> 
> askwar@hetzner ~ $ FEAUTURES=-sandbox sudo emerge  -1 sandbox
> Password:

<snip output>

Try again, but this time spell FEATURES correctly ;)

-Alec
Comment 5 Alexander Skwar 2008-01-09 14:30:53 UTC
Hehe :)

Whaddoyouknow, with a correctly spelled FEATURES, I can build sandbox. Ie. the following worked:

FEATURES=-sandbox emerge -1 sandbox

After I build sandbox that way, I tried to build it once more, but this time with FEATURES=sandbox (sandbox feature enabled). It fails again, just like in comment #3.
Comment 6 Alexander Skwar 2008-01-10 12:38:20 UTC
Update:
It's somehow related to the locale de_DE.UTF-8 (de_DE.utf8).

askwar@hetzner ~ $ LC_ALL=de_DE.utf8 LANG=de_DE.utf8 FEATURES=sandbox sudo emerge -1 sandbox
Calculating dependencies... done!
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) sys-apps/sandbox-1.2.18.1-r2 to /
 * sandbox-1.2.18.1.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                        [ ok ]
 * checking ebuild checksums ;-) ...                                                                                               [ ok ]
 * checking auxfile checksums ;-) ...                                                                                              [ ok ]
 * checking miscfile checksums ;-) ...                                                                                             [ ok ]
 * checking sandbox-1.2.18.1.tar.bz2 ;-) ...                                                                                       [ ok ]
>>> Unpacking source...
>>> Unpacking sandbox-1.2.18.1.tar.bz2 to /Gentoo/Portage/build/portage/sys-apps/sandbox-1.2.18.1-r2/work
ACCESS DENIED  open_wr:   /Gentoo/Portage/build/portage/sys-apps/sandbox-1.2.18.1-r2/temp/logging/unpack.INFO
/usr/lib/portage/bin/isolated-functions.sh: line 164: /Gentoo/Portage/build/portage/sys-apps/sandbox-1.2.18.1-r2/temp/logging/unpack.INFO: Keine Berechtigung
[ etc.pp. ]

But with LANG=C LC_ALL=C (or with unsetting LANG), I'm able to build stuff.

askwar@hetzner ~ $ sudo /usr/sbin/locale-gen --list
de_CH.UTF-8
de_CH.ISO-8859-1
de_DE.UTF-8
de_DE.ISO-8859-1
de_DE.ISO-8859-15@euro
en_US.UTF-8
en_US.ISO-8859-1

askwar@hetzner ~ $ locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

I tried running /usr/sbin/locale-gen, but this hasn't changed anything.

Strange.
Comment 7 Zac Medico gentoo-dev 2008-01-10 22:20:23 UTC
Created attachment 140636 [details, diff]
when processing SANDBOX_* variables set LANG=C LC_ALL=C

It seems like this patch might solve the problem. If it's saved as /tmp/lang.patch then then it can be applied as follows:

patch /usr/lib/portage/bin/ebuild.sh /tmp/lang.patch
Comment 8 Alexander Skwar 2008-01-11 06:44:37 UTC
Thanks for that patch!

I haven't tested it, though. I did a "emerge -e world", and now I can emerge stuff fine again with the usual settings, like:

 LANG=de_DE.UTF-8 FEATURES=sandbox emerge -1 sandbox

No clue what was broken there...

Thanks again, though!
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2008-11-22 16:43:48 UTC
*** Bug 247030 has been marked as a duplicate of this bug. ***
Comment 10 Toralf Förster gentoo-dev 2008-11-26 13:14:07 UTC
Today I got for :
...
>>> Emerging (1 of 4) media-video/ffmpeg-0.4.9_p20070616-r3 to /
 * ffmpeg-0.4.9-p20070616.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                    [ ok ]
...
 * Applying CVE-2008-3162.patch ...                                                                                  [ ok ]
>>> Source unpacked.
 * The ebuild phase 'unpack' has exited unexpectedly. This type of behavior
 * is known to be triggered by things such as failed variable assignments
 * (bug #190128) or bad substitution errors (bug #200313).

however starting emerge again 1 second later the package was emerged fine ...
Comment 11 Zac Medico gentoo-dev 2008-11-26 18:37:59 UTC
This message usually baffles most people so I've updated it to include some
more details:

 * The ebuild phase 'unpack' has exited unexpectedly. This type of behavior
 * is known to be triggered by things such as failed variable assignments
 * (bug #190128) or bad substitution errors (bug #200313). Normally, before
 * exiting, bash should have displayed an error message above. If bash did
 * not produce an error message above, it's possible that the ebuild has
 * called `exit` when it should have called `die` instead. This behavior
 * may also be triggered by a corrupt bash binary or a hardware problem
 * such as memory or cpu malfunction. If the problem is not reproducible or
 * it appears to occur randomly, then it is likely to be triggered by a
 * hardware problem. If you suspect a hardware problem then you should try
 * some basic hardware diagnostics such as memtest. Please do not report
 * this as a bug unless it is consistently reproducible and you are sure
 * that your bash binary and hardware are functioning properly.

In essence, you've probably got either a corrupt bash binary or a hardware
problem.
Comment 12 Zac Medico gentoo-dev 2008-11-26 18:40:01 UTC
*** Bug 248469 has been marked as a duplicate of this bug. ***
Comment 13 Zac Medico gentoo-dev 2008-11-27 01:23:59 UTC
Some things you all have in common are that this happens during the unpack phase with portage-2.1.4.x and FEATURES=parallel-fetch is enabled. Since it hasn't been reported with newer versions of portage (for which parallel-fetch is implemented differently), I think we can assume that it's fixed in >=portage-2.1.6_rc1.
Comment 14 Zac Medico gentoo-dev 2008-11-27 19:27:42 UTC
Hmm, the bugs marked as duplicates of this one are actually all unrelated this one.

(In reply to comment #13)
> Some things you all have in common are that this happens during the unpack
> phase with portage-2.1.4.x and FEATURES=parallel-fetch is enabled.

Thinking some more, the sample size is pretty small and so I'm not really convinced there was a portage bug. I didn't find anything in the code to explain it.
Comment 15 BlinkEye 2008-12-18 18:22:29 UTC
(In reply to comment #14)
> Thinking some more, the sample size is pretty small and so I'm not really
> convinced there was a portage bug. I didn't find anything in the code to
> explain it.

Well, I encountered that error several times now but it was always gone when I emerged a package a second time. The interesting thing is that this error only appears on one box of mine, which is a dedicated root server - obviously from the same provider as that of the OP.

I'm still on sys-apps/portage-2.1.4.5