[Unit]
Description=Janus WebRTC gateway
After=network.target
[Service]
Type=simple
ExecStart=/opt/janus/bin/janus -o
Restart=on-abnormal
Nice=-10
LimitCORE=infinity
LimitNOFILE=100000
LimitNPROC=60000
LimitSTACK=250000
LimitRTPRIO=infinity
LimitRTTIME=7000000
IOSchedulingClass=realtime
IOSchedulingPriority=2
CPUSchedulingPolicy=rr
CPUSchedulingPriority=89
[Install]
WantedBy=multi-user.target
Sep 27 15:12:06 m5 janus[27319]: [Tue Sep 27 15:12:06 2016] We have a message to serve...
Sep 27 15:12:06 m5 janus[27319]: {
Sep 27 15:12:06 m5 janus[27319]: "janus": "event",
Sep 27 15:12:06 m5 janus[27319]: "session_id": 2679895579916547,
Sep 27 15:12:06 m5 janus[27319]: "sender": 1362825805019229,
Sep 27 15:12:06 m5 janus[27319]: "plugindata": {
Sep 27 15:12:06 m5 janus[27319]: "plugin": "janus.plugin.audiobridge",
Sep 27 15:12:06 m5 janus[27319]: "data": {
Sep 27 15:12:06 m5 janus[27319]: "audiobridge": "joined",
Sep 27 15:12:06 m5 janus[27319]: "room": 1003,
Sep 27 15:12:06 m5 janus[27319]: "participants": [
Sep 27 15:12:06 m5 janus[27319]: {
Sep 27 15:12:06 m5 janus[27319]: "id": 2285189696780449,
Sep 27 15:12:06 m5 janus[27319]: "display": "b84950e8-1c65-4ff2-bd44-77a693073e0e",
Sep 27 15:12:06 m5 janus[27319]: "muted": true
Sep 27 15:12:06 m5 janus[27319]: }
Sep 27 15:12:06 m5 janus[27319]: ]
Sep 27 15:12:06 m5 janus[27319]: }
Sep 27 15:12:06 m5 janus[27319]: }
Sep 27 15:12:22 m5 systemd[1]: janus.service: main process exited, code=killed, status=11/SEGV
Sep 27 15:12:22 m5 systemd[1]: Unit janus.service entered failed state.
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] Got a Janus API request from janus.transport.http (0x7f31a8000d80)
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] [ERR] [transports/janus_http.c:janus_http_handler:1294] Couldn't find any session 7434939135210000...
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] Transport task pool, serving request
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] [ERR] [janus.c:janus_process_incoming_request:695] Couldn't find any session 7434939135210000...
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] [DJkzTEkJgm4] Returning Janus API error 458 (No such session 7434939135210000)
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] Got a Janus API request from janus.transport.http (0x7f319c000da0)
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] [ERR] [transports/janus_http.c:janus_http_handler:1294] Couldn't find any session 7274935415163635...
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] Transport task pool, serving request
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] [ERR] [janus.c:janus_process_incoming_request:695] Couldn't find any session 7274935415163635...
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] [gXk8InKWmmC] Returning Janus API error 458 (No such session 7274935415163635)
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] Got a Janus API request from janus.transport.http (0x7f31a8004950)
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] [ERR] [transports/janus_http.c:janus_http_handler:1294] Couldn't find any session 758740164516021...
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] Transport task pool, serving request
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] [ERR] [janus.c:janus_process_incoming_request:695] Couldn't find any session 758740164516021...
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] [hqHddkiGRq6] Returning Janus API error 458 (No such session 758740164516021)
Sep 27 15:12:23 m5 janus[2012]: [Tue Sep 27 15:12:23 2016] Got a Janus API request from janus.transport.http (0x7f319c000da0)
Trying to debug my crash. I am on an x64 debian jessie machine. I installed libasan1.
I also removed the stock libstrp that came with the OS and installed and configured the v1.5.4 per the instructions on github (I used the --libdir=/usr/lib64).
Then make clean && make && make install on the v1.5.4 libsrt folder.
Then on janus, I did
make clean. run the following:
CFLAGS="-fsanitize=address -fno-omit-frame-pointer" LDFLAGS="-lasan" ./configure --prefix=/opt/janus --disable-data-channels -libdir=/usr/lib64
root@m5:/usr/local/src/janus-gateway# ldd janus | grep asan
libasan.so.1 => /usr/lib/x86_64-linux-gnu/libasan.so.1 (0x00007f37da7b5000)
root@m5:/usr/local/src/janus-gateway# ldd janus | grep srtp
libsrtp.so.0 => /usr/lib/libsrtp.so.0 (0x00007fb8e232a000)
./configure --prefix=/opt/janus --disable-data-channels -libdir=/usr/lib64
the one where so far it does not crash:
./configure --prefix=/opt/janus --disable-websockets --disable-data-channels --disable-rabbitmq --no-create --no-recursion
so I wonder if having websockets compiled in or rabbitmq has anything to do... I will try to use asan asap ;)
I see no mention of gdb anywhere in this post thread. What you want to do is:
1) install gdb
2) run the command "$ gdb /opt/janus/bin/janus core" where $ represents the terminal prompt, /opt/janus/bin/janus is the path to the executable that crashed (must be the same executable, new versions will cause addresses to be different), and "core" is the coredump produced by the crashed Janus instance. Core dumps are usually found in the folder where Janus was invoked from. That is, if you're in "/" when you run "/opt/janus/bin/janus" and Janus crashes, then the core is "/core"
3) with gdb running the program and core dump, type "backtrace" or "bt" to get the line that caused the crash
4) use other gdb commands to inspect the memory around that line, like "frame" to jump to one of the frames of the backtrace, and "info locals" to list the local variables at that address.
If you see things like "optimized out" then you'll either need to read through the ASM or you'll need to recompile with no-optimize attributes on the function in question. For example:
__attribute__((optimize("O0"))) void my_func()
That's O as in Omega and 0 as in zero. O0
Hi,what is the best way to troubleshoot a janus crash ? I am on latest master. Running on debian jessie.I am using the built in https transport.I have the log level set at 6. and janus being controlled by systemd on debian. So if the process dies, it auto restarts.here is my systemd service:[Unit]
Description=Janus WebRTC gateway
After=network.target
[Service]
Type=simple
ExecStart=/opt/janus/bin/janus -o
Restart=on-abnormal
Nice=-10
LimitCORE=infinity
LimitNOFILE=100000
LimitNPROC=60000
LimitSTACK=250000
LimitRTPRIO=infinity
LimitRTTIME=7000000
IOSchedulingClass=realtime
IOSchedulingPriority=2
CPUSchedulingPolicy=rr
CPUSchedulingPriority=89