Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 553092 - sys-apps/sandbox: paths over 8k (ENAMETOOLONG) should not trigger aborts
Summary: sys-apps/sandbox: paths over 8k (ENAMETOOLONG) should not trigger aborts
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
: 573180 576706 584948 (view as bug list)
Depends on: 604402
Blocks: 587894
  Show dependency tree
 
Reported: 2015-06-23 20:30 UTC by om3i
Modified: 2024-01-22 16:26 UTC (History)
13 users (show)

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


Attachments
build.log (media-gfx:graphicsmagick-1.3.20-r1:20150623-200547.log,119.82 KB, text/plain)
2015-06-23 20:31 UTC, om3i
Details
emerge --info output (emerge_info,3.46 KB, text/plain)
2015-06-24 00:19 UTC, om3i
Details
Build log for bash-4.3_p42-r2 (bash-build.log,163.47 KB, text/plain)
2016-03-29 16:49 UTC, Andrew Church
Details
Patch to fix opendir (0001-libsandbox-do-not-abort-with-a-long-name-to-opendir.patch,3.22 KB, patch)
2016-09-27 18:00 UTC, Mart Raudsepp
Details | Diff
Patch to fix opendir (strnlen approach) (0001-libsandbox-do-not-abort-with-a-long-name-to-opendir.patch,3.23 KB, patch)
2016-11-11 10:39 UTC, Mart Raudsepp
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description om3i 2015-06-23 20:30:38 UTC
Without X use it builds normally.

This message is shown only on terminal:

(null)*(null) ../../sandbox-2.6/libsandbox/libsandbox.c:check_syscall():879: failure (No such file or directory):
 (null)*(null) ISE:
  abs_path: (null)
  res_path: (null)

And this is from build log:

/bin/sh ./libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -fopenmp -fno-diagnostics-color -pipe -w -march=native -O2 -Wall -pthread -no-undefined -export-symbols-regex ".*"  -version-info 15:0:12 -Wl,-O1 -Wl,--as-needed -o magick/libGraphicsMagick.la -rpath /usr/lib64 magick/magick_libGraphicsMagick_la-analyze.lo magick/magick_libGraphicsMagick_la-annotate.lo magick/magick_libGraphicsMagick_la-attribute.lo magick/magick_libGraphicsMagick_la-average.lo magick/magick_libGraphicsMagick_la-bit_stream.lo magick/magick_libGraphicsMagick_la-blob.lo magick/magick_libGraphicsMagick_la-cdl.lo magick/magick_libGraphicsMagick_la-channel.lo magick/magick_libGraphicsMagick_la-compare.lo magick/magick_libGraphicsMagick_la-confirm_access.lo magick/magick_libGraphicsMagick_la-color.lo magick/magick_libGraphicsMagick_la-color_lookup.lo magick/magick_libGraphicsMagick_la-colormap.lo magick/magick_libGraphicsMagick_la-colorspace.lo magick/magick_libGraphicsMagick_la-command.lo magick/magick_libGraphicsMagick_la-composite.lo magick/magick_libGraphicsMagick_la-compress.lo magick/magick_libGraphicsMagick_la-constitute.lo magick/magick_libGraphicsMagick_la-decorate.lo magick/magick_libGraphicsMagick_la-delegate.lo magick/magick_libGraphicsMagick_la-deprecate.lo magick/magick_libGraphicsMagick_la-describe.lo magick/magick_libGraphicsMagick_la-draw.lo magick/magick_libGraphicsMagick_la-effect.lo magick/magick_libGraphicsMagick_la-enhance.lo magick/magick_libGraphicsMagick_la-enum_strings.lo magick/magick_libGraphicsMagick_la-error.lo magick/magick_libGraphicsMagick_la-export.lo magick/magick_libGraphicsMagick_la-floats.lo magick/magick_libGraphicsMagick_la-fx.lo magick/magick_libGraphicsMagick_la-gem.lo magick/magick_libGraphicsMagick_la-gradient.lo magick/magick_libGraphicsMagick_la-hclut.lo magick/magick_libGraphicsMagick_la-image.lo magick/magick_libGraphicsMagick_la-import.lo magick/magick_libGraphicsMagick_la-list.lo magick/magick_libGraphicsMagick_la-locale.lo magick/magick_libGraphicsMagick_la-log.lo magick/magick_libGraphicsMagick_la-magic.lo magick/magick_libGraphicsMagick_la-magick.lo magick/magick_libGraphicsMagick_la-magick_endian.lo magick/magick_libGraphicsMagick_la-map.lo magick/magick_libGraphicsMagick_la-memory.lo magick/magick_libGraphicsMagick_la-module.lo magick/magick_libGraphicsMagick_la-monitor.lo magick/magick_libGraphicsMagick_la-montage.lo magick/magick_libGraphicsMagick_la-omp_data_view.lo magick/magick_libGraphicsMagick_la-operator.lo magick/magick_libGraphicsMagick_la-paint.lo magick/magick_libGraphicsMagick_la-pixel_cache.lo magick/magick_libGraphicsMagick_la-pixel_iterator.lo magick/magick_libGraphicsMagick_la-plasma.lo magick/magick_libGraphicsMagick_la-profile.lo magick/magick_libGraphicsMagick_la-quantize.lo magick/magick_libGraphicsMagick_la-registry.lo magick/magick_libGraphicsMagick_la-random.lo magick/magick_libGraphicsMagick_la-render.lo magick/magick_libGraphicsMagick_la-resize.lo magick/magick_libGraphicsMagick_la-resource.lo magick/magick_libGraphicsMagick_la-segment.lo magick/magick_libGraphicsMagick_la-semaphore.lo magick/magick_libGraphicsMagick_la-shear.lo magick/magick_libGraphicsMagick_la-signature.lo magick/magick_libGraphicsMagick_la-static.lo magick/magick_libGraphicsMagick_la-statistics.lo magick/magick_libGraphicsMagick_la-tempfile.lo magick/magick_libGraphicsMagick_la-texture.lo magick/magick_libGraphicsMagick_la-timer.lo magick/magick_libGraphicsMagick_la-transform.lo magick/magick_libGraphicsMagick_la-tsd.lo magick/magick_libGraphicsMagick_la-type.lo magick/magick_libGraphicsMagick_la-unix_port.lo magick/magick_libGraphicsMagick_la-utility.lo magick/magick_libGraphicsMagick_la-version.lo magick/magick_libGraphicsMagick_la-animate.lo magick/magick_libGraphicsMagick_la-display.lo magick/magick_libGraphicsMagick_la-PreRvIcccm.lo magick/magick_libGraphicsMagick_la-widget.lo magick/magick_libGraphicsMagick_la-xwindow.lo  coders/magick_libGraphicsMagick_la-png.lo coders/magick_libGraphicsMagick_la-art.lo coders/magick_libGraphicsMagick_la-avi.lo coders/magick_libGraphicsMagick_la-avs.lo coders/magick_libGraphicsMagick_la-bmp.lo coders/magick_libGraphicsMagick_la-cals.lo coders/magick_libGraphicsMagick_la-caption.lo coders/magick_libGraphicsMagick_la-cineon.lo coders/magick_libGraphicsMagick_la-cmyk.lo coders/magick_libGraphicsMagick_la-cut.lo coders/magick_libGraphicsMagick_la-dcm.lo coders/magick_libGraphicsMagick_la-dcraw.lo coders/magick_libGraphicsMagick_la-dib.lo coders/magick_libGraphicsMagick_la-dpx.lo coders/magick_libGraphicsMagick_la-fax.lo coders/magick_libGraphicsMagick_la-fits.lo coders/magick_libGraphicsMagick_la-gif.lo coders/magick_libGraphicsMagick_la-gradient.lo coders/magick_libGraphicsMagick_la-gray.lo coders/magick_libGraphicsMagick_la-histogram.lo coders/magick_libGraphicsMagick_la-hrz.lo coders/magick_libGraphicsMagick_la-html.lo coders/magick_libGraphicsMagick_la-icon.lo coders/magick_libGraphicsMagick_la-identity.lo coders/magick_libGraphicsMagick_la-info.lo coders/magick_libGraphicsMagick_la-label.lo coders/magick_libGraphicsMagick_la-locale.lo coders/magick_libGraphicsMagick_la-logo.lo coders/magick_libGraphicsMagick_la-mac.lo coders/magick_libGraphicsMagick_la-map.lo coders/magick_libGraphicsMagick_la-mat.lo coders/magick_libGraphicsMagick_la-matte.lo coders/magick_libGraphicsMagick_la-meta.lo coders/magick_libGraphicsMagick_la-miff.lo coders/magick_libGraphicsMagick_la-mono.lo coders/magick_libGraphicsMagick_la-mpc.lo coders/magick_libGraphicsMagick_la-mpeg.lo coders/magick_libGraphicsMagick_la-mpr.lo coders/magick_libGraphicsMagick_la-msl.lo coders/magick_libGraphicsMagick_la-mtv.lo coders/magick_libGraphicsMagick_la-mvg.lo coders/magick_libGraphicsMagick_la-null.lo coders/magick_libGraphicsMagick_la-otb.lo coders/magick_libGraphicsMagick_la-palm.lo coders/magick_libGraphicsMagick_la-pcd.lo coders/magick_libGraphicsMagick_la-pcl.lo coders/magick_libGraphicsMagick_la-pcx.lo coders/magick_libGraphicsMagick_la-pdb.lo coders/magick_libGraphicsMagick_la-pdf.lo coders/magick_libGraphicsMagick_la-pict.lo coders/magick_libGraphicsMagick_la-pix.lo coders/magick_libGraphicsMagick_la-plasma.lo coders/magick_libGraphicsMagick_la-pnm.lo coders/magick_libGraphicsMagick_la-preview.lo coders/magick_libGraphicsMagick_la-ps.lo coders/magick_libGraphicsMagick_la-ps2.lo coders/magick_libGraphicsMagick_la-ps3.lo coders/magick_libGraphicsMagick_la-psd.lo coders/magick_libGraphicsMagick_la-pwp.lo coders/magick_libGraphicsMagick_la-rgb.lo coders/magick_libGraphicsMagick_la-rla.lo coders/magick_libGraphicsMagick_la-rle.lo coders/magick_libGraphicsMagick_la-sct.lo coders/magick_libGraphicsMagick_la-sfw.lo coders/magick_libGraphicsMagick_la-sgi.lo coders/magick_libGraphicsMagick_la-stegano.lo coders/magick_libGraphicsMagick_la-sun.lo coders/magick_libGraphicsMagick_la-svg.lo coders/magick_libGraphicsMagick_la-tga.lo coders/magick_libGraphicsMagick_la-tile.lo coders/magick_libGraphicsMagick_la-tim.lo coders/magick_libGraphicsMagick_la-topol.lo coders/magick_libGraphicsMagick_la-ttf.lo coders/magick_libGraphicsMagick_la-txt.lo coders/magick_libGraphicsMagick_la-uil.lo coders/magick_libGraphicsMagick_la-url.lo coders/magick_libGraphicsMagick_la-uyvy.lo coders/magick_libGraphicsMagick_la-vicar.lo coders/magick_libGraphicsMagick_la-vid.lo coders/magick_libGraphicsMagick_la-viff.lo coders/magick_libGraphicsMagick_la-wbmp.lo coders/magick_libGraphicsMagick_la-wmf.lo coders/magick_libGraphicsMagick_la-wpg.lo coders/magick_libGraphicsMagick_la-xbm.lo coders/magick_libGraphicsMagick_la-xc.lo coders/magick_libGraphicsMagick_la-xcf.lo coders/magick_libGraphicsMagick_la-xpm.lo coders/magick_libGraphicsMagick_la-yuv.lo     coders/magick_libGraphicsMagick_la-jnx.lo coders/magick_libGraphicsMagick_la-jpeg.lo   coders/magick_libGraphicsMagick_la-x.lo coders/magick_libGraphicsMagick_la-xwd.lo  filters/magick_libGraphicsMagick_la-analyze.lo -ljpeg -lpng16 -lXext -lSM -lICE -lX11 -lz -lm -lgomp -lpthread
/usr/lib64/libsandbox.so(+0xade2)[0x7fa839861de2]
/usr/lib64/libsandbox.so(+0xaf05)[0x7fa839861f05]
/usr/lib64/libsandbox.so(+0x53f0)[0x7fa83985c3f0]
/usr/lib64/libsandbox.so(opendir+0x29)[0x7fa83985e4c9]
/bin/sh[0x471688]
/bin/sh[0x4723ff]
/bin/sh[0x47246d]
/bin/sh[0x47246d]
/bin/sh[0x47246d]
/bin/sh[0x47246d]
/proc/25520/cmdline: /bin/sh ./libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -fopenmp -fno-diagnostics-color -pipe -w -march=native -O2 -Wall -pthread -no-undefined -export-symbols-regex .* -version-info 15:0:12 -Wl,-O1 -Wl,--as-needed -o magick/libGraphicsMagick.la -rpath /usr/lib64 magick/magick_libGraphicsMagick_la-analyze.lo magick/magick_libGraphicsMagick_la-annotate.lo magick/magick_libGraphicsMagick_la-attribute.lo magick/magick_libGraphicsMagick_la-average.lo magick/magick_libGraphicsMagick_la-bit_stream.lo magick/magick_libGraphicsMagick_la-blob.lo magick/magick_libGraphicsMagick_la-cdl.lo magick/magick_libGraphicsMagick_la-channel.lo magick/magick_libGraphicsMagick_la-compare.lo magick/magick_libGraphicsMagick_la-confirm_access.lo magick/magick_libGraphicsMagick_la-color.lo magick/magick_libGraphicsMagick_la-color_lookup.lo magick/magick_libGraphicsMagick_la-colormap.lo magick/magick_libGraphicsMagick_la-colorspace.lo magick/magick_libGraphicsMagick_la-command.lo magick/magick_libGraphicsMagick_la-composite.lo magick/magick_libGraphicsMagick_la-compress.lo magick/magick_libGraphicsMagick_la-constitute.lo magick/magick_libGraphicsMagick_la-decorate.lo magick/magick_libGraphicsMagick_la-delegate.lo magick/magick_libGraphicsMagick_la-deprecate.lo magick/magick_libGraphicsMagick_la-describe.lo magick/magick_libGraphicsMagick_la-draw.lo magick/magick_libGraphicsMagick_la-effect.lo magick/magick_libGraphicsMagick_la-enhance.lo magick/magick_libGraphicsMagick_la-enum_strings.lo magick/magick_libGraphicsMagick_la-error.lo magick/magick_libGraphicsMagick_la-export.lo magick/magick_libGraphicsMagick_la-floats.lo magick/magick_libGraphicsMagick_la-fx.lo magick/magick_libGraphicsMagick_la-gem.lo magick/magick_libGraphicsMagick_la-gradient.lo magick/magick_libGraphicsMagick_la-hclut.lo magick/magick_libGraphicsMagick_la-image.lo magick/magick_libGraphicsMagick_la-import.lo magick/magick_libGraphicsMagick_la-list.lo magick/magick_libGraphicsMagick_la-locale.lo magick/magick_libGraphicsMagick_la-log.lo magick/magick_libGraphicsMagick_la-magic.lo magick/magick_libGraphicsMagick_la-magick.lo magick/magick_libGraphicsMagick_la-magick_endian.lo magick/magick_libGraphicsMagick_la-map.lo magick/magick_libGraphicsMagick_la-memory.lo magick/magick_libGraphicsMagick_la-module.lo magick/magick_libGraphicsMagick_la-monitor.lo magick/magick_libGraphicsMagick_la-montage.lo magick/magick_libGraphicsMagick_la-omp_data_view.lo magick/magick_libGraphicsMagick_la-operator.lo magick/magick_libGraphicsMagick_la-paint.lo magick/magick_libGraphicsMagick_la-pixel_cache.lo magick/magick_libGraphicsMagick_la-pixel_iterator.lo magick/magick_libGraphicsMagick_la-plasma.lo magick/magick_libGraphicsMagick_la-profile.lo magick/magick_libGraphicsMagick_la-quantize.lo magick/magick_libGraphicsMagick_la-registry.lo magick/magick_libGraphicsMagick_la-random.lo magick/magick_libGraphicsMagick_la-render.lo magick/magick_libGraphicsMagick_la-resize.lo magick/magick_libGraphicsMagick_la-resource.lo magick/magick_libGraphicsMagick_la-segment.lo magick/magick_libGraphicsMagick_la-semaphore.lo magick/magick_libGraphicsMagick_la-shear.lo magick/magick_libGraphicsMagick_la-signature.lo magick/magick_libGraphicsMagick_la-static.lo magick/magick_libGraphicsMagick_la-statistics.lo magick/magick_libGraphicsMagick_la-tempfile.lo magick/magick_libGraphicsMagick_la-texture.lo magick/magick_libGraphicsMagick_la-timer.lo magick/magick_libGraphicsMagick_la-transform.lo magick/magick_libGraphicsMagick_la-tsd.lo magick/magick_libGraphicsMagick_la-type.lo magick/magick_libGraphicsMagick_la-unix_port.lo magick/magick_libGraphicsMagick_la-utility.lo magick/magick_libGraphicsMagick_la-version.lo magick/magick_libGraphicsMagick_la-animate.lo magick/magick_libGraphicsMagick_la-display.lo magick/magick_libGraphicsMagick_la-PreRvIcccm.lo magick/magick_libGraphicsMagick_la-widget.lo magick/magick_libGraphicsMagick_la-xwindow.lo coders/magick_libGraphicsMagick_la-png.lo coders/magick_libGraphicsMagick_la-art.lo coders/magick_libGraphicsMagick_la-avi.lo coders/magick_libGraphicsMagick_la-avs.lo coders/ma


Reproducible: Always
Comment 1 om3i 2015-06-23 20:31:54 UTC
Created attachment 405602 [details]
build.log
Comment 2 om3i 2015-06-24 00:19:45 UTC
Created attachment 405616 [details]
emerge --info output
Comment 3 SpanKY gentoo-dev 2015-07-07 07:10:35 UTC
looks like a truncated command line.  does it fail every time in the same place ?  does it fail with MAKEOPTS=-j1 ?
Comment 4 om3i 2015-07-07 08:44:46 UTC
>does it fail every time in the same place ?  does it fail with MAKEOPTS=-j1 ?
yes, yes
Comment 5 SpanKY gentoo-dev 2016-01-28 16:42:55 UTC
*** Bug 573180 has been marked as a duplicate of this bug. ***
Comment 6 Wolfram Schlich (RETIRED) gentoo-dev 2016-01-29 14:48:17 UTC
@SpanKY: so, what can we do about your guess regarding the super long command line? Is there a limit in sandbox that we could increase?
Comment 7 SpanKY gentoo-dev 2016-02-01 19:01:46 UTC
(In reply to Wolfram Schlich from comment #6)

generally the sandbox relies on the OS to tell it when limits are exceeded rather than imposing some arbitrary limit itself.  it's not clear to me what exactly is causing the issue here as i haven't been able to reproduce it to dig further.

so far, we've had only a few people actually hitting/reporting this.  i would suspect a race condition, but it's odd that it happens all the time for the reporters, and never for anyone else.
Comment 8 Wolfram Schlich (RETIRED) gentoo-dev 2016-02-08 11:23:13 UTC
(In reply to SpanKY from comment #7)
> 
> generally the sandbox relies on the OS to tell it when limits are exceeded
> rather than imposing some arbitrary limit itself.  it's not clear to me what
> exactly is causing the issue here as i haven't been able to reproduce it to
> dig further.
> 
> so far, we've had only a few people actually hitting/reporting this.  i
> would suspect a race condition, but it's odd that it happens all the time
> for the reporters, and never for anyone else.

So, it's happening to me reproducibly with a specific ebuild.
Is there anything I can do to help you analyze it further?
Comment 9 om3i 2016-02-08 16:38:17 UTC
Graphicsmagick build still fails every time for me.
Comment 10 SpanKY gentoo-dev 2016-02-22 16:03:44 UTC
post the output of:
 - mount
 - ulimit -a

after the failed emerge, does it still fail if you do:
 cd /var/tmp/portage/<path to top level build dir>
 sandbox
 make

if so, run:
 SANDBOX_DEBUG=true make >& log

and attach that log here
Comment 11 SpanKY gentoo-dev 2016-03-08 22:11:32 UTC
*** Bug 576706 has been marked as a duplicate of this bug. ***
Comment 12 tka 2016-03-10 15:54:30 UTC
(In reply to SpanKY from comment #10)
> if so, run:
>  SANDBOX_DEBUG=true make >& log

Unfortunately, that command does not redirect the sandbox debug output to the log file. The last lines as copied from the console:

 * absolute_path: /bin/sed
 * resolved_path: /bin/sed
 * ACCESS ALLOWED:  execve:       /bin/sed
 * absolute_path: /bin/sed
 * resolved_path: /bin/sed
 * ACCESS ALLOWED:  open_rd:      /bin/sed
 * EARLY FAIL: open(/usr/lib64/charset.alias): No such file or directory
 * absolute_path: /bin/sed
 * resolved_path: /bin/sed
 * ACCESS ALLOWED:  execve:       /bin/sed
 * absolute_path: /bin/sed
 * resolved_path: /bin/sed
 * ACCESS ALLOWED:  open_rd:      /bin/sed
 * EARLY FAIL: open(/usr/lib64/charset.alias): No such file or directory
 * absolute_path: /bin/sed
 * resolved_path: /bin/sed
 * ACCESS ALLOWED:  execve:       /bin/sed
 * absolute_path: /bin/sed
 * resolved_path: /bin/sed
 * ACCESS ALLOWED:  open_rd:      /bin/sed
 * EARLY FAIL: open(/usr/lib64/charset.alias): No such file or directory
 * absolute_path: /bin/sed
 * resolved_path: /bin/sed
 * ACCESS ALLOWED:  execve:       /bin/sed
 * absolute_path: /bin/sed
 * resolved_path: /bin/sed
 * ACCESS ALLOWED:  open_rd:      /bin/sed
 * EARLY FAIL: open(/usr/lib64/charset.alias): No such file or directory
 * absolute_path: /bin/sed
 * resolved_path: /bin/sed
 * ACCESS ALLOWED:  execve:       /bin/sed
 * absolute_path: /bin/sed
 * resolved_path: /bin/sed
 * ACCESS ALLOWED:  open_rd:      /bin/sed
 * EARLY FAIL: open(/usr/lib64/charset.alias): No such file or directory
 * absolute_path: /var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23/magick/.libs
 * resolved_path: /var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23/magick/.libs
 * ACCESS ALLOWED:  opendir:      /var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23/magick/.libs
 * absolute_path: /bin/rm
 * resolved_path: /bin/rm
 * ACCESS ALLOWED:  execve:       /bin/rm
 * absolute_path: /bin/rm
 * resolved_path: /bin/rm
 * ACCESS ALLOWED:  open_rd:      /bin/rm
 * absolute_path: /var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23/magick/.libs/libGraphicsMagick.exp
 * resolved_path: /var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23/magick/.libs/libGraphicsMagick.exp
 * ACCESS ALLOWED:  unlinkat:     /var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23/magick/.libs/libGraphicsMagick.exp
 * absolute_path: /var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23/$NM $libobjs $convenience | $global_symbol_pipe | $SED 's
 * resolved_path: /var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23/$NM $libobjs $convenience | $global_symbol_pipe | $SED 's
 * ACCESS ALLOWED:  opendir:      /var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23/$NM $libobjs $convenience | $global_symbol_pipe | $SED 's
 * absolute_path: /var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23/'s
 * resolved_path: /var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23/'s
 * ACCESS ALLOWED:  opendir:      /var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23/'s
 * absolute_path: /bin/sed
 * resolved_path: /bin/sed
 * ACCESS ALLOWED:  execve:       /bin/sed
 * absolute_path: /bin/sed
 * resolved_path: /bin/sed
 * ACCESS ALLOWED:  open_rd:      /bin/sed
 * EARLY FAIL: open(/usr/lib64/charset.alias): No such file or directory
 * /var/tmp/portage/sys-apps/sandbox-2.10-r1/work/sandbox-2.10/libsandbox/libsandbox.c:check_syscall():989: failure (No such file or directory):
 * ISE:
	abs_path: (null)
	res_path: (null)
/usr/lib64/libsandbox.so(+0xd021)[0x7f178e1bf021]
/usr/lib64/libsandbox.so(+0xd139)[0x7f178e1bf139]
/usr/lib64/libsandbox.so(+0x5173)[0x7f178e1b7173]
/usr/lib64/libsandbox.so(opendir+0x4c)[0x7f178e1ba14c]
/bin/sh(+0x88d98)[0x56130836dd98]
/bin/sh(+0x89be0)[0x56130836ebe0]
/bin/sh(+0x89c4e)[0x56130836ec4e]
/bin/sh(+0x89c4e)[0x56130836ec4e]
/bin/sh(+0x89c4e)[0x56130836ec4e]
/bin/sh(+0x89c4e)[0x56130836ec4e]
/proc/21523/cmdline: /bin/sh ./libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -fopenmp -march=native -mtune=native -O2 -pipe -Wall -pthread -no-undefined -export-symbols-regex .* -version-info 17:1:14 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o magick/libGraphicsMagick.la -rpath /usr/lib64 magick/magick_libGraphicsMagick_la-analyze.lo magick/magick_libGraphicsMagick_la-annotate.lo magick/magick_libGraphicsMagick_la-attribute.lo magick/magick_libGraphicsMagick_la-average.lo magick/magick_libGraphicsMagick_la-bit_stream.lo magick/magick_libGraphicsMagick_la-blob.lo magick/magick_libGraphicsMagick_la-cdl.lo magick/magick_libGraphicsMagick_la-channel.lo magick/magick_libGraphicsMagick_la-compare.lo magick/magick_libGraphicsMagick_la-confirm_access.lo magick/magick_libGraphicsMagick_la-color.lo magick/magick_libGraphicsMagick_la-color_lookup.lo magick/magick_libGraphicsMagick_la-colormap.lo magick/magick_libGraphicsMagick_la-colorspace.lo magick/magick_libGraphicsMagick_la-command.lo magick/magick_libGraphicsMagick_la-composite.lo magick/magick_libGraphicsMagick_la-compress.lo magick/magick_libGraphicsMagick_la-constitute.lo magick/magick_libGraphicsMagick_la-decorate.lo magick/magick_libGraphicsMagick_la-delegate.lo magick/magick_libGraphicsMagick_la-deprecate.lo magick/magick_libGraphicsMagick_la-describe.lo magick/magick_libGraphicsMagick_la-draw.lo magick/magick_libGraphicsMagick_la-effect.lo magick/magick_libGraphicsMagick_la-enhance.lo magick/magick_libGraphicsMagick_la-enum_strings.lo magick/magick_libGraphicsMagick_la-error.lo magick/magick_libGraphicsMagick_la-export.lo magick/magick_libGraphicsMagick_la-floats.lo magick/magick_libGraphicsMagick_la-fx.lo magick/magick_libGraphicsMagick_la-gem.lo magick/magick_libGraphicsMagick_la-gradient.lo magick/magick_libGraphicsMagick_la-hclut.lo magick/magick_libGraphicsMagick_la-image.lo magick/magick_libGraphicsMagick_la-import.lo magick/magick_libGraphicsMagick_la-list.lo magick/magick_libGraphicsMagick_la-locale.lo magick/magick_libGraphicsMagick_la-log.lo magick/magick_libGraphicsMagick_la-magic.lo magick/magick_libGraphicsMagick_la-magick.lo magick/magick_libGraphicsMagick_la-magick_endian.lo magick/magick_libGraphicsMagick_la-map.lo magick/magick_libGraphicsMagick_la-memory.lo magick/magick_libGraphicsMagick_la-module.lo magick/magick_libGraphicsMagick_la-monitor.lo magick/magick_libGraphicsMagick_la-montage.lo magick/magick_libGraphicsMagick_la-omp_data_view.lo magick/magick_libGraphicsMagick_la-operator.lo magick/magick_libGraphicsMagick_la-paint.lo magick/magick_libGraphicsMagick_la-pixel_cache.lo magick/magick_libGraphicsMagick_la-pixel_iterator.lo magick/magick_libGraphicsMagick_la-plasma.lo magick/magick_libGraphicsMagick_la-profile.lo magick/magick_libGraphicsMagick_la-quantize.lo magick/magick_libGraphicsMagick_la-registry.lo magick/magick_libGraphicsMagick_la-random.lo magick/magick_libGraphicsMagick_la-render.lo magick/magick_libGraphicsMagick_la-resize.lo magick/magick_libGraphicsMagick_la-resource.lo magick/magick_libGraphicsMagick_la-segment.lo magick/magick_libGraphicsMagick_la-semaphore.lo magick/magick_libGraphicsMagick_la-shear.lo magick/magick_libGraphicsMagick_la-signature.lo magick/magick_libGraphicsMagick_la-static.lo magick/magick_libGraphicsMagick_la-statistics.lo magick/magick_libGraphicsMagick_la-tempfile.lo magick/magick_libGraphicsMagick_la-texture.lo magick/magick_libGraphicsMagick_la-timer.lo magick/magick_libGraphicsMagick_la-transform.lo magick/magick_libGraphicsMagick_la-tsd.lo magick/magick_libGraphicsMagick_la-type.lo magick/magick_libGraphicsMagick_la-unix_port.lo magick/magick_libGraphicsMagick_la-utility.lo magick/magick_libGraphicsMagick_la-version.lo magick/magick_libGraphicsMagick_la-animate.lo magick/magick_libGraphicsMagick_la-display.lo magick/magick_libGraphicsMagick_la-PreRvIcccm.lo magick/magick_libGraphicsMagick_la-widget.lo magick/magick_libGraphicsMagick_la-xwindow.lo coders/magick_libGraphicsMagick_la-png.lo coders/magick_libGraphicsMagick_la-art.lo coders/magick_libGraphicsMagick_la-avs.lo coders/magick_libGraphicsMagick_la-bmp.lo coders/magick_libGraphicsMagick_la-cals.lo coders/magick_libGraphicsMagick_la-caption.lo coders/magick_libGraphicsMagick_la-cineon.lo coders/magick_libGraphicsMagick_la-cmyk.lo coders/magick_libGraphicsMagick_la-cut.lo coders/magick_libGraphicsMagick_la-dcm.lo coders/magick_libGraphicsMagick_la-dcraw.lo coders/magick_libGraphicsMagick_la-dib.lo coders/magick_libGraphicsMagick_la-dpx.lo coders/magick_libGraphicsMagick_la-fax.lo coders/magick_libGraphicsMagick_la-fits.lo coders/magick_libGraphicsMagick_la-gif.lo coders/magick_libGraphicsMagick_la-gradient.lo coders/magick_libGraphicsMagick_la-gray.lo coders/magick_libGraphicsMagick_la-histogram.lo coders/magick_libGraphicsMagick_la-hrz.lo coders/magick_libGraphicsMagick_la-html.lo coders/magick_libGraphicsMagick_la-icon.lo coders/magick_libGraphicsMagick_la-identity.lo coders/magick_libGraphicsMagick_la-info.lo coders/magick_libGraphicsMagick_la-label.lo coders/magick_libGraphicsMagick_la-locale.lo coders/magick_libGraphicsMagick_la-logo.lo coders/magick_libGraphicsMagick_la-mac.lo coders/magick_libGraphicsMagick_la-map.lo coders/magick_libGraphicsMagick_la-mat.lo coders/magick_libGraphicsMagick_la-matte.lo coders/magick_libGraphicsMagick_la-meta.lo coders/magick_libGraphicsMagick_la-miff.lo coders/magick_libGraphicsMagick_la-mono.lo coders/magick_libGraphicsMagick_la-mpc.lo coders/magick_libGraphicsMagick_la-mpeg.lo coders/magick_libGraphicsMagick_la-mpr.lo coders/magick_libGraphicsMagick_la-msl.lo coders/magick_libGraphicsMagick_la-mtv.lo coders/magick_libGraphicsMagick_la-mvg.lo coders/magick_libGraphicsMagick_la-null.lo coders/magick_libGraphicsMagick_la-otb.lo coders/magick_libGraphicsMagick_la-palm.lo coders/magick_libGraphicsMagick_la-pcd.lo coders/magick_libGraphicsMagick_la-pcl.lo coders/magick_libGraphicsMagick_la-pcx.lo coders/magick_libGraphicsMagick_la-pdb.lo coders/magick_libGraphicsMagick_la-pdf.lo coders/magick_libGraphicsMagick_la-pict.lo coders/magick_libGraphicsMagick_la-pix.lo coders/magick_libGraphicsMagick_la-plasma.lo coders/magick_libGraphicsMagick_la-pnm.lo coders/magick_libGraphicsMagick_la-preview.lo coders/magick_libGraphicsMagick_la-ps.lo coders/magick_libGraphicsMagick_la-ps2.lo coders/magick_libGraphicsMagick_la-ps3.lo coders/magick_libGraphicsMagick_la-psd.lo coders/magick_libGraphicsMagick_la-pwp.lo coders/magick_libGraphicsMagick_la-rgb.lo coders/magick_libGraphicsMagick_la-rla.lo coders/magick_libGraphicsMagick_la-rle.lo coders/magick_libGraphicsMagick_la-sct.lo coders/magick_libGraphicsMagick_la-sfw.lo coders/magick_libGraphicsMagick_la-sgi.lo coders/magick_libGraphicsMagick_la-stegano.lo coders/magick_libGraphicsMagick_la-sun.lo coders/magick_libGraphicsMagick_la-svg.lo coders/magick_libGraphicsMagick_la-tga.lo coders/magick_libGraphicsMagick_la-tile.lo coders/magick_libGraphicsMagick_la-tim.lo coders/magick_libGraphicsMagick_la-topol.lo coders/magick_libGraphicsMagick_la-ttf.lo coders/magick_libGraphicsMagick_la-txt.lo coders/magick_libGraphicsMagick_la-uil.lo coders/magick_libGraphicsMagick_la-url.lo coders/magick_libGraphicsMagick_la-uyvy.lo coders/magick_libGraphicsMagick_la-vicar.lo coders/magick_libGraphicsMagick_la-vid.lo coders/magick_libGraphicsMagick_la-viff.lo coders/magick_libGraphicsMagick_la-wbmp.lo coders/magick_libGraphicsMagick_la-wmf.lo coders/magick_libGraphicsMagick_la-wpg.lo coders/magick_libGraphicsMagick_la-xbm.lo coders/magick_libGraphicsMagick_la-xc.lo coders/magick_libGraphicsMagick_la-xcf.lo coders/magick_libGraphicsMagick_la-xpm.lo coders/magick_libGraphicsMagick_la-yuv.lo coders/magick_libGraphicsMagick_la-jnx.lo coders/magick_libGraphicsMagick_la-jpeg.lo coders/magick_libGraphicsMagick_la-ept.lo coders/magick_libGraphicsMagick_la-tiff.lo coders/magick_libGraphicsMagick_la-x.lo coders/magick_libGraphicsMagick_la-xwd.lo filters/magick_libGraphicsMagick_la-analyze.lo -llcms2 -ltiff -lfreetype -ljpeg -lpng16 -lXext -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lz -lm -lgomp -lpthread 

Makefile:5614: recipe for target 'magick/libGraphicsMagick.la' failed
make[1]: *** [magick/libGraphicsMagick.la] Aborted
make[1]: Leaving directory '/var/tmp/portage/media-gfx/graphicsmagick-1.3.23/work/GraphicsMagick-1.3.23'
Makefile:4454: recipe for target 'all' failed
make: *** [all] Error 2
Comment 13 SpanKY gentoo-dev 2016-03-29 12:31:44 UTC
i've made the error message a little more useful w/sandbox-2.11.  can you upgrade and post the new failure (assuming it still fails) ?

https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=9fabf8eb94d8866c4f039462d1bdd06cdb0e22eb
Comment 14 Andrew Church 2016-03-29 14:52:55 UTC
I have the same problem as the reporter, and here's what sandbox-2.11 says:

 * /tmp/portage/sys-apps/sandbox-2.11/work/sandbox-2.11/libsandbox/libsandbox.c:check_syscall():989: failure (No such file or directory):
 * ISE: opendir(/usr/bin/x86_64-pc-linux-gnu-nm -B  magick/.libs/magick_libGraphicsMagick_la-analyze.o magick/.libs/magick_libGraphicsMagick_la-annotate.o magick/.libs/magick_libGraphicsMagick_la-attribute.o magick/.libs/magick_libGraphicsMagick_la-average.o magick/.libs/magick_libGraphicsMagick_la-bit_stream.o magick/.libs/magick_libGraphicsMagick_la-blob.o magick/.libs/magick_libGraphicsMagick_la-cdl.o magick/.libs/magick_libGraphicsMagick_la-channel.o magick/.libs/magick_libGraphicsMagick_la-compare.o magick/.libs/magick_libGraphicsMagick_la-confirm_access.o magick/.libs/magick_libGraphicsMagick_la-color.o magick/.libs/magick_libGraphicsMagick_la-color_lookup.o magick/.libs/magick_libGraphicsMagick_la-colormap.o magick/.libs/magick_libGraphicsMagick_la-colorspace.o magick/.libs/magick_libGraphicsMagick_la-command.o magick/.libs/magick_libGraphicsMagick_la-composite.o magick/.libs/magick_libGraphicsMagick_la-compress.o magick/.libs/magick_libGraphicsMagick_la-constitute.o magick/.libs/magick_libGraphicsMagick_la-decorate.o magick/.libs/magick_libGraphicsMagick_la-delegate.o magick/.libs/magick_libGraphicsMagick_la-deprecate.o magick/.libs/magick_libGraphicsMagick_la-describe.o magick/.libs/magick_libGraphicsMagick_la-draw.o magick/.libs/magick_libGraphicsMagick_la-effect.o magick/.libs/magick_libGraphicsMagick_la-enhance.o magick/.libs/magick_libGraphicsMagick_la-enum_strings.o magick/.libs/magick_libGraphicsMagick_la-error.o magick/.libs/magick_libGraphicsMagick_la-export.o magick/.libs/magick_libGraphicsMagick_la-floats.o magick/.libs/magick_libGraphicsMagick_la-fx.o magick/.libs/magick_libGraphicsMagick_la-gem.o magick/.libs/magick_libGraphicsMagick_la-gradient.o magick/.libs/magick_libGraphicsMagick_la-hclut.o magick/.libs/magick_libGraphicsMagick_la-image.o magick/.libs/magick_libGraphicsMagick_la-import.o magick/.libs/magick_libGraphicsMagick_la-list.o magick/.libs/magick_libGraphicsMagick_la-locale.o magick/.libs/magick_libGraphicsMagick_la-log.o magick/.libs/magick_libGraphicsMagick_la-magic.o magick/.libs/magick_libGraphicsMagick_la-magick.o magick/.libs/magick_libGraphicsMagick_la-magick_endian.o magick/.libs/magick_libGraphicsMagick_la-map.o magick/.libs/magick_libGraphicsMagick_la-memory.o magick/.libs/magick_libGraphicsMagick_la-module.o magick/.libs/magick_libGraphicsMagick_la-monitor.o magick/.libs/magick_libGraphicsMagick_la-montage.o magick/.libs/magick_libGraphicsMagick_la-omp_data_view.o magick/.libs/magick_libGraphicsMagick_la-operator.o magick/.libs/magick_libGraphicsMagick_la-paint.o magick/.libs/magick_libGraphicsMagick_la-pixel_cache.o magick/.libs/magick_libGraphicsMagick_la-pixel_iterator.o magick/.libs/magick_libGraphicsMagick_la-plasma.o magick/.libs/magick_libGraphicsMagick_la-profile.o magick/.libs/magick_libGraphicsMagick_la-quantize.o magick/.libs/magick_libGraphicsMagick_la-registry.o magick/.libs/magick_libGraphicsMagick_la-random.o magick/.libs/magick_libGraphicsMagick_la-render.o magick/.libs/magick_libGraphicsMagick_la-resize.o magick/.libs/magick_libGraphicsMagick_la-resource.o magick/.libs/magick_libGraphicsMagick_la-segment.o magick/.libs/magick_libGraphicsMagick_la-semaphore.o magick/.libs/magick_libGraphicsMagick_la-shear.o magick/.libs/magick_libGraphicsMagick_la-signature.o magick/.libs/magick_libGraphicsMagick_la-static.o magick/.libs/magick_libGraphicsMagick_la-statistics.o magick/.libs/magick_libGraphicsMagick_la-tempfile.o magick/.libs/magick_libGraphicsMagick_la-texture.o magick/.libs/magick_libGraphicsMagick_la-timer.o magick/.libs/magick_libGraphicsMagick_la-transform.o magick/.libs/magick_libGraphicsMagick_la-tsd.o magick/.libs/magick_libGraphicsMagick_la-type.o magick/.libs/magick_libGraphicsMagick_la-unix_port.o magick/.libs/magick_libGraphicsMagick_la-utility.o magick/.libs/magick_libGraphicsMagick_la-version.o coders/.libs/magick_libGraphicsMagick_la-png.o coders/.libs/magick_libGraphicsMagick_la-art.o coders/.libs/magick_libGraphicsMagick_la-avs.o coders/.libs/magick_libGraphicsMagick_la-bmp.o coders/.libs/magick_libGraphicsMagick_la-cals.o coders/.libs/magick_libGraphicsMagick_la-caption.o coders/.libs/magick_libGraphicsMagick_la-cineon.o coders/.libs/magick_libGraphicsMagick_la-cmyk.o coders/.libs/magick_libGraphicsMagick_la-cut.o coders/.libs/magick_libGraphicsMagick_la-dcm.o coders/.libs/magick_libGraphicsMagick_la-dcraw.o coders/.libs/magick_libGraphicsMagick_la-dib.o coders/.libs/magick_libGraphicsMagick_la-dpx.o coders/.libs/magick_libGraphicsMagick_la-fax.o coders/.libs/magick_libGraphicsMagick_la-fits.o coders/.libs/magick_libGraphicsMagick_la-gif.o coders/.libs/magick_libGraphicsMagick_la-gradient.o coders/.libs/magick_libGraphicsMagick_la-gray.o coders/.libs/magick_libGraphicsMagick_la-histogram.o coders/.libs/magick_libGraphicsMagick_la-hrz.o coders/.libs/magick_libGraphicsMagick_la-html.o coders/.libs/magick_libGraphicsMagick_la-icon.o coders/.libs/magick_libGraphicsMagick_la-identity.o coders/.libs/magick_libGraphicsMagick_la-info.o coders/.libs/magick_libGraphicsMagick_la-label.o coders/.libs/magick_libGraphicsMagick_la-locale.o coders/.libs/magick_libGraphicsMagick_la-logo.o coders/.libs/magick_libGraphicsMagick_la-mac.o coders/.libs/magick_libGraphicsMagick_la-map.o coders/.libs/magick_libGraphicsMagick_la-mat.o coders/.libs/magick_libGraphicsMagick_la-matte.o coders/.libs/magick_libGraphicsMagick_la-meta.o coders/.libs/magick_libGraphicsMagick_la-miff.o coders/.libs/magick_libGraphicsMagick_la-mono.o coders/.libs/magick_libGraphicsMagick_la-mpc.o coders/.libs/magick_libGraphicsMagick_la-mpeg.o coders/.libs/magick_libGraphicsMagick_la-mpr.o coders/.libs/magick_libGraphicsMagick_la-msl.o coders/.libs/magick_libGraphicsMagick_la-mtv.o coders/.libs/magick_libGraphicsMagick_la-mvg.o coders/.libs/magick_libGraphicsMagick_la-null.o coders/.libs/magick_libGraphicsMagick_la-otb.o coders/.libs/magick_libGraphicsMagick_la-palm.o coders/.libs/magick_libGraphicsMagick_la-pcd.o coders/.libs/magick_libGraphicsMagick_la-pcl.o coders/.libs/magick_libGraphicsMagick_la-pcx.o coders/.libs/magick_libGraphicsMagick_la-pdb.o coders/.libs/magick_libGraphicsMagick_la-pdf.o coders/.libs/magick_libGraphicsMagick_la-pict.o coders/.libs/magick_libGraphicsMagick_la-pix.o coders/.libs/magick_libGraphicsMagick_la-plasma.o coders/.libs/magick_libGraphicsMagick_la-pnm.o coders/.libs/magick_libGraphicsMagick_la-preview.o coders/.libs/magick_libGraphicsMagick_la-ps.o coders/.libs/magick_libGraphicsMagick_la-ps2.o coders/.libs/magick_libGraphicsMagick_la-ps3.o coders/.libs/magick_libGraphicsMagick_la-psd.o coders/.libs/magick_libGraphicsMagick_la-pwp.o coders/.libs/magick_libGraphicsMagick_la-rgb.o coders/.libs/magick_libGraphicsMagick_la-rla.o coders/.libs/magick_libGraphicsMagick_la-rle.o coders/.libs/magick_libGraphicsMagick_la-sct.o coders/.libs/magick_libGraphicsMagick_la-sfw.o coders/.libs/magick_libGraphicsMagick_la-sgi.o coders/.libs/magick_libGraphicsMagick_la-stegano.o coders/.libs/magick_libGraphicsMagick_la-sun.o coders/.libs/magick_libGraphicsMagick_la-svg.o coders/.libs/magick_libGraphicsMagick_la-tga.o coders/.libs/magick_libGraphicsMagick_la-tile.o coders/.libs/magick_libGraphicsMagick_la-tim.o coders/.libs/magick_libGraphicsMagick_la-topol.o coders/.libs/magick_libGraphicsMagick_la-ttf.o coders/.libs/magick_libGraphicsMagick_la-txt.o coders/.libs/magick_libGraphicsMagick_la-uil.o coders/.libs/magick_libGraphicsMagick_la-url.o coders/.libs/magick_libGraphicsMagick_la-uyvy.o coders/.libs/magick_libGraphicsMagick_la-vicar.o coders/.libs/magick_libGraphicsMagick_la-vid.o coders/.libs/magick_libGraphicsMagick_la-viff.o coders/.libs/magick_libGraphicsMagick_la-wbmp.o coders/.libs/magick_libGraphicsMagick_la-wmf.o coders/.libs/magick_libGraphicsMagick_la-wpg.o coders/.libs/magick_libGraphicsMagick_la-xbm.o coders/.libs/magick_libGraphicsMagick_la-xc.o coders/.libs/magick_libGraphicsMagick_la-xcf.o coders/.libs/magick_libGraphicsMagick_la-xpm.o coders/.libs/magick_libGraphicsMagick_la-yuv.o coders/.libs/magick_libGraphicsMagick_la-jnx.o coders/.libs/magick_libGraphicsMagick_la-jpeg.o coders/.libs/magick_libGraphicsMagick_la-jp2.o coders/.libs/magick_libGraphicsMagick_la-ept.o coders/.libs/magick_libGraphicsMagick_la-tiff.o filters/.libs/magick_libGraphicsMagick_la-analyze.o   | sed -n -e 's/)
        abs_path: (null)
        res_path: (null)
/usr/lib64/libsandbox.so(+0xb9d2)[0x7f5b6898a9d2]
/usr/lib64/libsandbox.so(+0xbae5)[0x7f5b6898aae5]
/usr/lib64/libsandbox.so(+0x5450)[0x7f5b68984450]
/usr/lib64/libsandbox.so(opendir+0x29)[0x7f5b68986ec9]
/bin/sh[0x46f9bc]
/bin/sh[0x47072e]
/bin/sh[0x4707a0]
/bin/sh[0x4707a0]
/bin/sh[0x4707a0]
/bin/sh[0x4707a0]
/proc/8060/cmdline: /bin/sh ./libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -O2 -march=x86-64 -mtune=core-avx-i -mmmx -msse -msse2 -pipe -fno-strict-aliasing -Wall -no-undefined -export-symbols-regex .* -version-info 17:1:14 -Wl,-O1 -Wl,--as-needed -o magick/libGraphicsMagick.la -rpath /usr/lib64 magick/magick_libGraphicsMagick_la-analyze.lo magick/magick_libGraphicsMagick_la-annotate.lo magick/magick_libGraphicsMagick_la-attribute.lo magick/magick_libGraphicsMagick_la-average.lo magick/magick_libGraphicsMagick_la-bit_stream.lo magick/magick_libGraphicsMagick_la-blob.lo magick/magick_libGraphicsMagick_la-cdl.lo magick/magick_libGraphicsMagick_la-channel.lo magick/magick_libGraphicsMagick_la-compare.lo magick/magick_libGraphicsMagick_la-confirm_access.lo magick/magick_libGraphicsMagick_la-color.lo magick/magick_libGraphicsMagick_la-color_lookup.lo magick/magick_libGraphicsMagick_la-colormap.lo magick/magick_libGraphicsMagick_la-colorspace.lo magick/magick_libGraphicsMagick_la-command.lo magick/magick_libGraphicsMagick_la-composite.lo magick/magick_libGraphicsMagick_la-compress.lo magick/magick_libGraphicsMagick_la-constitute.lo magick/magick_libGraphicsMagick_la-decorate.lo magick/magick_libGraphicsMagick_la-delegate.lo magick/magick_libGraphicsMagick_la-deprecate.lo magick/magick_libGraphicsMagick_la-describe.lo magick/magick_libGraphicsMagick_la-draw.lo magick/magick_libGraphicsMagick_la-effect.lo magick/magick_libGraphicsMagick_la-enhance.lo magick/magick_libGraphicsMagick_la-enum_strings.lo magick/magick_libGraphicsMagick_la-error.lo magick/magick_libGraphicsMagick_la-export.lo magick/magick_libGraphicsMagick_la-floats.lo magick/magick_libGraphicsMagick_la-fx.lo magick/magick_libGraphicsMagick_la-gem.lo magick/magick_libGraphicsMagick_la-gradient.lo magick/magick_libGraphicsMagick_la-hclut.lo magick/magick_libGraphicsMagick_la-image.lo magick/magick_libGraphicsMagick_la-import.lo magick/magick_libGraphicsMagick_la-list.lo magick/magick_libGraphicsMagick_la-locale.lo magick/magick_libGraphicsMagick_la-log.lo magick/magick_libGraphicsMagick_la-magic.lo magick/magick_libGraphicsMagick_la-magick.lo magick/magick_libGraphicsMagick_la-magick_endian.lo magick/magick_libGraphicsMagick_la-map.lo magick/magick_libGraphicsMagick_la-memory.lo magick/magick_libGraphicsMagick_la-module.lo magick/magick_libGraphicsMagick_la-monitor.lo magick/magick_libGraphicsMagick_la-montage.lo magick/magick_libGraphicsMagick_la-omp_data_view.lo magick/magick_libGraphicsMagick_la-operator.lo magick/magick_libGraphicsMagick_la-paint.lo magick/magick_libGraphicsMagick_la-pixel_cache.lo magick/magick_libGraphicsMagick_la-pixel_iterator.lo magick/magick_libGraphicsMagick_la-plasma.lo magick/magick_libGraphicsMagick_la-profile.lo magick/magick_libGraphicsMagick_la-quantize.lo magick/magick_libGraphicsMagick_la-registry.lo magick/magick_libGraphicsMagick_la-random.lo magick/magick_libGraphicsMagick_la-render.lo magick/magick_libGraphicsMagick_la-resize.lo magick/magick_libGraphicsMagick_la-resource.lo magick/magick_libGraphicsMagick_la-segment.lo magick/magick_libGraphicsMagick_la-semaphore.lo magick/magick_libGraphicsMagick_la-shear.lo magick/magick_libGraphicsMagick_la-signature.lo magick/magick_libGraphicsMagick_la-static.lo magick/magick_libGraphicsMagick_la-statistics.lo magick/magick_libGraphicsMagick_la-tempfile.lo magick/magick_libGraphicsMagick_la-texture.lo magick/magick_libGraphicsMagick_la-timer.lo magick/magick_libGraphicsMagick_la-transform.lo magick/magick_libGraphicsMagick_la-tsd.lo magick/magick_libGraphicsMagick_la-type.lo magick/magick_libGraphicsMagick_la-unix_port.lo magick/magick_libGraphicsMagick_la-utility.lo magick/magick_libGraphicsMagick_la-version.lo coders/magick_libGraphicsMagick_la-png.lo coders/magick_libGraphicsMagick_la-art.lo coders/magick_libGraphicsMagick_la-avs.lo coders/magick_libGraphicsMagick_la-bmp.lo coders/magick_libGraphicsMagick_la-cals.lo coders/magick_libGraphicsMagick_la-caption.lo coders/magick_libGraphicsMagick_la-cineon.lo coders/magick_libGraphicsMagick_la-cmyk.lo coders/magick_libGraphicsMagick_la-cut.lo coders/m

FWIW, I tried running "make all-am" under strace -f and found these suspicious-looking open(O_DIRECTORY) calls (which I guess corresponds to sandbox's "opendir"?) from the libtool shell process:

8632  open("$NM $libobjs $convenience | $global_symbol_pipe | $SED 's/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
8632  open("'s/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
8632  open("/usr/bin/x86_64-pc-linux-gnu-nm -B  magick/.libs/magick_libGraphicsMagick_la-analyze.o magick/.libs/magick_libGraphicsMagick_la-annotate.o magick/.libs/magick_libGraphicsMagick_la-attribute.o magick/.libs/magick_libGraphicsMagick_la-average.o magick/.libs/"..., O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENAMETOOLONG (File name too long)

(That last one was actually >4096 bytes long; I've abbreviated it here since the comment is long enough already.  It just keeps listing object files up to the 4096-byte point, where strace cuts off.)
Comment 15 SpanKY gentoo-dev 2016-03-29 15:32:17 UTC
(In reply to Andrew Church from comment #14)

so it is a bad call to opendir().  sandbox shouldn't die on that, but it indicates there's another problem in the system too.

what process is that one you're stracing ?  is it the shell ?  what shell is being run there ?
Comment 16 SpanKY gentoo-dev 2016-03-29 16:14:54 UTC
assuming it's bash, please attach the full build log for your build of bash.

also try building bash once w/sandbox disabled and see if imagemagick still dies.
Comment 17 Andrew Church 2016-03-29 16:44:11 UTC
(In reply to SpanKY from comment #15)
> what process is that one you're stracing ?  is it the shell ?  what shell is
> being run there ?

It's just the libtool command line from make:

/bin/sh ./libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -O2 -march=x86-64 -mtune=core-avx-i -mmmx -msse -msse2 -pipe -fno-strict-aliasing -Wall -no-undefined -export-symbols-regex ".*"  -version-info 17:1:14 -Wl,-O1 -Wl,--as-needed -o magick/libGraphicsMagick.la -rpath /usr/lib64 magick/magick_libGraphicsMagick_la-analyze.lo magick/magick_libGraphicsMagick_la-annotate.lo magick/magick_libGraphicsMagick_la-attribute.lo magick/magick_libGraphicsMagick_la-average.lo magick/magick_libGraphicsMagick_la-bit_stream.lo magick/magick_libGraphicsMagick_la-blob.lo magick/magick_libGraphicsMagick_la-cdl.lo magick/magick_libGraphicsMagick_la-channel.lo magick/magick_libGraphicsMagick_la-compare.lo magick/magick_libGraphicsMagick_la-confirm_access.lo magick/magick_libGraphicsMagick_la-color.lo magick/magick_libGraphicsMagick_la-color_lookup.lo magick/magick_libGraphicsMagick_la-colormap.lo magick/magick_libGraphicsMagick_la-colorspace.lo magick/magick_libGraphicsMagick_la-command.lo magick/magick_libGraphicsMagick_la-composite.lo magick/magick_libGraphicsMagick_la-compress.lo magick/magick_libGraphicsMagick_la-constitute.lo magick/magick_libGraphicsMagick_la-decorate.lo magick/magick_libGraphicsMagick_la-delegate.lo magick/magick_libGraphicsMagick_la-deprecate.lo magick/magick_libGraphicsMagick_la-describe.lo magick/magick_libGraphicsMagick_la-draw.lo magick/magick_libGraphicsMagick_la-effect.lo magick/magick_libGraphicsMagick_la-enhance.lo magick/magick_libGraphicsMagick_la-enum_strings.lo magick/magick_libGraphicsMagick_la-error.lo magick/magick_libGraphicsMagick_la-export.lo magick/magick_libGraphicsMagick_la-floats.lo magick/magick_libGraphicsMagick_la-fx.lo magick/magick_libGraphicsMagick_la-gem.lo magick/magick_libGraphicsMagick_la-gradient.lo magick/magick_libGraphicsMagick_la-hclut.lo magick/magick_libGraphicsMagick_la-image.lo magick/magick_libGraphicsMagick_la-import.lo magick/magick_libGraphicsMagick_la-list.lo magick/magick_libGraphicsMagick_la-locale.lo magick/magick_libGraphicsMagick_la-log.lo magick/magick_libGraphicsMagick_la-magic.lo magick/magick_libGraphicsMagick_la-magick.lo magick/magick_libGraphicsMagick_la-magick_endian.lo magick/magick_libGraphicsMagick_la-map.lo magick/magick_libGraphicsMagick_la-memory.lo magick/magick_libGraphicsMagick_la-module.lo magick/magick_libGraphicsMagick_la-monitor.lo magick/magick_libGraphicsMagick_la-montage.lo magick/magick_libGraphicsMagick_la-omp_data_view.lo magick/magick_libGraphicsMagick_la-operator.lo magick/magick_libGraphicsMagick_la-paint.lo magick/magick_libGraphicsMagick_la-pixel_cache.lo magick/magick_libGraphicsMagick_la-pixel_iterator.lo magick/magick_libGraphicsMagick_la-plasma.lo magick/magick_libGraphicsMagick_la-profile.lo magick/magick_libGraphicsMagick_la-quantize.lo magick/magick_libGraphicsMagick_la-registry.lo magick/magick_libGraphicsMagick_la-random.lo magick/magick_libGraphicsMagick_la-render.lo magick/magick_libGraphicsMagick_la-resize.lo magick/magick_libGraphicsMagick_la-resource.lo magick/magick_libGraphicsMagick_la-segment.lo magick/magick_libGraphicsMagick_la-semaphore.lo magick/magick_libGraphicsMagick_la-shear.lo magick/magick_libGraphicsMagick_la-signature.lo magick/magick_libGraphicsMagick_la-static.lo magick/magick_libGraphicsMagick_la-statistics.lo magick/magick_libGraphicsMagick_la-tempfile.lo magick/magick_libGraphicsMagick_la-texture.lo magick/magick_libGraphicsMagick_la-timer.lo magick/magick_libGraphicsMagick_la-transform.lo magick/magick_libGraphicsMagick_la-tsd.lo magick/magick_libGraphicsMagick_la-type.lo magick/magick_libGraphicsMagick_la-unix_port.lo magick/magick_libGraphicsMagick_la-utility.lo magick/magick_libGraphicsMagick_la-version.lo   coders/magick_libGraphicsMagick_la-png.lo coders/magick_libGraphicsMagick_la-art.lo coders/magick_libGraphicsMagick_la-avs.lo coders/magick_libGraphicsMagick_la-bmp.lo coders/magick_libGraphicsMagick_la-cals.lo coders/magick_libGraphicsMagick_la-caption.lo coders/magick_libGraphicsMagick_la-cineon.lo coders/magick_libGraphicsMagick_la-cmyk.lo coders/magick_libGraphicsMagick_la-cut.lo coders/magick_libGraphicsMagick_la-dcm.lo coders/magick_libGraphicsMagick_la-dcraw.lo coders/magick_libGraphicsMagick_la-dib.lo coders/magick_libGraphicsMagick_la-dpx.lo coders/magick_libGraphicsMagick_la-fax.lo coders/magick_libGraphicsMagick_la-fits.lo coders/magick_libGraphicsMagick_la-gif.lo coders/magick_libGraphicsMagick_la-gradient.lo coders/magick_libGraphicsMagick_la-gray.lo coders/magick_libGraphicsMagick_la-histogram.lo coders/magick_libGraphicsMagick_la-hrz.lo coders/magick_libGraphicsMagick_la-html.lo coders/magick_libGraphicsMagick_la-icon.lo coders/magick_libGraphicsMagick_la-identity.lo coders/magick_libGraphicsMagick_la-info.lo coders/magick_libGraphicsMagick_la-label.lo coders/magick_libGraphicsMagick_la-locale.lo coders/magick_libGraphicsMagick_la-logo.lo coders/magick_libGraphicsMagick_la-mac.lo coders/magick_libGraphicsMagick_la-map.lo coders/magick_libGraphicsMagick_la-mat.lo coders/magick_libGraphicsMagick_la-matte.lo coders/magick_libGraphicsMagick_la-meta.lo coders/magick_libGraphicsMagick_la-miff.lo coders/magick_libGraphicsMagick_la-mono.lo coders/magick_libGraphicsMagick_la-mpc.lo coders/magick_libGraphicsMagick_la-mpeg.lo coders/magick_libGraphicsMagick_la-mpr.lo coders/magick_libGraphicsMagick_la-msl.lo coders/magick_libGraphicsMagick_la-mtv.lo coders/magick_libGraphicsMagick_la-mvg.lo coders/magick_libGraphicsMagick_la-null.lo coders/magick_libGraphicsMagick_la-otb.lo coders/magick_libGraphicsMagick_la-palm.lo coders/magick_libGraphicsMagick_la-pcd.lo coders/magick_libGraphicsMagick_la-pcl.lo coders/magick_libGraphicsMagick_la-pcx.lo coders/magick_libGraphicsMagick_la-pdb.lo coders/magick_libGraphicsMagick_la-pdf.lo coders/magick_libGraphicsMagick_la-pict.lo coders/magick_libGraphicsMagick_la-pix.lo coders/magick_libGraphicsMagick_la-plasma.lo coders/magick_libGraphicsMagick_la-pnm.lo coders/magick_libGraphicsMagick_la-preview.lo coders/magick_libGraphicsMagick_la-ps.lo coders/magick_libGraphicsMagick_la-ps2.lo coders/magick_libGraphicsMagick_la-ps3.lo coders/magick_libGraphicsMagick_la-psd.lo coders/magick_libGraphicsMagick_la-pwp.lo coders/magick_libGraphicsMagick_la-rgb.lo coders/magick_libGraphicsMagick_la-rla.lo coders/magick_libGraphicsMagick_la-rle.lo coders/magick_libGraphicsMagick_la-sct.lo coders/magick_libGraphicsMagick_la-sfw.lo coders/magick_libGraphicsMagick_la-sgi.lo coders/magick_libGraphicsMagick_la-stegano.lo coders/magick_libGraphicsMagick_la-sun.lo coders/magick_libGraphicsMagick_la-svg.lo coders/magick_libGraphicsMagick_la-tga.lo coders/magick_libGraphicsMagick_la-tile.lo coders/magick_libGraphicsMagick_la-tim.lo coders/magick_libGraphicsMagick_la-topol.lo coders/magick_libGraphicsMagick_la-ttf.lo coders/magick_libGraphicsMagick_la-txt.lo coders/magick_libGraphicsMagick_la-uil.lo coders/magick_libGraphicsMagick_la-url.lo coders/magick_libGraphicsMagick_la-uyvy.lo coders/magick_libGraphicsMagick_la-vicar.lo coders/magick_libGraphicsMagick_la-vid.lo coders/magick_libGraphicsMagick_la-viff.lo coders/magick_libGraphicsMagick_la-wbmp.lo coders/magick_libGraphicsMagick_la-wmf.lo coders/magick_libGraphicsMagick_la-wpg.lo coders/magick_libGraphicsMagick_la-xbm.lo coders/magick_libGraphicsMagick_la-xc.lo coders/magick_libGraphicsMagick_la-xcf.lo coders/magick_libGraphicsMagick_la-xpm.lo coders/magick_libGraphicsMagick_la-yuv.lo     coders/magick_libGraphicsMagick_la-jnx.lo coders/magick_libGraphicsMagick_la-jpeg.lo coders/magick_libGraphicsMagick_la-jp2.lo coders/magick_libGraphicsMagick_la-ept.lo coders/magick_libGraphicsMagick_la-tiff.lo   filters/magick_libGraphicsMagick_la-analyze.lo -ltiff -lfreetype -ljasper -ljpeg -lpng16 -lz -lm 

I stuck a -x on the /bin/sh call and it looks like there's some sort of quoting breakage in libtool: (strace output interleaved appropriately)

+ rm -f magick/.libs/libGraphicsMagick.exp
+ cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' \
| sort | uniq > $export_symbols'
+ save_ifs='
'
+ IFS='~'
27976 open("$NM $libobjs $convenience | $global_symbol_pipe | $SED 's/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
+ for cmd1 in '$cmds'
+ IFS='
'
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ try_normal_branch=yes
27976 open("'s/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No su\
ch file or directory)
+ eval 'cmd="$NM' '$libobjs' '$convenience' '|' '$global_symbol_pipe' '|' '$SED\
' ''\''s/.*' '//'\''' '|' sort '|' uniq '>' '$export_symbols"'
[...]
++ _G_message='/usr/bin/x86_64-pc-linux-gnu-nm -B  magick/.libs/magick_libGraphicsMagick_la-analyze.o magick/.libs/magick_libGraphicsMagick_la-annotate.o [...]
++ func_echo_IFS='
'
++ IFS='
'
28931 open("/usr/bin/x86_64-pc-linux-gnu-nm -B  magick/.libs/magick_libGraphicsMagick_la-analyze.o magick/.libs/magick_libGraphicsMagick_la-annotate.o [...]", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENAMETOOLONG (File name too long)
++ for _G_line in '$_G_message'

Digging in further, it looks like the relevant part of libtool starts at line 10240:

            $opt_dry_run || $RM $export_symbols
            cmds=$export_symbols_cmds
            save_ifs=$IFS; IFS='~'
            for cmd1 in $cmds; do
              IFS=$save_ifs
              # Take the normal branch if the nm_file_list_spec branch
              # doesn't work or if tool conversion is not needed.
              case $nm_file_list_spec~$to_tool_file_cmd in
                *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*\
)
                  try_normal_branch=yes
                  eval cmd=\"$cmd1\"
                  func_len " $cmd"
                  len=$func_len_result
                  ;;
                *)
                  try_normal_branch=no
                  ;;
              esac
              if test yes = "$try_normal_branch" \
                 && { test "$len" -lt "$max_cmd_len" \
                      || test "$max_cmd_len" -le -1; }
              then
                func_show_eval "$cmd" 'exit $?'   # <-- in here
                skipped_export=false
              elif test -n "$nm_file_list_spec"; then
              [...]

func_show_eval ()
{
    $debug_cmd

    _G_cmd=$1
    _G_fail_exp=${2-':'}

    func_quote_for_expand "$_G_cmd"
    eval "func_notquiet $func_quote_for_expand_result"  # <-- in here

    $opt_dry_run || {
      eval "$_G_cmd"
      _G_status=$?
      if test 0 -ne "$_G_status"; then
        eval "(exit $_G_status); $_G_fail_exp"
      fi
    }
}

func_notquiet ()
{
    $debug_cmd

    $opt_quiet || func_echo ${1+"$@"}  # <-- in here

    # A bug in bash halts the script if the last line of a function
    # fails when set -e is in force, so we need another command to
    # work around that:
    :
}

func_echo ()
{
    $debug_cmd

    _G_message=$*

    func_echo_IFS=$IFS
    IFS=$nl  
### invalid opendir call occurs here
    for _G_line in $_G_message; do
      IFS=$func_echo_IFS
      $ECHO "$progname: $_G_line"
    done
    IFS=$func_echo_IFS
}


So maybe bash is doing something weird when IFS changes?

Just saw the additional comment, will rebuild bash now and attach the build log.
Comment 18 Andrew Church 2016-03-29 16:49:59 UTC
Created attachment 429244 [details]
Build log for bash-4.3_p42-r2

graphicsmagick-1.3.23 builds fine with sandbox disabled, to answer the other question.
Comment 19 Andrew Church 2016-03-29 16:57:26 UTC
(In reply to SpanKY from comment #16)
> also try building bash once w/sandbox disabled and see if imagemagick still
> dies.

Sorry, missed the "bash" here -- to answer this question, graphicsmagick still dies if I rebuild bash with sandbox disabled.
Comment 20 SpanKY gentoo-dev 2016-03-29 17:22:12 UTC
(In reply to Andrew Church from comment #17)

libtool is just a shell script which means it has to run through an interp.  usually it's #!/bin/bash (and actively avoids #!/bin/sh), but still want to know for sure.  strace will follow that ELF rather than libtool.
Comment 21 Andrew Church 2016-03-29 17:36:15 UTC
(In reply to SpanKY from comment #20)
> libtool is just a shell script which means it has to run through an interp. 
> usually it's #!/bin/bash (and actively avoids #!/bin/sh), but still want to
> know for sure.  strace will follow that ELF rather than libtool.

Sorry, I should have been clear about that.  Yes, it's bash.
Comment 22 SpanKY gentoo-dev 2016-04-01 22:35:57 UTC
ok, bash/libtool misbehaving shouldn't really concern sandbox.  a simple testcase that makes sandbox fall over:
  int main() {
    char path[8192 + 10];
    memset(path, 'a', sizeof(path));
    path[sizeof(path) - 1] = '\0';
    path[0] = '/';
    opendir(path);
  }

the 8192 limit is because we base SB_PATH_MAX off PATH_MAX*2, and PATH_MAX is 4096.  the internal sandbox code limits itself to that in a few places.

we should just return an error like normal w/ENAMETOOLONG and let the higher up levels do what they will.
Comment 23 Wolfram Schlich (RETIRED) gentoo-dev 2016-04-04 07:45:38 UTC
(In reply to SpanKY from comment #22)
> [...]
> the 8192 limit is because we base SB_PATH_MAX off PATH_MAX*2, and PATH_MAX
> is 4096.  the internal sandbox code limits itself to that in a few places.
> 
> we should just return an error like normal w/ENAMETOOLONG and let the higher
> up levels do what they will.

From what I can see at https://gitweb.gentoo.org/proj/sandbox.git/log/ there's no fix checked in yet. Any plans for a fix yet? :)
Comment 24 SpanKY gentoo-dev 2016-04-04 15:35:49 UTC
(In reply to Wolfram Schlich from comment #23)

the bug is still open.  i'll post an update/close things when there's an actual fix out there.
Comment 25 Coacher 2016-06-11 13:56:13 UTC
*** Bug 584948 has been marked as a duplicate of this bug. ***
Comment 26 SpanKY gentoo-dev 2016-07-04 06:08:06 UTC
*** Bug 587894 has been marked as a duplicate of this bug. ***
Comment 27 Mart Raudsepp gentoo-dev 2016-09-23 01:54:27 UTC
We can't do basic version bumps because sandbox gets in the way with its 8064 thing that seems to apply to simple command line length now. Everyone that has tested has been affected for bug 587894 by sandbox being bugged. And the old version of that package that doesn't have so large libtool link line yet aborts with newer versions of libraries it relies on. So we are completely blocked due to sandbox being broken for months. Please fix.
I don't know the relationship to the graphicsmagick one here, as that command line length seems to have been in the 7972 range, not above 8k. Nor have I tried to reproduce that, but our builder bug was marked as DUP of this one here.
Comment 28 Mart Raudsepp gentoo-dev 2016-09-27 13:23:49 UTC
In case of gnome-builder failure, the problem goes away if I remove the "-export-symbols-regex ..." part from the link line. Which of course isn't a solution, because the exported symbols do need to be filtered by the regex to not have private symbols public. But it seems there's something in that part of libtool subcommands that triggers the sandbox fault, but running the nm -B call manually inside sandbox that seems to be the last thing to be done by libtool before sandbox fails succeeds, so I'm still not sure what part fails. An earlier version uses the same -export-symbols-regex, but doesn't fail (possibly less files to export symbols with NM from). Some more details on that debugging session in bug 587894.
Comment 29 Mart Raudsepp gentoo-dev 2016-09-27 15:09:31 UTC
Why is it even seeing an opendir with path set to what is actually a command line (and so not a subject to true PATH_MAX)?

 * ISE for opendir(/usr/bin/x86_64-pc-linux-gnu-nm -B  directory/.libs/libide_1_0_la-ide-directory-build-system.o directory/.libs/libide_1_0_la-ide-directory-genesis-addin.o directory/.libs/libide_1_0_la-ide-directory-plugin.o directory/.libs/libide_1_0_la-ide-directory-vcs.o doap/.libs/libide_1_0_la-ide-doap-person.o doap/.libs/libide_1_0_la-ide-doap.o editor/.libs/libide_1_0_la-ide-editor-perspective.o editor/.libs/libide_1_0_la-ide-editor-view-addin.o editor/.libs/libide_1_0_la-ide-editor-view.o genesis/.libs/libide_1_0_la-ide-genesis-addin.o genesis/.libs/libide_1_0_la-ide-genesis-perspective.o .libs/libide_1_0_la-ide-application-addin.o .libs/libide_1_0_la-ide-application-tool.o .libs/libide_1_0_la-ide-application.o .libs/libide_1_0_la-ide-back-forward-item.o .libs/libide_1_0_la-ide-back-forward-list-load.o .libs/libide_1_0_la-ide-back-forward-list-save.o .libs/libide_1_0_la-ide-back-forward-list.o .libs/libide_1_0_la-ide-buffer-change-monitor.o .libs/libide_1_0_la-ide-buffer-manager.o .libs/libide_1_0_la-ide-buffer.o .libs/libide_1_0_la-ide-build-result-addin.o .libs/libide_1_0_la-ide-build-result.o .libs/libide_1_0_la-ide-build-system.o .libs/libide_1_0_la-ide-builder.o .libs/libide_1_0_la-ide-completion-item.o .libs/libide_1_0_la-ide-completion-provider.o .libs/libide_1_0_la-ide-completion-results.o .libs/libide_1_0_la-ide-configuration-manager.o .libs/libide_1_0_la-ide-configuration.o .libs/libide_1_0_la-ide-context.o .libs/libide_1_0_la-ide-debugger.o .libs/libide_1_0_la-ide-deployer.o .libs/libide_1_0_la-ide-device-manager.o .libs/libide_1_0_la-ide-device-provider.o .libs/libide_1_0_la-ide-device.o .libs/libide_1_0_la-ide-diagnostic-provider.o .libs/libide_1_0_la-ide-diagnostic.o .libs/libide_1_0_la-ide-diagnostician.o .libs/libide_1_0_la-ide-diagnostics.o .libs/libide_1_0_la-ide-environment-editor-row.o .libs/libide_1_0_la-ide-environment-editor.o .libs/libide_1_0_la-ide-environment-variable.o .libs/libide_1_0_la-ide-environment.o .libs/libide_1_0_la-ide-executable.o .libs/libide_1_0_la-ide-executer.o .libs/libide_1_0_la-ide-extension-adapter.o .libs/libide_1_0_la-ide-extension-set-adapter.o .libs/libide_1_0_la-ide-file-settings.o .libs/libide_1_0_la-ide-file.o .libs/libide_1_0_la-ide-fixit.o .libs/libide_1_0_la-ide-highlight-engine.o .libs/libide_1_0_la-ide-highlight-index.o .libs/libide_1_0_la-ide-highlighter.o .libs/libide_1_0_la-ide-indenter.o .libs/libide_1_0_la-ide-layout-grid.o .libs/libide_1_0_la-ide-layout-pane.o .libs/libide_1_0_la-ide-layout-stack.o .libs/libide_1_0_la-ide-layout-view.o .libs/libide_1_0_la-ide-layout.o .libs/libide_1_0_la-ide-log.o .libs/libide_1_0_la-ide-object.o .libs/libide_1_0_la-ide-pattern-spec.o .libs/libide_1_0_la-ide-perspective.o .libs/libide_1_0_la-ide-preferences-addin.o .libs/libide_1_0_la-ide-preferences.o .libs/libide_1_0_la-ide-process.o .libs/libide_1_0_la-ide-progress.o .libs/libide_1_0_la-ide-project-file.o .libs/libide_1_0_la-ide-project-files.o .libs/libide_1_0_la-ide-project-info.o .libs/libide_1_0_la-ide-project-item.o .libs/libide_1_0_la-ide-project-miner.o .libs/libide_1_0_la-ide-project.o .libs/libide_1_0_la-ide-recent-projects.o .libs/libide_1_0_la-ide-refactory.o .libs/libide_1_0_la-ide-runtime-manager.o .libs/libide_1_0_la-ide-runtime-provider.o .libs/libide_1_0_la-ide-runtime.o .libs/libide_1_0_la-ide-script-manager.o .libs/libide_1_0_la-ide-script.o .libs/libide_1_0_la-ide-search-context.o .libs/libide_1_0_la-ide-search-engine.o .libs/libide_1_0_la-ide-search-provider.o .libs/libide_1_0_la-ide-search-result.o .libs/libide_1_0_la-ide-service.o .libs/libide_1_0_la-ide-settings.o .libs/libide_1_0_la-ide-source-location.o .libs/libide_1_0_la-ide-source-map.o .libs/libide_1_0_la-ide-source-range.o .libs/libide_1_0_la-ide-source-snippet-chunk.o .libs/libide_1_0_la-ide-source-snippet-context.o .libs/libide_1_0_la-ide-source-snippet.o .libs/libide_1_0_la-ide-source-snippets-manager.o .libs/libide_1_0_la-ide-source-snippets.o .libs/libide_1_0_la-ide-source-style-scheme.o .libs/libide_1_0_la-ide-source-view-mode.o .libs/libide_1_0_la-ide-source-view.o .libs/libide_1_0_la-ide-subprocess-launcher.o .libs/libide_1_0_la-ide-symbol-node.o .libs/libide_1_0_la-ide-symbol-resolver.o .libs/libide_1_0_la-ide-symbol-tree.o .libs/libide_1_0_la-ide-symbol.o .libs/libide_1_0_la-ide-tags-builder.o .libs/libide_1_0_la-ide-target.o .libs/libide_1_0_la-ide-test-case.o .libs/libide_1_0_la-ide-test-suite.o .libs/libide_1_0_la-ide-thread-pool.o .libs/libide_1_0_la-ide-tree-builder.o .libs/libide_1_0_la-ide-tree-node.o .libs/libide_1_0_la-ide-tree.o .libs/libide_1_0_la-ide-unsaved-file.o .libs/libide_1_0_la-ide-unsaved-files.o .libs/libide_1_0_la-ide-uri.o .libs/libide_1_0_la-ide-vcs-uri.o .libs/libide_1_0_la-ide-vcs.o .libs/libide_1_0_la-ide-workbench-addin.o .libs/libide_1_0_la-ide-workbench-header-bar.o .libs/libide_1_0_la-ide-workbench-open.o .libs/libide_1_0_la-ide-workbench.o .libs/libide_1_0_la-ide-worker.o .libs/libide_1_0_la-ide.o local/.libs/libide_1_0_la-ide-local-device.o preferences/.libs/libide_1_0_la-ide-preferences-entry.o preferences/.libs/libide_1_0_la-ide-preferences-file-chooser-button.o preferences/.libs/libide_1_0_la-ide-preferences-flow-box.o preferences/.libs/libide_1_0_la-ide-preferences-font-button.o preferences/.libs/libide_1_0_la-ide-preferences-group.o preferences/.libs/libide_1_0_la-ide-preferences-page.o preferences/.libs/libide_1_0_la-ide-preferences-spin-button.o preferences/.libs/libide_1_0_la-ide-preferences-switch.o search/.libs/libide_1_0_la-ide-omni-search-display.o search/.libs/libide_1_0_la-ide-omni-search-entry.o search/.libs/libide_1_0_la-ide-omni-search-group.o search/.libs/libide_1_0_la-ide-omni-search-row.o template/.libs/libide_1_0_la-ide-project-template.o template/.libs/libide_1_0_la-ide-template-base.o template/.libs/libide_1_0_la-ide-template-provider.o util/.libs/libide_1_0_la-ide-cairo.o util/.libs/libide_1_0_la-ide-dnd.o util/.libs/libide_1_0_la-ide-file-manager.o util/.libs/libide_1_0_la-ide-gtk.o util/.libs/libide_1_0_la-ide-line-reader.o util/.libs/libide_1_0_la-ide-pango.o util/.libs/libide_1_0_la-ide-posix.o util/.libs/libide_1_0_la-ide-rgba.o editor/.libs/libide_1_0_la-ide-editor-frame-actions.o editor/.libs/libide_1_0_la-ide-editor-frame.o editor/.libs/libide_1_0_la-ide-editor-map-bin.o editor/.libs/libide_1_0_la-ide-editor-plugin.o editor/.libs/libide_1_0_la-ide-editor-print-operation.o editor/.libs/libide_1_0_la-ide-editor-tweak-widget.o editor/.libs/libide_1_0_la-ide-editor-view-actions.o editor/.libs/libide_1_0_la-ide-editor-workbench-addin.o greeter/.libs/libide_1_0_la-ide-greeter-perspective.o greeter/.libs/libide_1_0_la-ide-greeter-project-row.o gsettings/.libs/libide_1_0_la-ide-gsettings-file-settings.o gsettings/.libs/libide_1_0_la-ide-language-defaults.o .libs/libide_1_0_la-ide-application-command-line.o .libs/libide_1_0_la-ide-application-actions.o .libs/libide_1_0_la-ide-application-plugins.o .libs/libide_1_0_la-ide-application-tests.o .libs/libide_1_0_la-ide-async-helper.o .libs/libide_1_0_la-ide-battery-monitor.o .libs/libide_1_0_la-ide-css-provider.o .libs/libide_1_0_la-ide-extension-util.o .libs/libide_1_0_la-ide-keybindings.o .libs/libide_1_0_la-ide-layout-stack-actions.o .libs/libide_1_0_la-ide-layout-tab.o .libs/libide_1_0_la-ide-layout-tab-bar.o .libs/libide_1_0_la-ide-line-change-gutter-renderer.o .libs/libide_1_0_la-ide-line-diagnostics-gutter-renderer.o .libs/libide_1_0_la-ide-perspective-switcher.o .libs/libide_1_0_la-ide-ref-ptr.o .libs/libide_1_0_la-ide-search-reducer.o .libs/libide_1_0_la-ide-shortcuts-window.o .libs/libide_1_0_la-ide-source-iter.o .libs/libide_1_0_la-ide-source-snippet-completion-item.o .libs/libide_1_0_la-ide-source-snippet-completion-provider.o .libs/libide_1_0_la-ide-source-snippet-parser.o .libs/libide_1_0_la-ide-source-view-capture.o .libs/libide_1_0_la-ide-source-view-movements.o .libs/libide_1_0_la-ide-text-iter.o .libs/libide_1_0_la-ide-theme-manager.o .libs/libide_1_0_la-ide-workbench-actions.o .libs/libide_1_0_la-ide-worker-manager.o .libs/libide_1_0_la-ide-worker-process.o modelines/.libs/libide_1_0_la-ide-modelines-file-settings.o modelines/.libs/libide_1_0_la-modeline-parser.o preferences/.libs/libide_1_0_la-ide-preferences-builtin.o preferences/.libs/libide_1_0_la-ide-preferences-bin.o preferences/.libs/libide_1_0_la-ide-preferences-language-row.o preferences/.libs/libide_1_0_la-ide-preferences-perspective.o theatrics/.libs/libide_1_0_la-ide-box-theatric.o util/.libs/libide_1_0_la-ide-doc-seq.o util/.libs/libide_1_0_la-ide-gdk.o util/.libs/libide_1_0_la-ide-text-util.o util/.libs/libide_1_0_la-ide-window-settings.o editorconfig/.libs/libide_1_0_la-editorconfig-glib.o editorconfig/.libs/libide_1_0_la-ide-editorconfig-file-settings.o pygobject/.libs/libide_1_0_la-ide-pygobject-script.o .libs/libide_1_0_la-ide-enums.o resources/.libs/libide_1_0_la-ide-resources.o   ../data/icons/hicolor/.libs/libicons.a ../contrib/gd/.libs/libgd.a ../contrib/nautilus/.libs/libnautilus.a ../contrib/xml/.libs/libxml.a ../contrib/libeditorconfig/.libs/libeditorconfig.a | sed -n -e 's/):
	abs_path: (null)
	res_path: (null)
Comment 30 Mart Raudsepp gentoo-dev 2016-09-27 15:54:02 UTC
Ok, right, so /bin/sh or something is doing that stupid opendir call as I found from some additional sb_dump_backtrace's and gdb'ing info symbols (in case of dash, it points at expmeta for metacharacter expansion and in bash at its glob stuff), and without sandbox it indeed just gets ENAMETOOLONG as already seen above and I got so far now too:

[pid 24070] open("/usr/bin/x86_64-pc-linux-gnu-nm -B  directory/.libs/libide_1_0_la-ide-directory-build-system.o directory/.libs/libide_1_0_la-ide-directory-genesis-addin.o directory/.libs/libide_1_0_la-ide-directory-plugin.o directory/.libs/libide_1_0_la-ide-directory-vcs.o doap/.libs/libide_1_0_la-ide-doap-person.o doap/.libs/libide_1_0_la-ide-doap.o editor/.libs/libide_1_0_la-ide-editor-perspective.o editor/.libs/libide_1_0_la-ide-editor-view-addin.o editor/.libs/libide_1_0_la-ide-editor-view.o genesis/.libs/libide_1_0_la-ide-genesis-addin.o genesis/.libs/libide_1_0_la-ide-genesis-perspective.o .libs/libide_1_0_la-ide-application-addin.o .libs/libide_1_0_la-ide-application-tool.o .libs/libide_1_0_la-ide-application.o .libs/libide_1_0_la-ide-back-forward-item.o .libs/libide_1_0_la-ide-back-forward-list-load.o .libs/libide_1_0_la-ide-back-forward-list-save.o .libs/libide_1_0_la-ide-back-forward-list.o .libs/libide_1_0_la-ide-buffer-change-monitor.o .libs/libide_1_0_la-ide-buffer-manager.o .libs/libide_1_0_la-ide-buffer.o .libs/libide_1_0_la-ide-build-result-addin.o .libs/libide_1_0_la-ide-build-result.o .libs/libide_1_0_la-ide-build-system.o .libs/libide_1_0_la-ide-builder.o .libs/libide_1_0_la-ide-completion-item.o .libs/libide_1_0_la-ide-completion-provider.o .libs/libide_1_0_la-ide-completion-results.o .libs/libide_1_0_la-ide-configuration-manager.o .libs/libide_1_0_la-ide-configuration.o .libs/libide_1_0_la-ide-context.o .libs/libide_1_0_la-ide-debugger.o .libs/libide_1_0_la-ide-deployer.o .libs/libide_1_0_la-ide-device-manager.o .libs/libide_1_0_la-ide-device-provider.o .libs/libide_1_0_la-ide-device.o .libs/libide_1_0_la-ide-diagnostic-provider.o .libs/libide_1_0_la-ide-diagnostic.o .libs/libide_1_0_la-ide-diagnostician.o .libs/libide_1_0_la-ide-diagnostics.o .libs/libide_1_0_la-ide-environment-editor-row.o .libs/libide_1_0_la-ide-environment-editor.o .libs/libide_1_0_la-ide-environment-variable.o .libs/libide_1_0_la-ide-environment.o .libs/libide_1_0_la-ide-executable.o .libs/libide_1_0_la-ide-executer.o .libs/libide_1_0_la-ide-extension-adapter.o .libs/libide_1_0_la-ide-extension-set-adapter.o .libs/libide_1_0_la-ide-file-settings.o .libs/libide_1_0_la-ide-file.o .libs/libide_1_0_la-ide-fixit.o .libs/libide_1_0_la-ide-highlight-engine.o .libs/libide_1_0_la-ide-highlight-index.o .libs/libide_1_0_la-ide-highlighter.o .libs/libide_1_0_la-ide-indenter.o .libs/libide_1_0_la-ide-layout-grid.o .libs/libide_1_0_la-ide-layout-pane.o .libs/libide_1_0_la-ide-layout-stack.o .libs/libide_1_0_la-ide-layout-view.o .libs/libide_1_0_la-ide-layout.o .libs/libide_1_0_la-ide-log.o .libs/libide_1_0_la-ide-object.o .libs/libide_1_0_la-ide-pattern-spec.o .libs/libide_1_0_la-ide-perspective.o .libs/libide_1_0_la-ide-preferences-addin.o .libs/libide_1_0_la-ide-preferences.o .libs/libide_1_0_la-ide-process.o .libs/libide_1_0_la-ide-progress.o .libs/libide_1_0_la-ide-project-file.o .libs/libide_1_0_la-ide-project-files.o .libs/libide_1_0_la-ide-project-info.o .libs/libide_1_0_la-ide-project-item.o .libs/libide_1_0_la-ide-project-miner.o .libs/libide_1_0_la-ide-project.o .libs/libide_1_0_la-ide-recent-projects.o .libs/libide_1_0_la-ide-refactory.o .libs/libide_1_0_la-ide-runtime-manager.o .libs/libide_1_0_la-ide-runtime-provider.o .libs/libide_1_0_la-ide-runtime.o .libs/libide_1_0_la-ide-script-manager.o .libs/libide_1_0_la-ide-script.o .libs/libide_1_0_la-ide-search-context.o .libs/libide_1_0_la-ide-search-engine.o .libs/libide_1_0_la-ide-search-provider.o .libs/libide_1_0_la-ide-search-result.o .libs/libide_1_0_la-ide-service.o .libs/libide_1_0_la-ide-settings.o .libs/libide_1_0_la-ide-source-location.o .libs/libide_1_0_la-ide-source-map.o .libs/libide_1_0_la-ide-source-range.o .libs/libide_1_0_la-ide-source-snippet-chunk.o .libs/libide_1_0_la-ide-source-snippet-context.o .libs/libide_1_0_la-ide-source-snippet.o .libs/libide_1_0_la-ide-source-snippets-manager.o .libs/libide_1_0_la-ide-source-snippets.o .libs/libide_1_0_la-ide-source-style-scheme.o .libs/libide_1_0_la-ide-source-view-mode.o .libs/libide_1_0_la-ide-source-view.o .libs/libide_1_0_la-ide-subp"..., O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENAMETOOLONG (File name too long)
Comment 31 Mart Raudsepp gentoo-dev 2016-09-27 18:00:19 UTC
Created attachment 448140 [details, diff]
Patch to fix opendir

[PATCH] libsandbox: do not abort with a long name to opendir

Add a pre-check for opendir that catches too long name arguments
given to opendir, as it would get messed up and abort before it
even gets to the open*() syscall (which would handle it correctly),
due to opendir going through before_syscall/check_syscall, even
though it isn't a true syscall and it getting cut to SB_PATH_MAX
inbetween and getting confused somewhere.
Comment 32 Zac Medico gentoo-dev 2016-10-03 00:22:46 UTC
(In reply to Mart Raudsepp from comment #31)
> Created attachment 448140 [details, diff] [details, diff]
> Patch to fix opendir

I think strnlen(name, PATH_MAX) == PATH_MAX is probably ideal, since strnlen will return PATH_MAX if it doesn't find a null terminator.
Comment 33 Mart Raudsepp gentoo-dev 2016-11-11 10:39:19 UTC
Created attachment 452968 [details, diff]
Patch to fix opendir (strnlen approach)

I realized I never attached a git-am'able version with the strnlen case, so here it is. Hopefully vapier is back now and can pick which version to use and get this sorted in main tree.
PATH_MAX*2 in both places instead of PATH_MAX works as well for strnlen, I believe, but stat itself will get ENAMETOOLONG anyways with even lower than PATH_MAX, so I figure there's no point in making the EARLY FAIL not happen when it's over PATH_MAX, only to go through more checks (full opendir syscall check, and then all for stat as well) and waste time.
Comment 34 Mart Raudsepp gentoo-dev 2016-12-30 09:01:06 UTC
I've pushed p.masked sandbox-2.10-r3 and sandbox-2.11-r4 to the Gentoo package tree with the strnlen approach patch added.
Will unmask 2.10-r3 to go into ~arch soon, when I get a chance to work on gnome-builder 3.22 bump, which requires this fix to link without -sandbox -usersandbox. Unless there are valid objections by then.
None of that fixes this bug though, as I consider this the upstream bug report, and I don't intend to arrange myself push access to there or anything like that to fix it upstream myself.

Testing by others of 2.10-r3 welcome though, especially if you have a breaking graphicsmagick build before, as I have not tried graphicsmagick pre or post patch.
Comment 35 Andrew Church 2016-12-30 18:45:06 UTC
I can successfully build graphicsmagick-1.3.25 with sandbox-2.10-r3 (was failing with 2.10-r2).
Comment 36 Larry the Git Cow gentoo-dev 2017-10-03 16:36:58 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=ffc185bb4929de36ad3f8766b114cd11be8f0a62

commit ffc185bb4929de36ad3f8766b114cd11be8f0a62
Author:     Mart Raudsepp <leio@gentoo.org>
AuthorDate: 2016-11-11 10:34:48 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2017-09-26 20:14:36 +0000

    libsandbox: do not abort with a long name to opendir
    
    Add a pre-check for opendir that catches too long name arguments
    given to opendir, as it would get messed up and abort before it
    even gets to the open*() syscall (which would handle it correctly),
    due to opendir going through before_syscall/check_syscall, even
    though it isn't a true syscall and it getting cut to SB_PATH_MAX
    inbetween and getting confused somewhere.
    
    Test case added by Michał Górny <mgorny@gentoo.org>.
    
    Bug: https://bugs.gentoo.org/553092
    Signed-off-by: Mart Raudsepp <leio@gentoo.org>

 libsandbox/wrapper-funcs/opendir.c           |  2 ++
 libsandbox/wrapper-funcs/opendir_pre_check.c | 26 ++++++++++++++++++++++++++
 libsandbox/wrappers.h                        |  1 +
 tests/opendir-1.sh                           |  7 +++++++
 tests/opendir.at                             |  1 +
 5 files changed, 37 insertions(+)}
Comment 37 Larry the Git Cow gentoo-dev 2017-10-03 19:09:47 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f089d8f7ac269caae913866fe7fce7291ebcad3

commit 9f089d8f7ac269caae913866fe7fce7291ebcad3
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2017-10-03 18:20:03 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2017-10-03 19:09:26 +0000

    sys-apps/sandbox: Bump to 2.12
    
    Closes: https://bugs.gentoo.org/553092
    Closes: https://bugs.gentoo.org/580726

 sys-apps/sandbox/Manifest            |  1 +
 sys-apps/sandbox/sandbox-2.12.ebuild | 70 ++++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+)