gst-plugin-ndi icon indicating copy to clipboard operation
gst-plugin-ndi copied to clipboard

Illegal instruction occurred while running gst-inspect-1.0 libgstndi.so

Open Lokeshagit opened this issue 1 year ago • 4 comments

Hi,

facing error when running below command.

"run /usr/lib/gstreamer-1.0/libgstndi.so"

Reading symbols from /usr/bin/gst-inspect-1.0... (gdb) run /usr/lib/gstreamer-1.0/libgstndi.so Starting program: /usr/bin/gst-inspect-1.0 /usr/lib/gstreamer-1.0/libgstndi.so [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". [Detaching after fork from child process 6328]

Program received signal SIGILL, Illegal instruction. 0xf78d496c in core::sync::atomic::atomic_load (dst=, order=core::sync::atomic::Ordering::Acquire) at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/sync/atomic.rs:2988 2988 /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/sync/atomic.rs: No such file or directory. (gdb)

(gdb) bt #0 0xf78d496c in core::sync::atomic::atomic_load (dst=, order=core::sync::atomic::Ordering::Acquire) at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/sync/atomic.rs:2988 #1 core::sync::atomic::AtomicU32::load () at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/sync/atomic.rs:2091 #2 std::sys_common::once::futex::Once::is_completed () at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/sys_common/once/futex.rs:78 #3 std::sync::once::Once::call_once (self=, f=...) at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/sync/once.rs:138 #4 <gstndi::device_provider::imp::DeviceProvider as glib::subclass::types::ObjectSubclassType>::type_ () at src/device_provider/imp.rs:31 #5 <gstndi::device_provider::DeviceProvider as glib::types::StaticType>::static_type () at src/device_provider/mod.rs:5 #6 gstndi::device_provider::register (plugin=0xfffef054) at src/device_provider/mod.rs:24 #7 gstndi::plugin_init (plugin=0xfffef054) at src/lib.rs:121 #8 0xf78ae364 in gstndi::plugin_desc::plugin_init_trampoline::{{closure}} () at /home/jacobsunil.c/work/o228k_webos4signage/build-signage/BUILD/work/o228k-signagemllib32-linux-gnueabi/lib32-gstreamer1.0-plugins-ndi/1.0-r0/cargo_home/registry/src/github.com-1ecc6299db9ec823/gstreamer-0.18.8/src/subclass/plugin_1_14.rs:103 #9 core::ops::function::FnOnce::call_once () at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/ops/function.rs:251 #10 <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once (self=..., _args=) at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/panic/unwind_safe.rs:271 #11 std::panicking::try::do_call (data=) at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panicking.rs:483 #12 std::panicking::try (f=...) at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panicking.rs:447 #13 std::panic::catch_unwind (f=...) at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panic.rs:137 #14 gstndi::plugin_desc::plugin_init_trampoline (plugin=) at /home/jacobsunil.c/work/o228k_webos4signage/build-signage/BUILD/work/o228k-signagemllib32-linux-gnueabi/lib32-gstreamer1.0-plugins-ndi/1.0-r0/cargo_home/registry/src/github.com-1ecc6299db9ec823/gstreamer-0.18.8/src/subclass/plugin_1_14.rs:103 #15 0xf7f1cf76 in gst_plugin_register_func (user_data=0x0, desc=0xf79b2544 gstndi::plugin_desc::GST_PLUGIN_DESC, plugin=0x4e2178) at ../git/gst/gstplugin.c:532 #16 gst_plugin_register_func (plugin=0x4e2178, desc=0xf79b2544 gstndi::plugin_desc::GST_PLUGIN_DESC, user_data=0x0) at ../git/gst/gstplugin.c:486 #17 0xf7f1ea86 in _priv_gst_plugin_load_file_for_registry (filename=0xfffef7c8 "/usr/lib/gstreamer-1.0/libgstndi.so", registry=0x43b040, error=0xfffef2a8) at ../git/gst/gstplugin.c:899 #18 0x004041ec in main (argc=, argv=) at ../git/tools/gst-inspect.c:2156

In the above error found "/rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/sync/atomic.rs: No such file or directory".

Currently including rust-lang in gst-plugin-ndi. Is it enough to resolve this issue?

Please provide any suggestion on the above error.

Lokeshagit avatar Mar 14 '23 05:03 Lokeshagit

I assume if you run cargo test in https://github.com/matklad/once_cell then you get the same?

sdroege avatar Mar 14 '23 07:03 sdroege

Hello Sebastian,

Can you tell me what this once_cell does? because the error I got above was when i tried to execute gst-plugin-ndi using libndi 5.5.3.

So I want to understand if its issue with compatibility of libndi with gst-plugin-ndi or is it some RUST dependency of gst-plugin-ndi?

Lokeshagit avatar Mar 14 '23 09:03 Lokeshagit

There's documentation in the git repository about what it does. The question is whether that also crashes the same way.

Most likely you're using a wrong Rust toolchain for your CPU or there is a LLVM code generation bug.

sdroege avatar Mar 14 '23 09:03 sdroege

We have used https://github.com/rust-embedded/meta-rust-bin to compile rustc and cargo.

And we have used gst-plugin-ndi to build for arm CPU for webOS using the built rustc from above

Lokeshagit avatar Mar 14 '23 10:03 Lokeshagit