Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 543774 - sys-apps/portage: triggering a sandbox violation during portage dep generation fails badly: * ISE:write_logfile: unable to append logfile: ...
Summary: sys-apps/portage: triggering a sandbox violation during portage dep generatio...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-19 10:18 UTC by Martin Mokrejš
Modified: 2015-09-28 22:11 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2015-03-19 10:18:03 UTC
By mistake when renaming a file in SRC_URI I made ebuild to crash badly (two line shown below):

EAPI=5
SRC_URI="https://github.com/TransDecoder/TransDecoder/archive/"${PV}".tar.gz" -> ${P}.tar.gz

...


I believe this bug should be used to derive a separate app-shells/bash-4.2_p47 bug while this report itself should stay about sys-apps/portage-2.2.15.


$ ebuild transdecoder-2.0.1.ebuild digest
 * ACCESS DENIED:  open_wr:      /usr/lib64/python2.7/site-packages/transdecoder-2.0.1.tar.gz
 * ISE:write_logfile: unable to append logfile: sci-biology_-_transdecoder-2.0.1
 * ../../sandbox-2.6/libsandbox/libsandbox.c:check_syscall():879: failure (Bad file descriptor):
 * ISE:
        abs_path: /usr/lib64/python2.7/site-packages/transdecoder-2.0.1.tar.gz
        res_path: /usr/lib64/python2.7/site-packages/transdecoder-2.0.1.tar.gz
/usr/lib64/libsandbox.so(+0xac62)[0x7f8b61ff9c62]
/usr/lib64/libsandbox.so(+0xad5d)[0x7f8b61ff9d5d]
/usr/lib64/libsandbox.so(+0x552e)[0x7f8b61ff452e]
/usr/lib64/libsandbox.so(open+0x6c)[0x7f8b61ff88ac]
/bin/bash[0x4627a2]
/bin/bash(do_redirections+0x52)[0x462e42]
/bin/bash[0x42dd55]
/bin/bash(execute_command_internal+0xe5a)[0x42f44a]
/bin/bash(parse_and_execute+0x1c5)[0x46a7c5]
/bin/bash[0x46a1e3]
/proc/30307/cmdline: /bin/bash /usr/lib/portage/python2.7/ebuild.sh depend 

/home/mmokrejs/proj/sci/sci-biology/transdecoder/transdecoder-2.0.1.ebuild: line 11: 30307 Aborted                 (core dumped) SRC_URI="https://github.com/TransDecoder/TransDecoder/archive/"${PV}".tar.gz" - > "${P}".tar.gz
>>> Creating Manifest for /home/mmokrejs/proj/sci/sci-biology/transdecoder
$
Comment 1 SpanKY gentoo-dev 2015-09-28 05:05:46 UTC
i think this is portage not setting up the sandbox env vars properly, and not checking the log status after the depend phase

SANDBOX_LOG is set to a relative path ("sci-biology_-_transdecoder-2.0.1"), and the working directory is somewhere weird/bad (/usr/lib64/python2.7/site-packages/).  portage should really be setting the sandbox.log to a constant location like $T/sandbox.log even during depend phases.
Comment 2 Zac Medico gentoo-dev 2015-09-28 22:11:58 UTC
Yeah, the EbuildMetadataPhase class need to be fixed to handle SANDBOX_LOG. I guess we can have it just create a temporary file, since creating directories seems like overkill.

The invalid SANDBOX_LOG setting comes from here:

pym/portage/package/ebuild/doebuild.py: mysettings["SANDBOX_LOG"] = mycpv.replace("/", "_-_")