Closed zenios closed 10 years ago
Core is useless without the binary. Could you post gdb backtrace and error/debug log?
warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `nginx: w'. Program terminated with signal 11, Segmentation fault.
1420 if (!ctx->opened) { (gdb) bt
at /opt/nginx-rtmp-module/ngx_rtmp_receive.c:142
at /opt/nginx-rtmp-module/ngx_rtmp_handler.c:792
at src/event/modules/ngx_epoll_module.c:691
name=name@entry=0x4a6b56 "worker process", respawn=respawn@entry=-3) at src/os/unix/ngx_process.c:198
As for the error log I prefer not to attach it since it contains sensitive information but below you will find some logs before and after the error.
2014/01/20 17:40:35 [info] 26979#0: 3740 client connected '1.2.3.4' 2014/01/20 17:40:35 [info] 26979#0: 3740 connect: app='local' args='' flashver='' swf_url='' tc_url='rtmp://mynginxserver/local' page_url='' acodecs=3191 vcodecs=252 object_encoding=0, client: 1.2.3.4, server: 0.0.0.0:1935 2014/01/20 17:40:35 [info] 26979#0: 3740 createStream, client: 1.2.3.4, server: 0.0.0.0:1935 2014/01/20 17:40:35 [info] 26979#0: 3740 play: name='channel1' args='' start=0 duration=0 reset=0 silent=0, client: 1.2.3.4, server: 0.0.0.0:1935 2014/01/20 17:40:35 [info] 26979#0: 3740 notify: play '127.0.0.1:99/start', client: 1.2.3.4, server: 0.0.0.0:1935 2014/01/20 17:40:35 [info] 26979#0: 3740 relay: create pull name='channel1' app='' playpath='' url='encoder3/live', client: 1.2.3.4, server: 0.0.0.0:1935 2014/01/20 17:40:38 [info] 26979#0: 3740 deleteStream, client: 1.2.3.4, server: 0.0.0.0:1935 2014/01/20 17:40:38 [info] 26979#0: 3740 notify: play_done '127.0.0.1:99/stop', client: 1.2.3.4, server: 0.0.0.0:1935 2014/01/20 17:40:38 [info] 26979#0: 3740 disconnect, client: 1.2.3.4, server: 0.0.0.0:1935 2014/01/20 17:40:38 [info] 26979#0: 3740 deleteStream, client: 1.2.3.4, server: 0.0.0.0:1935 2014/01/20 17:40:38 [info] 26979#0: 3743 client connected '1.2.3.4' 2014/01/20 17:40:38 [info] 26979#0: 3732 disconnect, client: 4.5.6.7, server: 0.0.0.0:1935 2014/01/20 17:40:38 [info] 26979#0: 3732 deleteStream, client: 4.5.6.7, server: 0.0.0.0:1935 2014/01/20 17:40:38 [info] 26979#0: 3732 notify: play_done '127.0.0.1:99/stop', client: 4.5.6.7, server: 0.0.0.0:1935 2014/01/20 17:40:38 [info] 26979#0: 3737 disconnect, client: encoder1/live, server: ngx-relay 2014/01/20 17:40:38 [info] 26979#0: 3737 deleteStream, client: encoder1/live, server: ngx-relay 2014/01/20 17:40:38 [info] 26979#0: 3743 connect: app='local' args='' flashver='' swf_url='' tc_url='rtmp://mynginxserver/local' page_url='' acodecs=3191 vcodecs=252 object_encoding=0, client: 1.2.3.4, server: 0.0.0.0:1935 2014/01/20 17:40:39 [notice] 26978#0: signal 17 (SIGCHLD) received 2014/01/20 17:40:39 [alert] 26978#0: worker process 26979 exited on signal 11 (core dumped) 2014/01/20 17:40:39 [notice] 26978#0: start worker process 27467 2014/01/20 17:40:39 [info] 27467#0: 3745 client connected '4.5.6.7' 2014/01/20 17:40:39 [info] 27467#0: 3745 connect: app='encoder0' args='' flashver='' swf_url='' tc_url='rtmp://mynginxserver/encoder0' page_url='' acodecs=3191 vcodecs=252 object_encoding=0, client: 4.5.6.7, server: 0.0.0.0:1935 2014/01/20 17:40:39 [info] 27467#0: 3745 createStream, client: 4.5.6.7, server: 0.0.0.0:1935 2014/01/20 17:40:39 [info] 27467#0: 3746 client connected '87.228.155.189' 2014/01/20 17:40:40 [info] 27467#0: 3745 play: name='channel2' args='' start=0 duration=0 reset=0 silent=0, client: 4.5.6.7, server: 0.0.0.0:1935 2014/01/20 17:40:40 [info] 27467#0: 3745 notify: play '127.0.0.1:99/start', client: 4.5.6.7, server: 0.0.0.0:1935 2014/01/20 17:40:40 [info] 27467#0: 3745 relay: create pull name='channel2' app='' playpath='' url='encoder0/live', client: 4.5.6.7, server: 0.0.0.0:1935
I do not have a debug log because until i catch the error, log file will get huge with debug logs on
fixed! please try again thanks @paranomos
Thanks for fixing the problem.My question though is since ctx was NULL wasn't this supposed to happen on first user disconnection?Why did it happen at random times?
Also even though the first problem was fixed.It looks there is another problem.
Program terminated with signal 11, Segmentation fault.
at /opt/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:749
749 if (!ctx->opened) { (gdb) bt
at /opt/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:749
v=0x7fff3213f760) at /opt/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:1838
v=0x7fff3213f760)
at /opt/nginx-rtmp-module/dash/ngx_rtmp_dash_module.c:1227
h=<optimized out>, in=<optimized out>)
at /opt/nginx-rtmp-module/ngx_rtmp_receive.c:142
h=h@entry=0x1e461d0, in=in@entry=0x1e44190)
at /opt/nginx-rtmp-module/ngx_rtmp_handler.c:792
at /opt/nginx-rtmp-module/ngx_rtmp_handler.c:457
timer=<optimized out>, flags=<optimized out>)
at src/event/modules/ngx_epoll_module.c:691
cycle=cycle@entry=0x1cc6480) at src/event/ngx_event.c:248
data=<optimized out>) at src/os/unix/ngx_process_cycle.c:816
Maybe this has to changed to if (ctx == NULL || !ctx->opened) like the previous commit?
And one final question.Why does hls module comes in play since its disabled from the configuration?
Fixed the crash, thanks.
It's not random, it should happen every time RTMP STREAM EOF is received by an application with no HLS enabled.
HLS module handles events in rtmp module even if you don't use it. There's not much overhead about it.
I have been experiencing random worker crashes that are not replicated with the same time.
I think it is related to on_play and on_play_done events when it happens, all clients are disconnected when the worker dies.
nginx-rtmp version 1.1.2 nginx version 1.5.8 Attached are the config files and core dump
From Error log: 2014/01/20 14:01:18 [notice] 26452#0: signal 17 (SIGCHLD) received 2014/01/20 14:01:18 [alert] 26452#0: worker process 26453 exited on signal 11 Download core and config here https://anonfiles.com/file/882ed00d1696f05f6010f0a47c18f1d9