Cannot open images: "Not a socket" D-Bus error?
This started happening on my main PC after an upgrade to Loupe 46 and glycin-loaders 1.0.0 on Alpine Linux edge. None of my other devices with the same distro and software versions experience this issue, so there's most likely something wrong with my environment... (edit: this also happened on my laptop) nonetheless, I'd appreciate any pointers in figuring out the cause.
In Loupe, I see the following error:
Or the following:
The failing command from the first screenshot is bwrap --unshare-all --clearenv --die-with-parent --chdir / --ro-bind /usr /usr --dev /dev --ro-bind-try /etc/ld.so.cache /etc/ld.so.cache --tmpfs /tmp-home --setenv HOME /tmp-home --tmpfs /tmp-run --setenv XDG_RUNTIME_DIR /tmp-run --ro-bind /lib /lib --ro-bind /lib64 /lib64 --seccomp 33 /usr/libexec/glycin-loaders/1+/glycin-image-rs
. Trying to run it without the seccomp line results in the following:
> bwrap --unshare-all --clearenv --die-with-parent --chdir / --ro-bind /usr /usr --dev /dev --ro-bind-try /etc/ld.so.cache /etc/ld.so.cache --tmpfs /tmp-home --setenv HOME /tmp-home --tmpfs /tmp-run --setenv XDG_RUNTIME_DIR /tmp-run --ro-bind /lib /lib --ro-bind /lib64 /lib64 /usr/libexec/glycin-loaders/1+/glycin-image-rs
thread 'main' panicked at /home/buildozer/aports/community/glycin-loaders/src/glycin-loaders-1.0.0/vendor/glycin-utils/src/instruction_handler.rs:40:14:
Failed to create private DBus connection: InputOutput(Os { code: 88, kind: Uncategorized, message: "Not a socket" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I ran the glycin test suite as per the CONTRIBUTING.md document (making sure to get the submodules first as well), and it fails too:
6/6 cargo-test RUNNING
>>> UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 GLYCIN_TEST_SKIP_EXT='' MALLOC_PERTURB_=150 GLYCIN_DATA_DIR=/home/knuxify/clones/glycin/builddir/_test-install/usr/local/share /usr/bin/cargo test -p tests -p glycin-heif -p glycin-image-rs -p glycin-jxl -p glycin-svg --target-dir /home/knuxify/clones/glycin/builddir/cargo_target/tests --profile dev --manifest-path /home/knuxify/clones/glycin/Cargo.toml -- --test-threads=1 --nocapture
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Finished dev [unoptimized + debuginfo] target(s) in 0.12s
Running unittests src/bin/glycin-heif.rs (cargo_target/tests/debug/deps/glycin_heif-7af78038749d8d3c)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/bin/glycin-image-rs.rs (cargo_target/tests/debug/deps/glycin_image_rs-a75ef62c785dc179)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/bin/glycin-jxl.rs (cargo_target/tests/debug/deps/glycin_jxl-cbdf8948afa434cc)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/bin/glycin-svg.rs (cargo_target/tests/debug/deps/glycin_svg-4a92ed57e9a4713e)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running dbus_api_stability.rs (cargo_target/tests/debug/deps/dbus_api_stability-20ed90389e11cffc)
running 1 test
test dbus_api_stability ... ignored
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests.rs (cargo_target/tests/debug/deps/tests-4173730ec867d0ef)
running 5 tests
- "test-images/images/color/color-long-comment.svg"
thread 'color' panicked at tests/tests.rs:143:44:
called `Result::unwrap()` on an `Err` value: PrematureExit { status: ExitStatus(unix_wait_status(40704)), cmd: "\"bwrap\" \"--unshare-all\" \"--clearenv\" \"--die-with-parent\" \"--chdir\" \"/\" \"--ro-bind\" \"/usr\" \"/usr\" \"--dev\" \"/dev\" \"--ro-bind-try\" \"/etc/ld.so.cache\" \"/etc/ld.so.cache\" \"--tmpfs\" \"/tmp-home\" \"--setenv\" \"HOME\" \"/tmp-home\" \"--tmpfs\" \"/tmp-run\" \"--setenv\" \"XDG_RUNTIME_DIR\" \"/tmp-run\" \"--ro-bind\" \"/lib\" \"/lib\" \"--ro-bind\" \"/lib64\" \"/lib64\" \"--ro-bind\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\" \"--seccomp\" \"14\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\"" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test color ... FAILED
- "test-images/images/color-iccp-pro/color-iccp-16-pro.png"
thread 'color_iccp_pro' panicked at tests/tests.rs:143:44:
called `Result::unwrap()` on an `Err` value: PrematureExit { status: ExitStatus(unix_wait_status(40704)), cmd: "\"bwrap\" \"--unshare-all\" \"--clearenv\" \"--die-with-parent\" \"--chdir\" \"/\" \"--ro-bind\" \"/usr\" \"/usr\" \"--dev\" \"/dev\" \"--ro-bind-try\" \"/etc/ld.so.cache\" \"/etc/ld.so.cache\" \"--tmpfs\" \"/tmp-home\" \"--setenv\" \"HOME\" \"/tmp-home\" \"--tmpfs\" \"/tmp-run\" \"--setenv\" \"XDG_RUNTIME_DIR\" \"/tmp-run\" \"--ro-bind\" \"/lib\" \"/lib\" \"--ro-bind\" \"/lib64\" \"/lib64\" \"--ro-bind\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\" \"--seccomp\" \"14\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\"" }
test color_iccp_pro ... FAILED
- "test-images/images/exif/exif.png"
thread 'exif' panicked at tests/tests.rs:143:44:
called `Result::unwrap()` on an `Err` value: PrematureExit { status: ExitStatus(unix_wait_status(40704)), cmd: "\"bwrap\" \"--unshare-all\" \"--clearenv\" \"--die-with-parent\" \"--chdir\" \"/\" \"--ro-bind\" \"/usr\" \"/usr\" \"--dev\" \"/dev\" \"--ro-bind-try\" \"/etc/ld.so.cache\" \"/etc/ld.so.cache\" \"--tmpfs\" \"/tmp-home\" \"--setenv\" \"HOME\" \"/tmp-home\" \"--tmpfs\" \"/tmp-run\" \"--setenv\" \"XDG_RUNTIME_DIR\" \"/tmp-run\" \"--ro-bind\" \"/lib\" \"/lib\" \"--ro-bind\" \"/lib64\" \"/lib64\" \"--ro-bind\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\" \"--seccomp\" \"14\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\"" }
test exif ... FAILED
- "test-images/images/gray-iccp/gray-iccp.avif"
thread 'gray_iccp' panicked at tests/tests.rs:143:44:
called `Result::unwrap()` on an `Err` value: PrematureExit { status: ExitStatus(unix_wait_status(40704)), cmd: "\"bwrap\" \"--unshare-all\" \"--clearenv\" \"--die-with-parent\" \"--chdir\" \"/\" \"--ro-bind\" \"/usr\" \"/usr\" \"--dev\" \"/dev\" \"--ro-bind-try\" \"/etc/ld.so.cache\" \"/etc/ld.so.cache\" \"--tmpfs\" \"/tmp-home\" \"--setenv\" \"HOME\" \"/tmp-home\" \"--tmpfs\" \"/tmp-run\" \"--setenv\" \"XDG_RUNTIME_DIR\" \"/tmp-run\" \"--ro-bind\" \"/lib\" \"/lib\" \"--ro-bind\" \"/lib64\" \"/lib64\" \"--ro-bind\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\" \"--seccomp\" \"14\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\"" }
test gray_iccp ... FAILED
- "test-images/images/icon/icon.ico"
thread 'icon' panicked at tests/tests.rs:143:44:
called `Result::unwrap()` on an `Err` value: PrematureExit { status: ExitStatus(unix_wait_status(40704)), cmd: "\"bwrap\" \"--unshare-all\" \"--clearenv\" \"--die-with-parent\" \"--chdir\" \"/\" \"--ro-bind\" \"/usr\" \"/usr\" \"--dev\" \"/dev\" \"--ro-bind-try\" \"/etc/ld.so.cache\" \"/etc/ld.so.cache\" \"--tmpfs\" \"/tmp-home\" \"--setenv\" \"HOME\" \"/tmp-home\" \"--tmpfs\" \"/tmp-run\" \"--setenv\" \"XDG_RUNTIME_DIR\" \"/tmp-run\" \"--ro-bind\" \"/lib\" \"/lib\" \"--ro-bind\" \"/lib64\" \"/lib64\" \"--ro-bind\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\" \"--seccomp\" \"14\" \"/home/knuxify/clones/glycin/builddir/_test-install/usr/local/libexec/glycin-loaders/1+/glycin-image-rs\"" }
test icon ... FAILED
failures:
failures:
color
color_iccp_pro
exif
gray_iccp
icon
test result: FAILED. 0 passed; 5 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
error: test failed, to rerun pass `-p tests --test tests`
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
6/6 cargo-test FAIL 0.19s exit status 101