Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sys-devel/gettext fails emerge. Sandbox Access Violation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Mrat
n00b
n00b


Joined: 27 Oct 2017
Posts: 15
Location: Argentina

PostPosted: Sat Feb 03, 2018 7:56 pm    Post subject: sys-devel/gettext fails emerge. Sandbox Access Violation Reply with quote

After using 'emerge --update --deep --newuse --ask --verbose @world', the package gettext (which I disabled its 'doc' flag) refuses to compile.

This is what it shows:
Code:
>>> Source configured.
 * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 * LOG FILE: "/var/log/sandbox/sandbox-14367.log"
 *
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: MKDIR
S: deny
P: /usr/tmp/cf8249
A: /usr/tmp/cf8249
R: /usr/tmp/cf8249
C: mkdir /usr/tmp/cf8249
 * --------------------------------------------------------------------------------


Also, it shows this:
Code:
GENTOO_VM=  CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""


And the flags are:
Code:
 * Found these USE flags for sys-devel/gettext-0.19.8.1:
 U I
 + + abi_x86_32  : 32-bit (x86) libraries
 + + acl         : Add support for Access Control Lists
 - - cvs         : When running `autopoint`, use cvs to store the internal development files; this requires cvs at runtime, but will be faster/smaller than raw archives
 + + cxx         : Build support for C++ (bindings, extra libraries, code generation, ...)
 - + doc         : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
 - - emacs       : Add support for GNU Emacs
 - - git         : When running `autopoint`, use git to store the internal development files; this requires git at runtime, but will be faster/smaller than raw archives
 - - java        : Add support for Java
 + + ncurses     : Add ncurses support (console display library)
 + + nls         : Add Native Language Support (using gettext - GNU locale utilities)
 + + openmp      : Build support for the OpenMP (support parallel computing), requires >=sys-devel/gcc-4.2 built with USE="openmp"
 - - static-libs : Build static versions of dynamic libraries as well


Also, if its useful, I have installed in my system the package 'virtual/jdk-1.8.0-r3'
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sat Feb 03, 2018 11:50 pm    Post subject: Reply with quote

check perms of /usr/tmp if it cannot use it.
Back to top
View user's profile Send private message
Mrat
n00b
n00b


Joined: 27 Oct 2017
Posts: 15
Location: Argentina

PostPosted: Sun Feb 04, 2018 2:19 pm    Post subject: Reply with quote

krinn wrote:
check perms of /usr/tmp if it cannot use it.

Well, I checked it and permissions seem to be right
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sun Feb 04, 2018 2:25 pm    Post subject: Reply with quote

Mrat wrote:
seem to be right

define "seem to be"
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30916
Location: here

PostPosted: Sun Feb 04, 2018 2:32 pm    Post subject: Reply with quote

krinn wrote:
Mrat wrote:
seem to be right

define "seem to be"

Post output of
Code:
$ ls -l /var/

because /usr/tmp is a symlink to /var/tmp
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Mrat
n00b
n00b


Joined: 27 Oct 2017
Posts: 15
Location: Argentina

PostPosted: Sun Feb 04, 2018 5:30 pm    Post subject: Reply with quote

krinn wrote:
Mrat wrote:
seem to be right

define "seem to be"

Well, correct me if I'm wrong, but, shouldn't /tmp permissions (normally) be 1777?

fedeliallalinea wrote:
krinn wrote:
Mrat wrote:
seem to be right

define "seem to be"

Post output of
Code:
$ ls -l /var/

because /usr/tmp is a symlink to /var/tmp

Code:
mrat@mrat ~ $ ls -l /var/
total 28
drwxr-xr-x  9 root root 4096 Feb  3 17:53 cache
drwxr-xr-x  5 root root 4096 Feb  4 14:21 db
drwxr-xr-x  2 root root 4096 Sep  6 22:28 empty
drwxr-xr-x 24 root root 4096 Feb  2 16:33 lib
lrwxrwxrwx  1 root root    9 Sep  6 22:28 lock -> /run/lock
drwxr-xr-x  9 root root 4096 Feb  4 03:11 log
lrwxrwxrwx  1 root root   15 Feb  2 13:45 mail -> /var/spool/mail
lrwxrwxrwx  1 root root    4 Sep  6 22:28 run -> /run
drwxr-xr-x  6 root root 4096 Feb  2 13:45 spool
drwxrwxrwt  3 root root 4096 Feb  4 14:23 tmp
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Sun Feb 04, 2018 5:46 pm    Post subject: Reply with quote

Since this is a sandbox violation, actual permissions do not matter. What matters is that the package is attempting to write to an area that the sandbox (rightly) disallows. The package should not be writing to any of the system tmp directories, not /tmp, nor /usr/tmp, nor /var/tmp. It should be writing to the reserved temporary directory in the ebuild work area. What package command is causing the mkdir in /usr/tmp?
Back to top
View user's profile Send private message
Mrat
n00b
n00b


Joined: 27 Oct 2017
Posts: 15
Location: Argentina

PostPosted: Sun Feb 04, 2018 9:47 pm    Post subject: Reply with quote

Hu wrote:
Since this is a sandbox violation, actual permissions do not matter. What matters is that the package is attempting to write to an area that the sandbox (rightly) disallows. The package should not be writing to any of the system tmp directories, not /tmp, nor /usr/tmp, nor /var/tmp. It should be writing to the reserved temporary directory in the ebuild work area. What package command is causing the mkdir in /usr/tmp?

The package is sys-devel/gettext

But, to be fair, I also have a Sandbox problem with sys-devel/patch (I can't show at this moment the logs for that one because I'm not at home)
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Mon Feb 05, 2018 1:14 am    Post subject: Reply with quote

The package is sys-devel/gettext, yes, we see that from your earlier output. The package command (that is, the command executed by the package) is some specific command that is blocked by sandbox. We need to know the command and how it is constructed, so that we can determine why it is invoked incorrectly.
Back to top
View user's profile Send private message
Mrat
n00b
n00b


Joined: 27 Oct 2017
Posts: 15
Location: Argentina

PostPosted: Mon Feb 05, 2018 2:26 am    Post subject: Reply with quote

Hu wrote:
The package is sys-devel/gettext, yes, we see that from your earlier output. The package command (that is, the command executed by the package) is some specific command that is blocked by sandbox. We need to know the command and how it is constructed, so that we can determine why it is invoked incorrectly.

Oh, sorry. I don't know where I can get that.

Would you give me a hand for that?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Mon Feb 05, 2018 4:06 am    Post subject: Reply with quote

Start by posting the two log files that the output should have told you to post: build.log and config.log. You probably need to put them in a pastebin; wgetpaste can help with this.
Back to top
View user's profile Send private message
Mrat
n00b
n00b


Joined: 27 Oct 2017
Posts: 15
Location: Argentina

PostPosted: Mon Feb 05, 2018 5:06 am    Post subject: Reply with quote

Hu wrote:
Start by posting the two log files that the output should have told you to post: build.log and config.log. You probably need to put them in a pastebin; wgetpaste can help with this.

Thanks!

I couldn't find config.log, but this is my build.log
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Tue Feb 06, 2018 3:54 am    Post subject: Reply with quote

This appears to be a negative interaction between the sandbox and the upstream package, but something in your system is provoking it while most other systems silently tolerate this quirk. Someone thought it would be a good idea to try to write to various live filesystem directories (this is not a good idea), but only if the directory's permissions appear to permit it (and this is simply pointless - just try it and let it fail). Sandbox lets the real permissions show through, so the test believes that it can write there. Sandbox then rightly denies the write. The question then becomes, why is your system reporting this when no one else does? What is the output of ls -ld /usr/tmp for you?
Back to top
View user's profile Send private message
Mrat
n00b
n00b


Joined: 27 Oct 2017
Posts: 15
Location: Argentina

PostPosted: Tue Feb 06, 2018 9:30 pm    Post subject: Reply with quote

Hu wrote:
This appears to be a negative interaction between the sandbox and the upstream package, but something in your system is provoking it while most other systems silently tolerate this quirk. Someone thought it would be a good idea to try to write to various live filesystem directories (this is not a good idea), but only if the directory's permissions appear to permit it (and this is simply pointless - just try it and let it fail). Sandbox lets the real permissions show through, so the test believes that it can write there. Sandbox then rightly denies the write. The question then becomes, why is your system reporting this when no one else does? What is the output of ls -ld /usr/tmp for you?

Code:
mrat ~ # ls -ld /usr/tmp/
drwxrwxrwt 4 root root 4096 Feb  6 16:32 /usr/tmp/
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Wed Feb 07, 2018 3:07 am    Post subject: Reply with quote

That is as I expected, and is different from standard. I have /usr/tmp as a symbolic link to /var/tmp. Based on an earlier comment, so does fedeliallalinea. I believe the link is the traditional form. This explains why most people do not hit this gettext configure quirk. You can bypass the failure by replacing your directory /usr/tmp with a symbolic link.
Back to top
View user's profile Send private message
Mrat
n00b
n00b


Joined: 27 Oct 2017
Posts: 15
Location: Argentina

PostPosted: Wed Feb 07, 2018 2:20 pm    Post subject: Reply with quote

Hu wrote:
That is as I expected, and is different from standard. I have /usr/tmp as a symbolic link to /var/tmp. Based on an earlier comment, so does fedeliallalinea. I believe the link is the traditional form. This explains why most people do not hit this gettext configure quirk. You can bypass the failure by replacing your directory /usr/tmp with a symbolic link.

Code:
mrat@mrat ~ $ ls -l /usr/
total 284
drwxr-xr-x   2 root root  73728 Feb  7 02:26 bin
drwxr-xr-x 319 root root  20480 Feb  6 22:37 include
lrwxrwxrwx   1 root root      5 Sep  6 22:20 lib -> lib64
drwxr-xr-x  24 root root  32768 Feb  6 22:37 lib32
drwxr-xr-x 113 root root 106496 Feb  7 02:24 lib64
drwxr-xr-x  14 root root   4096 Feb  3 06:02 libexec
drwxr-xr-x   5 root root   4096 Oct 31 23:08 local
drwxr-xr-x 173 root root   4096 Feb  6 14:04 portage
drwxr-xr-x   2 root root  12288 Feb  6 09:48 sbin
drwxr-xr-x 179 root root  12288 Feb  3 21:37 share
drwxr-xr-x   3 root root   4096 Jan  9 11:40 src
lrwxrwxrwx   1 root root      9 Feb  7 02:45 tmp -> /var/tmp/
drwxr-xr-x   6 root root   4096 Sep  6 23:49 x86_64-pc-linux-gnu


/usr/tmp linked to /var/tmp

But I stilll have the problem :(
Back to top
View user's profile Send private message
Mrat
n00b
n00b


Joined: 27 Oct 2017
Posts: 15
Location: Argentina

PostPosted: Fri Feb 16, 2018 9:44 am    Post subject: Reply with quote

I don't know if bumping is allowed on this forum. If it isn't, sorry, but I need help with this

Bump
Back to top
View user's profile Send private message
genterminl
Guru
Guru


Joined: 12 Feb 2005
Posts: 523
Location: Connecticut, USA

PostPosted: Fri Feb 16, 2018 6:14 pm    Post subject: Reply with quote

I don't know if it will work here, but there are two things I have found sometimes work when an emerge fails with this type of sandbox violation.

1) either log in as root or do "su -" instead of just su or sudo. I don't think it's the case here, but sometimes leftover environment variables cause emerge to try to do things in areas the sandbox blocks.

2) the error may have aborted the emerge, but the ebuild phase might have been marked as completed. If so, then you can manually do the rest of the ebuild phases. For example, your first post started with "Source configured." You can try "ebuild /path/to/ebuildfile comiple" then install, then qmerge. I have a package where I almost always need to do this (although the sandbox error is different from yours) and it always works.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Sat Feb 17, 2018 12:43 am    Post subject: Reply with quote

If you still have a problem, please pastebin the current failure. I have dealt with far too many users who say they have "the same" problem when the problem is completely different, so I would rather not speculate further until confirming your problem truly is unchanged.
Back to top
View user's profile Send private message
Mrat
n00b
n00b


Joined: 27 Oct 2017
Posts: 15
Location: Argentina

PostPosted: Thu Feb 22, 2018 11:25 am    Post subject: Reply with quote

genterminl wrote:
I don't know if it will work here, but there are two things I have found sometimes work when an emerge fails with this type of sandbox violation.

1) either log in as root or do "su -" instead of just su or sudo. I don't think it's the case here, but sometimes leftover environment variables cause emerge to try to do things in areas the sandbox blocks.

2) the error may have aborted the emerge, but the ebuild phase might have been marked as completed. If so, then you can manually do the rest of the ebuild phases. For example, your first post started with "Source configured." You can try "ebuild /path/to/ebuildfile comiple" then install, then qmerge. I have a package where I almost always need to do this (although the sandbox error is different from yours) and it always works.

The 1st didn't work neither :(
And the 2nd is (still) not an option for me, I prefer to (at least try to) kill the problem from its roots.
EDIT: Tried to compile 'patch' manually with ebuild and it worked. But I still want to know what is the problem with the Sandbox in my system.

Hu wrote:
If you still have a problem, please pastebin the current failure. I have dealt with far too many users who say they have "the same" problem when the problem is completely different, so I would rather not speculate further until confirming your problem truly is unchanged.

Hi again!

This time I'll also post the build.log from patch, since it has the same problem.
sys-devel/patch build.log
sys-devel/gettext build.log
sys-devel/gettext build-abi_x86_32.x86.log
sys-devel/gettext build-abi_x86_64.amd64.log
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1771
Location: PB, Germany

PostPosted: Wed Mar 27, 2024 1:27 pm    Post subject: Reply with quote

Hi, has this been solved in 2018?
Today I came across this issue again when following the
2024-03-22 Profile upgrade to version 23.0 available
news. Not sure it the issue is still the same, but emerge --emptytree fails here:
Code:
...
checking for msgmerge... (cached) /usr/bin/msgmerge
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating installpaths
config.status: creating po/Makefile
config.status: executing po-directories commands
>>> Source configured.
 * ----------------------- SANDBOX ACCESS VIOLATION SUMMARY -----------------------
 * LOG FILE: "/var/tmp/portage/sys-devel/gettext-0.22.4/temp/sandbox.log"
 *
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line 

F: unlinkat
S: deny
P: /usr/tmp/cf13125
A: /usr/tmp/cf13125
R: /usr/tmp/cf13125
C: rm -f -r /usr/tmp/cf13125
 * --------------------------------------------------------------------------------
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="" JAVA_HOME="/etc/java-config-2/current-system-vm"
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info =gettext-0.22.4

>>> Failed to emerge sys-devel/gettext-0.22.4, Log file:

>>>  '/var/log/portage/sys-devel:gettext-0.22.4:20240327-111459.log.gz'
...

Is anything wrong here?
Code:
# ls -ald /usr/tmp /var/*
lrwxrwxrwx 1 root     root       8 14. Aug 2014  /usr/tmp -> /var/tmp/
drwxr-xr-x 1 root     root      48 28. Jul 2022  /var/account/
drwxr-xr-x 1 root     root     260 26. Mär 10:17 /var/cache/
drwxr-xr-x 1 root     root      80 27. Mär 14:26 /var/db/
drwxrwx--- 1 root     portage   82 28. Jul 2022  /var/delta-webrsync/
drwxr-xr-x 1 root     root      54 18. Jul 2023  /var/empty/
drwxr-xr-x 1 root     root     850 14. Mär 13:52 /var/lib/
lrwxrwxrwx 1 root     root      11 26. Mär 15:25 /var/lock -> ../run/lock/
drwxr-xr-x 1 root     root    2,8K 27. Mär 10:28 /var/log/
lrwxrwxrwx 1 root     root      10 26. Mär 15:39 /var/mail -> spool/mail/
drwxr-xr-x 1 nullmail root      10 27. Apr 2016  /var/nullmailer/
lrwxrwxrwx 1 root     root       6 26. Mär 15:25 /var/run -> ../run/
drwxr-xr-x 1 root     root      86 28. Jul 2022  /var/spool/
drwxrwxrwt 1 root     root      94 27. Mär 12:15 /var/tmp/

_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4554
Location: Germany

PostPosted: Wed Mar 27, 2024 3:36 pm    Post subject: Reply with quote

@Massimo B.,
best is probably remove the old /usr/tmp symlink
see the tip in https://bugs.gentoo.org/647678#c9
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum