Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 646026 - www-client/firefox-58.0 - src_install(): sandbox violation in /proc/self/oom_score_adj by /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
Summary: www-client/firefox-58.0 - src_install(): sandbox violation in /proc/self/oom_...
Status: RESOLVED DUPLICATE of bug 604394
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-29 07:38 UTC by Georgy Yakovlev
Modified: 2018-01-30 08:35 UTC (History)
16 users (show)

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


Attachments
build.log.gz (ff-build.log.gz,57.86 KB, application/gzip)
2018-01-29 07:38 UTC, Georgy Yakovlev
Details
sandbox log (sandbox-61515.log,557 bytes, text/plain)
2018-01-29 07:38 UTC, Georgy Yakovlev
Details
Remove notify on build completion (moz_no_notify_send.patch,1.07 KB, patch)
2018-01-29 17:41 UTC, Sven B.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Georgy Yakovlev archtester gentoo-dev 2018-01-29 07:38:09 UTC
Hi, trying to build freshly added firefox.

 * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 * LOG FILE: "/var/log/sandbox/sandbox-61515.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: /proc/self/oom_score_adj
A: /proc/self/oom_score_adj
R: /proc/61641/oom_score_adj
C: /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session

F: open_wr
S: deny
P: /proc/self/oom_score_adj
A: /proc/self/oom_score_adj
R: /proc/61641/oom_score_adj
C: /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
 * --------------------------------------------------------------------------------



Portage 2.3.19 (python 3.5.4-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-6.4.0, glibc-2.25-r9, 4.15.0-gentoo-reaper x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.15.0-gentoo-reaper-x86_64-AMD_Ryzen_Threadripper_1950X_16-Core_Processor-with-gentoo-2.4.1
KiB Mem:    65883624 total,  56242180 free
KiB Swap:    8388600 total,   8388600 free
Timestamp of repository gentoo: Mon, 29 Jan 2018 05:46:00 +0000
Head commit of repository gentoo: d8fcc45b8b80f8f4840d76ff5950b6dcd805ad0d

Timestamp of repository rust: Sat, 27 Jan 2018 13:00:22 +0000
Head commit of repository rust: fb5604de1db4aba58293394d700216d9af1c1cdf

Head commit of repository steam-overlay: 3413c387e5026226d29b04f97c0846f536364ba9

sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

gyakovlev
    location: /var/db/repos/gyakovlev
    masters: gentoo

rust
    location: /var/db/repos/rust
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/rust.git
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask-enter-invalid --jobs=16  --load-average 32"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/ http://gentoo.mirrors.pair.com/ http://mirrors.rit.edu/gentoo/ http://cosmos.illinois.edu/pub/gentoo/ http://mirror.lug.udel.edu/pub/gentoo/ http://lug.mtu.edu/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j32 -l32"
PKGDIR="/var/cache/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus declarative djvu dri dts dvd dvdr emboss encode exif fam fbcon firefox flac fortran gdbm gif glamor gpm gtk iconv icu idn introspection ios ipv6 jpeg kde kipi kwallet lcms libnotify lm_sensors lzma lzo mad mng modules mp3 mp4 mpeg multilib ncurses nls nptl numa ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt5 readline seccomp semantic-desktop spell ssl startup-notification svg tiff truetype udev unicode urandom usb vaapi vdpau vim-syntax vorbis wayland webp widgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2 fuji" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Reproducible: Always
Comment 1 Georgy Yakovlev archtester gentoo-dev 2018-01-29 07:38:33 UTC
Created attachment 517042 [details]
build.log.gz
Comment 2 Georgy Yakovlev archtester gentoo-dev 2018-01-29 07:38:59 UTC
Created attachment 517044 [details]
sandbox log
Comment 3 Georgy Yakovlev archtester gentoo-dev 2018-01-29 07:46:13 UTC
seems it tries to send a notification that build is complete...
Comment 4 Georgy Yakovlev archtester gentoo-dev 2018-01-29 07:54:32 UTC
not sure if it's relevant, but here is a line from my fstab
proc /proc proc nosuid,nodev,noexec,noatime,hidepid=2,gid=wheel 0 0

only root and gid=wheel can see other's processes in /proc
Comment 5 Ivan Grynko 2018-01-29 09:11:53 UTC
(In reply to Georgy Yakovlev from comment #4)
> not sure if it's relevant, but here is a line from my fstab
> proc /proc proc nosuid,nodev,noexec,noatime,hidepid=2,gid=wheel 0 0
> 
> only root and gid=wheel can see other's processes in /proc

I think it doesn't matter, I have the same error but my proc fstab line looks like this:

none /proc proc defaults 0 0
Comment 6 younky.yang 2018-01-29 12:02:07 UTC
Same error happens here. Also get another warning said
"Sorry, but firefox-58.0 does not support the zh-CN locale in LINGUAS"
Comment 7 Panard 2018-01-29 12:14:25 UTC
I got the same issue (and indeed, I got a notification at some point in firefox or thunderbird saying "build complete").
After closing firefox and thunderbird, emerge completed successfully. So it might be a workaround.
Comment 8 Sven B. 2018-01-29 12:31:44 UTC
(In reply to Georgy Yakovlev from comment #3)
> seems it tries to send a notification that build is complete...

Well as a workaround; since the actual build is already complete; you could likely do

cd /usr/portage/www-client/firefox
ebuild firefox-58.0.ebuild install && ebuild firefox-58.0.ebuild qmerge  

to merge the package.
Comment 9 Ian Stakenvicius (RETIRED) gentoo-dev 2018-01-29 14:36:12 UTC
How much ram do you folks have that you're pushing 32-process parallelism?  Are all of you pushing high levels of parallelism?
Comment 10 egon2003 2018-01-29 14:44:15 UTC
I have 10 jobs set and I have 32GB of ram.
Comment 11 Adrian Bassett 2018-01-29 14:45:39 UTC
(In reply to Ian Stakenvicius from comment #9)
> How much ram do you folks have that you're pushing 32-process parallelism? 
> Are all of you pushing high levels of parallelism?

Well, I also ran into this problem.  I use -j2 on 8GB - so not much in my case?

~amd64, linux 4.14.15, gcc-7.3, profile 17.1, rust-1.23.0-r1

The comments in comment #8 work for finishing the build manually.
Comment 12 Georgy Yakovlev archtester gentoo-dev 2018-01-29 14:49:33 UTC
(In reply to Ian Stakenvicius from comment #9)
> How much ram do you folks have that you're pushing 32-process parallelism? 
> Are all of you pushing high levels of parallelism?

64GB in my case, with 32 threads.
but rust compilations are not parallel at all. I compile chromium in 20 minutes, but firefox takes almost twice of that because of rust.
Comment 13 Adrian Bassett 2018-01-29 14:52:37 UTC
(In reply to Georgy Yakovlev from comment #12)
> (In reply to Ian Stakenvicius from comment #9)
> > How much ram do you folks have that you're pushing 32-process parallelism? 
> > Are all of you pushing high levels of parallelism?
> 
> 64GB in my case, with 32 threads.
> but rust compilations are not parallel at all. I compile chromium in 20
> minutes, but firefox takes almost twice of that because of rust.

Think I'm due an upgrade:-) as it takes me just under two hours:-(
Comment 14 egon2003 2018-01-29 15:00:10 UTC
Weird, I just emerged firefox again and this time it completed without errors. I had at least 2 failed attempts before this.
Comment 15 Ivan 2018-01-29 16:38:15 UTC
Same thing here:

 0:05.44 gmake[1]: Leaving directory '/tmp/portage/www-client/firefox-58.0/work/firefox-58.0/ff/browser/installer'
 0:05.45 gmake: Leaving directory '/tmp/portage/www-client/firefox-58.0/work/firefox-58.0/ff'
 0:05.48 /usr/bin/notify-send --app-name=Mozilla Build System Mozilla Build System Install complete
 * ACCESS DENIED:  open_wr:      /proc/self/oom_score_adj
 * ACCESS DENIED:  open_wr:      /proc/self/oom_score_adj
 * PT_PAX marking -m /tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/firefox with scanelf
 * PT_PAX marking -m /tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/firefox-bin with scanelf
 * PT_PAX marking -m /tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/plugin-container with scanelf
 * XATTR_PAX marking -me /tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/firefox with setfattr
 * XATTR_PAX marking -me /tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/firefox-bin with setfattr
 * XATTR_PAX marking -me /tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/plugin-container with setfattr
>>> Completed installing firefox-58.0 into /tmp/portage/www-client/firefox-58.0/image/

 * Final size of build directory: 3090092 KiB (  2.9 GiB)
 * Final size of installed tree:   169560 KiB (165.5 MiB)

 * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 * LOG FILE: "/var/log/sandbox/sandbox-11644.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: /proc/self/oom_score_adj
A: /proc/self/oom_score_adj
R: /proc/11769/oom_score_adj
C: /usr/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7 --session 

F: open_wr
S: deny
P: /proc/self/oom_score_adj
A: /proc/self/oom_score_adj
R: /proc/11769/oom_score_adj
C: /usr/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7 --session 
 * --------------------------------------------------------------------------------

emerge --info
Portage 2.3.20 (python 3.4.6-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-7.3.0, glibc-2.26-r5, 4.14.15-gentoo x86_64)
=================================================================
System uname: Linux-4.14.15-gentoo-x86_64-Intel-R-_Core-TM-_i5-2500K_CPU_@_3.30GHz-with-gentoo-2.4.1
KiB Mem:    16345828 total,   2044100 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 29 Jan 2018 15:30:01 +0000
Head commit of repository gentoo: a30d23cd4566b356e8e6cd6d17350ad30764af87
sh bash 4.4_p12-r1
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12-r1::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.6-r1::gentoo
dev-util/cmake:           3.10.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            7.3.0::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.14::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 

my
    location: /usr/local/my
    masters: gentoo
    priority: 0

deadbeef-overlay
    location: /var/lib/layman/deadbeef-overlay
    masters: gentoo
    priority: 50

reagentoo
    location: /var/lib/layman/reagentoo
    masters: gentoo
    priority: 50

scrill
    location: /var/lib/layman/scrill
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="X a52 aac acl acpi activities aes aften alsa amd64 amr ass audio avx bash-completion branding bzip2 cairo cdda cdr clang cleartype consolekit cracklib crypt css cups cxx dbus declarative device-mapper djvu dri dts dv dvd dvdr egl encode exif faac faad fam fat ffmpeg firefox firmware-loader flac fontconfig gd gif glamor gles gpm gzip iconv icu id3tag ieee1394 imagemagick ipv6 jit jpeg kde keymap ladspa lame lash lcms libass libnotify lm_sensors lzma lzo mad matroska midi mmx mmxext mng modules mp3 mp4 mpeg mplayer mtp mudflap multilib ncurses nls nptl ntfs nvidia ogg opengl openmp opus pam pango pcre pdf phonon pie plasma png policykit popcnt ppds pppd pulseaudio qml qt3support qt5 quicktime rar raw readline scanner sdl seccomp session sse sse2 sse3 sse4_1 sse4_2 ssl ssp ssse3 startup-notification svc svg sysfs tcpd theora threads tiff toolame truetype twolame udev udisks unicode upower usb vaapi vdpau vorbis vpx wav wavpack widgets win32codecs wxwidgets x264 x265 xattr xcb xcomposite xml xorg xscreensaver xulrunner xv xvfb xvid xvmc zip zlib" ABI_X86="64" ALSA_CARDS="emu10k1" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="ru en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="nvidia intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 16 Ian Stakenvicius (RETIRED) gentoo-dev 2018-01-29 17:36:29 UTC
(In reply to egon2003 from comment #14)
> Weird, I just emerged firefox again and this time it completed without
> errors. I had at least 2 failed attempts before this.

Yeah whatever it is, it's intermittent and I'm not sure of the cause at the moment.  I have not run into this once yet, nor has anyone else that was building the beta's from mozilla-overlay over the last ~2 months (or at least, they never reported it).

I -am- looking through the mach build tool, in order to see where this notify-cmd is being triggered by and to see if it can be disabled (I see no reason why our systems should care if firefox is done building, beyond what emerge reports).  However there's no guarantee that disabling this will actually prevent this sandbox violation on oom_score_adj
Comment 17 Sven B. 2018-01-29 17:41:38 UTC
Created attachment 517074 [details, diff]
Remove notify on build completion

If the notification is the cause perhaps something like that will work.
Comment 18 Sven B. 2018-01-29 17:50:12 UTC
Perhaps related to:
FEATURES="usersandbox" 
Or is that the default?
Comment 19 Georgy Yakovlev archtester gentoo-dev 2018-01-29 17:51:29 UTC
(In reply to Sven B. from comment #18)
> Perhaps related to:
> FEATURES="usersandbox" 
> Or is that the default?

I think it's default. I don't have set it myself in make.conf.
Comment 20 Georgy Yakovlev archtester gentoo-dev 2018-01-29 18:42:17 UTC
(In reply to Ian Stakenvicius from comment #16)
> (In reply to egon2003 from comment #14)
> > Weird, I just emerged firefox again and this time it completed without
> > errors. I had at least 2 failed attempts before this.
> 
> Yeah whatever it is, it's intermittent and I'm not sure of the cause at the
> moment.  I have not run into this once yet, nor has anyone else that was
> building the beta's from mozilla-overlay over the last ~2 months (or at
> least, they never reported it).
> 
> I -am- looking through the mach build tool, in order to see where this
> notify-cmd is being triggered by and to see if it can be disabled (I see no
> reason why our systems should care if firefox is done building, beyond what
> emerge reports).  However there's no guarantee that disabling this will
> actually prevent this sandbox violation on oom_score_adj

should not "addpredict /proc/self/oom_score_adj" take care of that?
my gentoo machine is not available now, where is it coming from?
Is it build system tries to adjust  a value, or it's dbus/libnotify doing something?

here is another bug, seems it's known problem for a while.

https://bugs.gentoo.org/604394

I might be wrong, but there is no notification there.

I usualluy run emerge in a root shell, either sudo -i or sudo su -.
Comment 21 Georgy Yakovlev archtester gentoo-dev 2018-01-29 18:53:11 UTC
also this piece of information

https://forums.gentoo.org/viewtopic-t-1070522-start-0.html

pgo was the reason with improper root shell.
but there is no pgo anymore in firefox-58 at all. and in my case I run from a root shell.
Comment 22 klaus818 2018-01-29 19:25:42 UTC
FEATURES="usersandbox" is the solution. Nothhi8ng else.
Comment 23 Morton Pellung 2018-01-29 20:04:15 UTC
I can confirm the suggestion from comment #7,
while Firefox and Thunderbird are running Firefox 58 build fails, I receive notification that build is done and then install fails.

Quitting Thunderbird and Firefox, Firefox 58 builds and installs without a problem.

Dual core, FEATURES=sandbox and usersandbox.
Comment 24 Georgy Yakovlev archtester gentoo-dev 2018-01-29 20:08:10 UTC
(In reply to Morton Pellung from comment #23)
> I can confirm the suggestion from comment #7,
> while Firefox and Thunderbird are running Firefox 58 build fails, I receive
> notification that build is done and then install fails.
> 
> Quitting Thunderbird and Firefox, Firefox 58 builds and installs without a
> problem.
> 
> Dual core, FEATURES=sandbox and usersandbox.

probably not related, as I tried exiting firefox and still got the error.
Comment 25 Morton Pellung 2018-01-29 20:10:48 UTC
Build fails:
============
 0:09.70 gmake[1]: Leaving directory '/var/tmp/portage/www-client/firefox-58.0/work/firefox-58.0/ff/browser/installer'
 0:09.70 gmake: Leaving directory '/var/tmp/portage/www-client/firefox-58.0/work/firefox-58.0/ff'
 0:09.71 /usr/bin/notify-send --app-name=Mozilla Build System Mozilla Build System Install complete
 * ACCESS DENIED:  open_wr:      /proc/self/oom_score_adj
 * ACCESS DENIED:  open_wr:      /proc/self/oom_score_adj
 * ACCESS DENIED:  open_wr:      /proc/self/oom_score_adj
 * ACCESS DENIED:  open_wr:      /proc/self/oom_score_adj
 * ACCESS DENIED:  open_wr:      /proc/self/oom_score_adj
 * ACCESS DENIED:  open_wr:      /proc/self/oom_score_adj
 * ACCESS DENIED:  open_wr:      /proc/self/oom_score_adj
 * ACCESS DENIED:  open_wr:      /proc/self/oom_score_adj
 * PT_PAX marking -m /var/tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/firefox with scanelf
 * PT_PAX marking -m /var/tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/firefox-bin with scanelf
 * PT_PAX marking -m /var/tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/plugin-container with scanelf
 * XATTR_PAX marking -me /var/tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/firefox with setfattr
 * XATTR_PAX marking -me /var/tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/firefox-bin with setfattr
 * XATTR_PAX marking -me /var/tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/plugin-container with setfattr
>>> Completed installing firefox-58.0 into /var/tmp/portage/www-client/firefox-58.0/image/

 * Final size of build directory: 3334444 KiB (  3.1 GiB)
 * Final size of installed tree:   193448 KiB (188.9 MiB)

 * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 * LOG FILE: "/var/log/sandbox/sandbox-15406.log"
[...]
 * --------------------------------------------------------------------------------
>>> Failed to emerge www-client/firefox-58.0, Log file:
[....]


Build ok:
=========
 0:16.42 gmake[1]: Leaving directory '/var/tmp/portage/www-client/firefox-58.0/work/firefox-58.0/ff/browser/installer'
 0:16.42 gmake: Leaving directory '/var/tmp/portage/www-client/firefox-58.0/work/firefox-58.0/ff'
 0:16.47 /usr/bin/notify-send --app-name=Mozilla Build System Mozilla Build System Install complete
 * PT_PAX marking -m /var/tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/firefox with scanelf
 * PT_PAX marking -m /var/tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/firefox-bin with scanelf
 * PT_PAX marking -m /var/tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/plugin-container with scanelf
 * XATTR_PAX marking -me /var/tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/firefox with setfattr
 * XATTR_PAX marking -me /var/tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/firefox-bin with setfattr
 * XATTR_PAX marking -me /var/tmp/portage/www-client/firefox-58.0/image//usr/lib64/firefox/plugin-container with setfattr
>>> Completed installing firefox-58.0 into /var/tmp/portage/www-client/firefox-58.0/image/

 * Final size of build directory: 3338620 KiB (  3.1 GiB)
 * Final size of installed tree:   193448 KiB (188.9 MiB)

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version
>>> Installing (1 of 1) www-client/firefox-58.0::gentoo
[....]
Comment 26 Morton Pellung 2018-01-29 20:17:58 UTC
(In reply to Georgy Yakovlev from comment #24)
> probably not related, as I tried exiting firefox and still got the error.

I tried two times with FF and TB running,
one with 16GB and one with 6GB memory, both failed.

Without FF and TB running and 6GB mem worked...... strange...
Comment 27 Ulenrich 2018-01-29 20:43:05 UTC
https://bugs.gentoo.org/645494#c1
There Constantine says:
It is required to append "16" (amd64) or "54" (i386,arm) to "security.sandbox.content.syscall_whitelist"

? ...just asking
Comment 28 Ian Stakenvicius (RETIRED) gentoo-dev 2018-01-29 21:03:10 UTC
(In reply to Ulenrich from comment #27)
> https://bugs.gentoo.org/645494#c1
> There Constantine says:
> It is required to append "16" (amd64) or "54" (i386,arm) to
> "security.sandbox.content.syscall_whitelist"
> 
> ? ...just asking

That's not this bug -- that's for allowing alpuse or alsa code to use the 'ioctl' syscall when firefox is running to access alsa sound devices.
Comment 29 Ian Stakenvicius (RETIRED) gentoo-dev 2018-01-29 21:03:45 UTC
(In reply to klaus818 from comment #22)
> FEATURES="usersandbox" is the solution. Nothhi8ng else.

Except that I run with FEATURES="-usersandbox" and do not run into this issue.
Comment 30 Ian Stakenvicius (RETIRED) gentoo-dev 2018-01-29 21:04:53 UTC
(In reply to Sven B. from comment #17)
> Created attachment 517074 [details, diff] [details, diff]
> Remove notify on build completion
> 
> If the notification is the cause perhaps something like that will work.

This is a possibility and what I'm trying to run-down right now.  Rather than patching it out however I'm trying to disable it properly.
Comment 31 Morton Pellung 2018-01-29 21:10:12 UTC
> > Remove notify on build completion
> > If the notification is the cause perhaps something like that will work.
> This is a possibility and what I'm trying to run-down right now.  Rather
> than patching it out however I'm trying to disable it properly.

See my comment #25, notify-send was called in both cases according to the log, failure and success. The only thing I changed from failure run to success run was to quit TB and FF 57 and call immediately "emerge firefox" again.
Comment 32 Ulenrich 2018-01-29 21:18:35 UTC
(In reply to Sven B. from comment #17)
> Created attachment 517074 [details, diff] [details, diff]
> Remove notify on build completion
> 
> If the notification is the cause perhaps something like that will work.

Looking into that diff I do strongly wonder:
Normally this is kind of Windows Application Update Behavior: Start new

As I read about firefox-58 does new user profiles, is this something to worry:
Up o now I could run in parallel the old application while compiling the new ?!
Comment 33 Sven B. 2018-01-29 22:17:32 UTC
(In reply to Ian Stakenvicius from comment #30)
> (In reply to Sven B. from comment #17)
> > Created attachment 517074 [details, diff] [details, diff] [details, diff]
> > Remove notify on build completion
> > 
> > If the notification is the cause perhaps something like that will work.
> 
> This is a possibility and what I'm trying to run-down right now.  Rather
> than patching it out however I'm trying to disable it properly.

That would be best ;) That aside, has anyone actually tested if the sandbox violation does not occur if notify-send notifications are removed?

Also grepping the source i didn't quite find a turn off switch for that behavior; except maybe for the servo part of the build in
 servo/servobuild.example
by specifying the notify-command.

For these there does not seem to be a proper switch available:
(python/mozbuild/mozbuild/base.py)
python/mozbuild/mozbuild/mach_commands.py
python/mozbuild/mozbuild/controller/building.py

Another test would be what happens if the build system does not find the notify-send binary; perhaps it'll just throw the exception message from base.py and continue on. Not sure if it is possible to hide the binary by sandboxing

e.g.
adddeny /usr/bin/notify-send
Comment 34 Arfrever Frehtes Taifersar Arahesis 2018-01-29 22:42:45 UTC
If notify-send is a problem and if ${PATH} is not ignored (by calling e.g. /usr/bin/notify-send directly), then you can use:

echo '#!/bin/bash' > "${T}/notify-send"
chmod +x "${T}/notify-send"
export PATH="${T}:${PATH}"
Comment 35 Ian Stakenvicius (RETIRED) gentoo-dev 2018-01-30 03:26:16 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #34)
> If notify-send is a problem and if ${PATH} is not ignored (by calling e.g.
> /usr/bin/notify-send directly), then you can use:
> 
> echo '#!/bin/bash' > "${T}/notify-send"
> chmod +x "${T}/notify-send"
> export PATH="${T}:${PATH}"

It's a lot easier than that actually:  MOZ_NOSPAM=1 ./mach [...]

This change has been added to firefox-58.0.1.  The addpredict in pkg_setup will remain until I've had time to thoroughly test and confirm it is no longer needed.
Comment 36 Georgy Yakovlev archtester gentoo-dev 2018-01-30 04:34:41 UTC
www-client/firefox-58.0.1 fixes the problem for me. thanks!!!
Comment 37 Jeroen Roovers (RETIRED) gentoo-dev 2018-01-30 08:33:38 UTC
*** Bug 646094 has been marked as a duplicate of this bug. ***
Comment 38 Jeroen Roovers (RETIRED) gentoo-dev 2018-01-30 08:35:39 UTC

*** This bug has been marked as a duplicate of bug 604394 ***