This message was deleted.
# sdk-rust
s
This message was deleted.
a
It ran fine on the base OS for a Linux ARMv8 64 host. I'm getting a linux x64 machine going to test there as well...
b
Hey, I’m going to investigate that now
I just tested ubuntu:jammy amd64 on a amd64 host and it is working correctly 🤔
a
I thought perhaps I was missing some sys dependency in the container -- that'd be the simplest reason
b
Can you try:
sudo apt install -y libssl-dev libx11-dev libgl1-mesa-dev libxext-dev
inside the container
a
sure thing. Will do
same result
did you try building that docker image in the referenced Dockerfile by chance?
I'm getting a VM upgraded now to test under docker with amd64. I'll also try upgrading my jetson -- perhaps there's some problem running the 22.04 container on a 18.04 host
the build command is, btw:
Copy code
docker build --build-arg=ARCH=amd64 --tag gst-livekit --target gst-livekit
^edited: fixed
oh -- there's a Dockefile error. One sec. NM. my typo above
I managed to reproduce the segfault on a Fedora machine, which may or may not be the same issue, but at least allows me to run
strace
on it.
Hmm. My jammy amd64 install on a VM also segfaults. Perhaps there's a library incompatibility with the dynamic links? @boundless-energy-78552 could you post your
ldd
output of the binary on your machine where it was working?
b
ldd for basic_room (looks like libpthread is missing?)
Copy code
linux-vdso.so.1 (0x00007fff123a5000)
        libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fbaa536e000)
        libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fbaa5097000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbaa5091000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbaa506e000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbaa4f1f000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbaa4d3b000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbaa4d20000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbaa4b2e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fbaa6b30000)
Also did you try to run the executable with gdb? Maybe it can help to find some symbols
Seems like @incalculable-ambulance-68856 is having the same issue
Still not able to reproduce the issue on my machine. Can you reproduce it with a small example (without gstreamer)
a
I also get a segfault on jammy with the
basic_room
example, so I'll test around with that. I wasn't able to get your branch to compile -- I get:
Copy code
error: invalid instruction `cargo:rustc-link-arg-bins` from build script of `webrtc-sys v0.1.1 (/home/spiegela/client-sdk-rust/webrtc-sys)`
The package webrtc-sys v0.1.1 (/home/spiegela/client-sdk-rust/webrtc-sys) does not have a bin target.
So I modified it with:
Copy code
-            println!("cargo:rustc-link-arg-bins=-pthread");
+            println!("cargo:rustc-link-arg=-pthread");
With or without that change, I get the same result in `gdb`:
Copy code
Starting program: /home/spiegela/client-sdk-rust/examples/target/debug/basic_room
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
...
Thread 1 "basic_room" received signal SIGSEGV, Segmentation fault.
___pthread_rwlock_wrlock (rwlock=0x0) at ./nptl/pthread_rwlock_wrlock.c:26
26      ./nptl/pthread_rwlock_wrlock.c: No such file or directory.
here are my pthread pakages:
Copy code
$ dpkg -l |grep pthread
ii  libevent-pthreads-2.1-7:amd64          2.1.12-stable-1build3                   amd64        Asynchronous event notification library (pthreads)
ii  libpthread-stubs0-dev:amd64            0.4-1build2                             amd64        pthread stubs not provided by native libc, development files
🙏 1
I'm starting to test on a focal container, and I'll see if I can reproduce these steps on my Fedora VM as well
b
Ok interesting, so it seems like there is an issue with an rwlock. The weird thing is: is the crash happening at the start of the program, or at the end when we dispose?
a
I can search around, but perhaps you know where you’d place a breakpoint already? I’m webrtc-sys somewhere?
a
Hmm. Not sure how to breakpoint a
cpp
from a rust binary -- gdb only list
.rs
and
.h
files in the available. It looks like there was a rwlock change starting in focal -- I'm going to test a bionic container just to see. It looks like this thread may apply: https://sourceware.org/bugzilla/show_bug.cgi?id=14958
i
@boundless-energy-78552 @ambitious-lunch-95812 I am also having the same issue. gdb and strace points to rwlock when ssl connection is tried. Please let me know if you want me to try something on my end. I am having the issue in Jammy and kinetic(22.10)
a
Ok -- after a lot of toil, I think I can say for near certain that downgrading to
18.04/bionic
is not an answer (at least not without some deps changes)...
bionic
only ships with
libssl1.0 - libssl1.1
which are incompatible with recent versions of
reqwest
I'm experimenting with
LD_LIBRARY_PATH
and
RUSTFLAGS
to try and get
libpthread
to link
Even though it doesn't show as linked to
libpthread
installing
libpthread-stubs0-dev
did change the error message somewhat...
Copy code
Thread 1 "basic_room" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=548547805216, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44      ./nptl/pthread_kill.c: No such file or directory.
oh, perhaps I need to reinstall rust after installing libpthread