Summary: | net-libs/farstream-0.2.6 - sandbox access violation by /usr/lib64/gstreamer-1.0/gst-plugin-scanner -l in /dev/video0 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alan McKinnon <alan.mckinnon> |
Component: | Current packages | Assignee: | No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | biergaizi2009, g.djavadyan, gstreamer, rose |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://bugzilla.gnome.org/show_bug.cgi?id=744135 | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=538888 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 570624 | ||
Bug Blocks: | |||
Attachments: |
build.log
sandbox log |
Description
Alan McKinnon
2015-02-07 12:53:53 UTC
I've got same failure. Additionally, the compile stage reports following error: (gst-plugin-scanner:26018): GStreamer-CRITICAL **: gst_structure_new_empty: assertion 'gst_structure_validate_name (name)' failed * ACCESS DENIED: open_wr: /dev/video0 No protocol specified (gst-plugin-scanner:26018): Clutter-CRITICAL **: Unable to initialize Clutter: Unable to open display ':0' As a workaround, I used: FEATURES="-sandbox -usersandbox" emerge -av1 farstream On my system the culprit is the v4l2 plugin: https://bugzilla.gnome.org/show_bug.cgi?id=744135 *** Bug 539944 has been marked as a duplicate of this bug. *** Still fails with: sed -i -e \ 's/GST_INSPECT = $(GST_TOOLS_DIR)\/gst-inspect-$(GST_API_VERSION)/GST_INSPECT = $(type -P true)/' \ common/check.mak tests/check/Makefile.in || die sed -i -e '/GST_PLUGIN_SCANNER/d' common/m4/gst-check.m4 || die + 13 Feb 2015; Pacho Ramos <pacho@gentoo.org> -farstream-0.2.6.ebuild, + farstream-0.2.7.ebuild: + Prevent sandbox violations, bug #539224 + farstream-0.2.7 fails again with sandbox VIOLATION: ... make[1]: Leaving directory '/var/tmp/portage/net-libs/farstream-0.2.7/work/farstream-0.2.7' >>> Source compiled. * --------------------------- ACCESS VIOLATION SUMMARY --------------------------- * LOG FILE: "/var/log/sandbox/sandbox-31287.log" * VERSION 1.0 FORMAT: F - Function called FORMAT: S - Access Status FORMAT: P - Path as passed to function FORMAT: A - Absolute Path (not canonical) FORMAT: R - Canonical Path FORMAT: C - Command Line F: open_wr S: deny P: /dev/radio0 A: /dev/radio0 R: /dev/radio0 C: /usr/lib64/gstreamer-1.0/gst-plugin-scanner -l F: open_wr S: deny P: /dev/vbi0 A: /dev/vbi0 R: /dev/vbi0 C: /usr/lib64/gstreamer-1.0/gst-plugin-scanner -l F: open_wr S: deny P: /dev/video1 A: /dev/video1 R: /dev/video1 C: /usr/lib64/gstreamer-1.0/gst-plugin-scanner -l * -------------------------------------------------------------------------------- >>> Failed to emerge net-libs/farstream-0.2.7, Log file: Works for me with this USE: Calculating dependencies... done! [ebuild U ] net-libs/farstream-0.2.7:0.2/5 [0.2.6:0.2/0.2] USE="introspection msn upnp {-test}" 0 KiB Thanks for the fix (In reply to Alan McKinnon from comment #7) > Works for me with this USE: > > Calculating dependencies... done! > [ebuild U ] net-libs/farstream-0.2.7:0.2/5 [0.2.6:0.2/0.2] > USE="introspection msn upnp {-test}" 0 KiB > > Thanks for the fix Where is the fix? 'USE="msn upnp" emerge -v1 farstream' fails here as before. What can I say? I'm the bug reporter, I --synced, re-merged and now it works. The issue is still exist on my system. $ emerge "=net-libs/farstream-0.2.7" When a webcam is connected to the system, gst-plugin-scanner tries to access /dev/video1 which is crazy, and causes access violation errors. ... /usr/bin/g-ir-scanner --namespace=Farstream --nsversion=0.2 --libtool="/bin/sh ../libtool" --include=GObject-2.0 --include=Gst-1.0 --library=libfarstream-0.2.la --symbol-prefix=fs --identifier-prefix=Fs --add-init-section="gst_init(NULL,NULL);" --pkg-export=farstream-0.2 --c-include=fs-candidate.h --c-include=fs-codec.h --c-include=fs-participant.h --c-include=fs-session.h --c-include=fs-stream.h --c-include=fs-conference.h --c-include=fs-utils.h --cflags-begin -I.. -I.. --cflags-end -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 fs-candidate.c fs-codec.c fs-participant.c fs-session.c fs-stream.c fs-conference.c fs-transmitter.c fs-stream-transmitter.c fs-plugin.c fs-element-added-notifier.c fs-utils.c fs-rtp.c fs-private.h fs-enumtypes.h fs-candidate.h fs-codec.h fs-participant.h fs-session.h fs-stream.h fs-conference.h fs-transmitter.h fs-stream-transmitter.h fs-plugin.h fs-element-added-notifier.h fs-utils.h fs-rtp.h libfarstream-0.2.la --output Farstream-0.2.gir g-ir-scanner: compile: cc -Wno-deprecated-declarations -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -march=native -O2 -pipe -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -c -o /var/tmp/portage/net-libs/farstream-0.2.7/work/farstream-0.2.7/farstream/tmp-introspect0E9aKw/Farstream-0.2.o /var/tmp/portage/net-libs/farstream-0.2.7/work/farstream-0.2.7/farstream/tmp-introspect0E9aKw/Farstream-0.2.c g-ir-scanner: link: /bin/sh ../libtool --mode=link --tag=CC cc -o /var/tmp/portage/net-libs/farstream-0.2.7/work/farstream-0.2.7/farstream/tmp-introspect0E9aKw/Farstream-0.2 -export-dynamic -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed /var/tmp/portage/net-libs/farstream-0.2.7/work/farstream-0.2.7/farstream/tmp-introspect0E9aKw/Farstream-0.2.o -L. libfarstream-0.2.la -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 libtool: link: cc -o /var/tmp/portage/net-libs/farstream-0.2.7/work/farstream-0.2.7/farstream/tmp-introspect0E9aKw/.libs/Farstream-0.2 -march=native -O2 -pipe -Wl,-O1 /var/tmp/portage/net-libs/farstream-0.2.7/work/farstream-0.2.7/farstream/tmp-introspect0E9aKw/Farstream-0.2.o -Wl,--export-dynamic -pthread -Wl,--export-dynamic -Wl,--as-needed -L. ./.libs/libfarstream-0.2.so -lgthread-2.0 -lgstbase-1.0 -lgstreamer-1.0 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -pthread * ACCESS DENIED: open_wr: /dev/video1 No protocol specified (gst-plugin-scanner:24454): Clutter-CRITICAL **: Unable to initialize Clutter: Unable to open display ':0' /usr/bin/g-ir-compiler --includedir=. Farstream-0.2.gir -o Farstream-0.2.typelib ... Created attachment 396508 [details]
build.log
Created attachment 396510 [details]
sandbox log
What would be highly appreciated is to try to know what else needs to be changed apart of comment #4 to not run gst-plugin-scanner at all If any of you could help on finding that it would be really nice Thanks What we need to figure out is where in the build process gst-plugin-scanner is being called and why. Unfortunately, there are no explicit references to it in farstream's code or configure or makefiles, so it's probably a side effect, either of some gstreamer tool (called during configure or make check or make install) or some API call (called during introspection bindings generation). If you are experiencing this issue, please check if USE=-introspection works. (In reply to Alexandre Rostovtsev from comment #14) Never mind, can't read, comment #10 shows it's introspection's fault :) I wonder if our usual "unset DISPLAY" trick would work... I can see two ways to fix this: (1) make a fake gst-plugin-scanner executable, export it via GST_PLUGIN_SCANNER_1_0 env variable. This is difficult to get right because gst libraries communicate with gst-plugin-scanner via pipes, and expect the right binary response to binary queries in an undocumented internal format, otherwise the whole thing either freezes forever or errors out and calls /usr/lib64/gstreamer-1.0/gst-plugin-scanner. Something trivial like /bin/true or #/bin/sh\nread won't work here :) (2) in the ebuild, compile a dummy library implementing gst_update_registry() which always returns true, force it to be used via LD_PRELOAD. This will work as long as the only path via which gst_init(0, 0) spawns plugin scanner remains gst_update_registry(). I personally think option 2 is the better way to go. (In reply to Alexandre Rostovtsev from comment #16) On further testing, option (2) will not work because libgstreamer is built with -Bsymbolic-functions, so we can't override its individual functions using LD_PRELOAD :/ If you have enough knowledge... maybe the fix would be in changing: http://cgit.freedesktop.org/gstreamer/gstreamer/tree/libs/gst/helpers/gst-plugin-scanner.c To filter all access to /dev Maybe exporting LIBGL_ALWAYS_INDIRECT=1 and LIBGL_ALWAYS_SOFTWARE=1 could help :/ http://www.mesa3d.org/envvars.html |