Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Firefox 10 and sandbox
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
rolypoly
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2003
Posts: 143

PostPosted: Thu Feb 09, 2012 7:02 am    Post subject: [Solved] Firefox 10 and sandbox Reply with quote

I am trying to upgrade Firefox from 9.0 to 10.0. As you see from the logs, below, it appears to complete building the source code, but then get a sandbox access error.
Code:
speedy cacerts # tail -n 40 /var/tmp/portage/www-client/firefox-10.0/temp/build.log
make[7]: Entering directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/browser/devtools/shared'
make[7]: Nothing to be done for `tools'.
make[7]: Leaving directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/browser/devtools/shared'
make[6]: Leaving directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/browser/devtools'
make -C app tools
make[6]: Entering directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/browser/app'
make -C profile/extensions tools
make[7]: Entering directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/browser/app/profile/extensions'
make -C {972ce4c6-7e08-4474-a285-3208198ce6fd} tools
make[8]: Entering directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/browser/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}'
make[8]: Nothing to be done for `tools'.
make[8]: Leaving directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/browser/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}'
make[7]: Leaving directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/browser/app/profile/extensions'
make[6]: Leaving directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/browser/app'
make[5]: Leaving directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/browser'
make[4]: Leaving directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu'
make[3]: Leaving directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu'
if test -d ./dist/bin ; then touch ./dist/bin/.purgecaches ; fi
make[2]: Leaving directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu'
make[1]: Leaving directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release'
>>> Source compiled.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE "/var/log/sandbox/sandbox-5382.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: open_wr
S: deny
P: /dev/nvidiactl
A: /dev/nvidiactl
R: /dev/nvidiactl
C: /var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/dist/firefox/firefox-bin -no-remote -profile /var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/_profile/pgo/pgoprofile/ http://localhost:8888/index.html
--------------------------------------------------------------------------------


Can anyone suggest what might be causing this?
I can provide emerge info details if anyone wants it.

Roland.


Last edited by rolypoly on Thu Feb 09, 2012 9:54 am; edited 1 time in total
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 8869
Location: beyond the rim

PostPosted: Thu Feb 09, 2012 9:13 am    Post subject: Reply with quote

First, the access violation doesn't appear at the end of the build, what you see is just the summary, the actual violation is somewhere earlier.
As for the reason, it's a pretty wild guess, but I think it's caused by trying to make a profiled build by executing firefox, which for some reason tries to write to /dev/nvidiactl.
Back to top
View user's profile Send private message
rolypoly
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2003
Posts: 143

PostPosted: Thu Feb 09, 2012 9:53 am    Post subject: Reply with quote

Genone, I think your wild guess is on the money.
I removed the pgo use flag and now it compiles perfectly :)

Thanks,
Roland.
Back to top
View user's profile Send private message
elettronik
n00b
n00b


Joined: 31 Dec 2009
Posts: 12

PostPosted: Thu Feb 09, 2012 8:04 pm    Post subject: Reply with quote

I there any way to leave on the pgo flag and don't have sandbox violation? maybe using software rendering only for build and then re-enable accellerated graphics.....
Back to top
View user's profile Send private message
HTS
Guru
Guru


Joined: 20 Feb 2006
Posts: 390
Location: Bristol, UK

PostPosted: Fri Feb 10, 2012 2:16 pm    Post subject: Reply with quote

Hmm as far as I'm concerned this isn't solved. I did:
Code:
julien ~ # chmod 777 /dev/nvidiactl
julien ~ # ls -ld /dev/nvidiactl
crwxrwxrwx 1 root video 195, 255 Feb  8 17:04 /dev/nvidiactl
but the build still fails with PGO. The log doesn't give me clues as to why the build fails apart from those violations:
Code:
make[2]: Leaving directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu'
make[1]: Leaving directory `/var/tmp/portage/www-client/firefox-10.0/work/mozilla-release'
>>> Source compiled.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE "/var/log/sandbox/sandbox-15763.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: chmod
S: deny
P: /dev/nvidiactl
A: /dev/nvidiactl
R: /dev/nvidiactl
C: /var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/dist/firefox/firefox-bin -no-remote -profile /var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/_profile/pgo/pgoprofile/ http://localhost:8888/index.html

F: chown
S: deny
P: /dev/nvidiactl
A: /dev/nvidiactl
R: /dev/nvidiactl
C: /var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/dist/firefox/firefox-bin -no-remote -profile /var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/_profile/pgo/pgoprofile/ http://localhost:8888/index.html

F: open_wr
S: deny
P: /dev/nvidiactl
A: /dev/nvidiactl
R: /dev/nvidiactl
C: /var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/dist/firefox/firefox-bin -no-remote -profile /var/tmp/portage/www-client/firefox-10.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/_profile/pgo/pgoprofile/ http://localhost:8888/index.html
--------------------------------------------------------------------------------

>>> Failed to emerge www-client/firefox-10.0, Log file:

>>>  '/var/tmp/portage/www-client/firefox-10.0/temp/build.log'

_________________
64bit Gentoo on dual Xeon X5650 (24 ht cores), 18GB DDR3 Ram, nVidia Quadro 2000, 128GB Crucial SSD
Back to top
View user's profile Send private message
marens
Apprentice
Apprentice


Joined: 05 Aug 2004
Posts: 172

PostPosted: Fri Feb 10, 2012 10:42 pm    Post subject: Reply with quote

in the ebuild

Code:
src_compile() {
  if use pgo; then
  addpredict /dev/nvidiactl
  ...



This was reported some time ago in bugzilla. wondering why it's still a problem.

Please report it at bugzilla if that fixes it for you.

edit:

Code:
src_compile() {
   if use pgo; then
      addpredict /root
      addpredict /etc/gconf
      # Reset and cleanup environment variables used by GNOME/XDG
      gnome2_environment_reset

      # Firefox tries to use dri stuff when it's run, see bug 380283
      shopt -s nullglob
      cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
      if test -n "${cards}"; then
         # FOSS drivers are fine
         addpredict "${cards}"
      else
         cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g')
         if test -n "${cards}"; then
            # Binary drivers seem to cause access violations anyway, so
            # let's use software rendering so that the device files aren't
            # touched at all. See bug 394715.
            export LIBGL_ALWAYS_SOFTWARE=1
         fi
      fi


seems it should be disabled for binary drivers https://bugs.gentoo.org/show_bug.cgi?id=394715
_________________
If English was good enough for Jesus, then it's good enough for you!


Last edited by marens on Fri Feb 10, 2012 10:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
elettronik
n00b
n00b


Joined: 31 Dec 2009
Posts: 12

PostPosted: Fri Feb 10, 2012 10:52 pm    Post subject: Reply with quote

Thiss is a problem because an build should't access filesystem neither if there a call on a live system lib.
what about the idea of selecting a software openly to use during compilation ?
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4060
Location: Saint Amant, Acadiana

PostPosted: Fri Feb 10, 2012 10:57 pm    Post subject: Reply with quote

I just turned off the sandbox for this build as a workaround.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
HTS
Guru
Guru


Joined: 20 Feb 2006
Posts: 390
Location: Bristol, UK

PostPosted: Fri Mar 09, 2012 3:46 pm    Post subject: Reply with quote

Jaglover wrote:
I just turned off the sandbox for this build as a workaround.

Sorry for being a n00b but how would I turn the sandbox off?
_________________
64bit Gentoo on dual Xeon X5650 (24 ht cores), 18GB DDR3 Ram, nVidia Quadro 2000, 128GB Crucial SSD
Back to top
View user's profile Send private message
marens
Apprentice
Apprentice


Joined: 05 Aug 2004
Posts: 172

PostPosted: Fri Mar 09, 2012 7:26 pm    Post subject: Reply with quote

HTS wrote:
Jaglover wrote:
I just turned off the sandbox for this build as a workaround.

Sorry for being a n00b but how would I turn the sandbox off?


FEATURES="-sandbox"; emerge firefox

try that ^
_________________
If English was good enough for Jesus, then it's good enough for you!
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