Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 475910 - =sys-apps/systemd-205 - ACCESS DENIED: unlinkat: /usr/src/linux-3.10.0-gentoo/.5819.tmp
Summary: =sys-apps/systemd-205 - ACCESS DENIED: unlinkat: /usr/src/linux-3.10.0-g...
Status: RESOLVED DUPLICATE of bug 469210
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Miscellaneous
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-06 06:41 UTC by Franz Trischberger
Modified: 2014-06-10 01:26 UTC (History)
3 users (show)

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


Attachments
environment.bz2 (environment.bz2,55.08 KB, application/x-bzip2)
2013-07-06 18:49 UTC, Franz Trischberger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Trischberger 2013-07-06 06:41:49 UTC
When trying to update systemd to v. 205 I get loads of those messages:

Executing pretend actions: 5 of 13
systemd-205>  * Determining the location of the kernel source code
systemd-205>  * Found kernel source directory:
systemd-205>  *     /usr/src/linux
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.10.0-gentoo/.5819.tmp
 * ISE:write_logfile: unable to append logfile: /var/log/sandbox/sandbox-5616.log
 * ../../sandbox-2.6/libsandbox/libsandbox.c:check_syscall():879: failure (Bad file descriptor):
 * ISE:
	abs_path: /usr/src/linux-3.10.0-gentoo/.5819.tmp
	res_path: /usr/src/linux-3.10.0-gentoo/.5819.tmp
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.10.0-gentoo/.5824.tmp
 * ISE:write_logfile: unable to append logfile: /var/log/sandbox/sandbox-5616.log
 * ../../sandbox-2.6/libsandbox/libsandbox.c:check_syscall():879: failure (Bad file descriptor):
 * ISE:
	abs_path: /usr/src/linux-3.10.0-gentoo/.5824.tmp
	res_path: /usr/src/linux-3.10.0-gentoo/.5824.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.10.0-gentoo/.5824.tmp
 * ISE:write_logfile: unable to append logfile: /var/log/sandbox/sandbox-5616.log
 * ../../sandbox-2.6/libsandbox/libsandbox.c:check_syscall():879: failure (Bad file descriptor):
 * ISE:
	abs_path: /usr/src/linux-3.10.0-gentoo/.5824.tmp
	res_path: /usr/src/linux-3.10.0-gentoo/.5824.tmp

I only get them during "pretend", not when the package actually get's built.
I am using paludis-1.0.4.
Comment 1 Mike Gilbert gentoo-dev 2013-07-06 18:27:00 UTC
Are you able to provide a full logfile?

Also, a dump of the ebuild environment would be helpful. With portage, the would be located in ${PORTAGE_TMPDIR}/portage/sys-apps/systemd-205/temp/environment.
Comment 2 Franz Trischberger 2013-07-06 18:49:30 UTC
Created attachment 352740 [details]
environment.bz2

I hope that what you want (using paludis, so your hint did not help ;))

I do not have any form of log, that output is all. As I said regular build works just fine. It is just some sort of checks it fails. I think this is an error in paludis, though this was the first time I saw this. Previous systemd-versions (installed using the same paludis version) just worked fine.
Comment 3 Mike Gilbert gentoo-dev 2013-07-06 18:58:01 UTC
Unfortunately, I don't see a way to tell what the ebuild is doing at that point unless we can get some more detailed output.

Does paludis have a "debug" mode, similar to emerge --debug?

       --debug (-d)
              Tells emerge to run the emerge command in --debug mode.  In this
              mode  the  bash  build  environment will run with the -x option,
              causing it to output verbose debugging  information  to  stdout.
              This  also enables a plethora of other output (mostly dependency
              resolution messages).

Alternatively, you could try adding some echo statements to various places in linux-info.eclass to try and narrow it down.
Comment 4 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-06 21:35:48 UTC
5819 / 5824 sounds like a PID to me; under the assumption that this is a PID, can we try to figure out which process this is? Might be interesting to run this through `strace -f paludis ...`. Failing that, you could grep for .tmp in our eclasses and Paludis to see if it comes from there.

(De-CC-ed myself to avoid duplicate mails, I'm listening on kernel-misc@g.o)
Comment 5 Franz Trischberger 2013-07-07 08:31:05 UTC
I created the trace as requested (strace -f cave resolve --dump systemd). But compressed with with xz --extreme it still has 1.34 MB.
How should I proceed?
Comment 6 Mike Gilbert gentoo-dev 2013-07-13 23:41:11 UTC
(In reply to Franz Fellner from comment #5)
> How should I proceed?

You could upload the file somewhere an link it. Or find some other way to get us information on what is actually happening here.
Comment 7 Franz Trischberger 2013-07-23 10:41:23 UTC
Finally decided to create a dropbox account ;)
Here you are:
https://www.dropbox.com/s/dzb1wpbg9kqlz64/cave_resolve_systemd.strace.xz

I did not manage to get the actual portage error messages into the file, but searching for "/usr/src/linux" should be enough (IMHO).
Comment 8 Mike Gilbert gentoo-dev 2013-07-24 01:55:57 UTC
[pid  5531] execve("/bin/rm", ["rm", "-f", ".5529.tmp", ".5529.o"], [/* 302 vars */]) = 0
[pid  5531] getcwd("/usr/src/linux-3.10.0-gentoo", 4096) = 29
[pid  5531] lstat("/usr/src/linux-3.10.0-gentoo/.5529.tmp", 0x7fff60073630) = -1 ENOENT (No such fil
e or directory)

So something is running "/bin/rm -f .5529.tmp .5529.o" from /usr/src/linux-3.10.0-gentoo.

I believe it is probably this target in linux/scripts/Kbuild.include:

# try-run
# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
# Exit code chooses option. "$$TMP" is can be used as temporary file and
# is automatically cleaned up.
try-run = $(shell set -e;       \
    TMP="$(TMPOUT).$$$$.tmp";   \
    TMPO="$(TMPOUT).$$$$.o";    \
    if ($(1)) >/dev/null 2>&1;  \
    then echo "$(2)";       \
    else echo "$(3)";       \
    fi;             \
    rm -f "$$TMP" "$$TMPO")

And this is probably being triggered by the getfilevar function in linux-info.eclass.

Maybe we should export TMPOUT="${T}" in getfilevar?
Comment 9 Mike Gilbert gentoo-dev 2013-07-24 01:58:43 UTC
Or maybe add that to BUILDFIXES for all arches?
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-31 21:21:40 UTC
This is linux-info.eclass' fault, correct?
Comment 11 Mike Gilbert gentoo-dev 2013-07-31 21:25:08 UTC
(In reply to Michał Górny from comment #10)
> This is linux-info.eclass' fault, correct?

I believe so. Reassigning.
Comment 12 Kirill Elagin 2014-06-09 21:19:15 UTC
Hello?

I'm migrating to paludis right now, and yeah, there is a bunch of access violations…
Comment 13 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-06-09 21:57:22 UTC

*** This bug has been marked as a duplicate of bug 469210 ***
Comment 14 Timothy Jones 2014-06-10 01:26:21 UTC
(In reply to Kirill Elagin from comment #12)
> Hello?
> 
> I'm migrating to paludis right now, and yeah, there is a bunch of access
> violations…

Kirill, until this gets fixed you can use this overlay:

https://github.com/holliday/holliday