Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

janus streaming plugin crashed during cleanup #2245

Closed
saket424 opened this issue Jun 23, 2020 · 3 comments
Closed

janus streaming plugin crashed during cleanup #2245

saket424 opened this issue Jun 23, 2020 · 3 comments

Comments

@saket424
Copy link

saket424 commented Jun 23, 2020

I was trying to play this stream defined by the following mountpoint. It played successfully and then i close the browser tab causing janus to crash during cleanup. I could not get a clean stacktrace as the stack appears corrupted but it looks to be a strlen() operation that caused the crash

rtsp1 :
{
	type = "rtsp";
	id = "1999";
	description = "RTSP1";
	audio = "no";
	video = "yes";
	url = "rtsp://192.168.1.132:8554/1/main";
};

Below

Creating new session: 8877569158405928; 0xae402130
Creating new handle in session 8877569158405928: 8434250455686313; 0xae402130 0xae401fd0
[8434250455686313] Creating ICE agent (ICE Lite mode, controlled)
[8434250455686313] The DTLS handshake has been completed
[janus.plugin.streaming-0xb3301b18] WebRTC media is now available
[ERR] [plugins/janus_streaming.c:janus_streaming_rtcp_remb_send:1533] Error in sendto... 99 (Cannot assign requested address)
[ERR] [plugins/janus_streaming.c:janus_streaming_rtcp_remb_send:1533] Error in sendto... 99 (Cannot assign requested address)
[ERR] [plugins/janus_streaming.c:janus_streaming_rtcp_remb_send:1533] Error in sendto... 99 (Cannot assign requested address)
[WSS-0xb3301188] Destroying WebSocket client
Destroying session 8877569158405928; 0xae402130
Detaching handle from JANUS Streaming plugin; 0xae401fd0 0xb3301b18 0xae401fd0 0xae4021c0
[janus.plugin.streaming-0xb3301b18] No WebRTC media anymore
[8434250455686313] WebRTC resources freed; 0xae401fd0 0xae402130
Segmentation fault (core dumped)

gdb /home/pi/janus/bin/janus core
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/pi/janus/bin/janus...done.
[New LWP 9100]
[New LWP 9023]
[New LWP 9032]
...
[New LWP 9156]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Core was generated by `/home/pi/janus/bin/janus -e'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xb677f42e in strlen () from /lib/arm-linux-gnueabihf/libc.so.6

Current thread is 1 (Thread 0x8d8be160 (LWP 9100))]
(gdb) bt
#0  0xb677f42e in strlen () from /lib/arm-linux-gnueabihf/libc.so.6
#1  0xb6c34b3a in json_string ()
   from /usr/lib/arm-linux-gnueabihf/libjansson.so.4
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
@lminiero
Copy link
Member

As clearly explained in the guidelines, please DO NOT paste huge log dumps inline. I've written a million times that pastebin/gist/others should be used instead. I updated the post to AT LEAST wrap them in code boxes.

@lminiero
Copy link
Member

That said, the dump you shared is useless. Please follow the debugging guidelines:

https://janus.conf.meetecho.com/docs/debug

@saket424
Copy link
Author

This problem appears to be a race condition of some sort. It does not happen now after I added the address-sanitizer. It does happen without the address-sanitizer and from the useless trace above the backtrace does not give you adequate information to progress further

export DEPS_HOME="/home/pi/janus"
CFLAGS="-O1 -g3 -ggdb3 -fno-omit-frame-pointer -fsanitize=address -fno-sanitize-recover=all -fsanitize-address-use-after-scope" LDFLAGS="-fsanitize=address" ./configure --prefix=$DEPS_HOME --enable-post-processing --disable-rabbitmq --disable-mqtt --disable-docs

pi@nanopi-napr1:~/janus/dl/janus-gateway$ ldd janus | grep asan
libasan.so.5 => /usr/lib/arm-linux-gnueabihf/libasan.so.5 (0xb6838000)

I will re-open the issue if I can gather more information. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants