arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.36k stars 3.51k forks source link

Program terminated with signal 11, Segmentation fault. #856

Open notmark opened 8 years ago

notmark commented 8 years ago

#0 0x00000000004a7a82 in ngx_rtmp_relay_close (s=0x2af8490) at /ServerApps/nginx-rtmp-module/ngx_rtmp_relay_module.c:1367 1367 for (cctx = &ctx->publish->play; *cctx; cctx = &(*cctx)->next, ++n);

Any insight into this?

ghost commented 8 years ago

The same thing :(

(root@batman)-(01:19 AM Fri Jul 29)-(/usr/local/src/nginx-rtmp-module)
# cd ../nginx-1.11.3/
(root@batman)-(01:19 AM Fri Jul 29)-(/usr/local/src/nginx-1.11.3)
# ./configure --add-dynamic-module=/usr/local/src/nginx-rtmp-module --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic  --with-threads --with-stream --with-stream_ssl_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_v2_module --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed'
(root@batman)-(01:19 AM Fri Jul 29)-(/usr/local/src/nginx-1.11.3)
# ./configure --add-dynamic-module=/usr/local/src/nginx-rtmp-module --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic  --with-threads --with-stream --with-stream_ssl_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_v2_module --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed'
checking for OS
 + Linux 3.19.0-65-generic x86_64
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
checking for gcc -pipe switch ... found
checking for --with-ld-opt="-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed" ... found
checking for -Wl,-E switch ... found
...
checking for libexslt ... found
checking for GD library ... found
checking for perl
 + perl version: This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi
 + perl interpreter multiplicity found
checking for GeoIP library ... found
checking for GeoIP IPv6 support ... found
creating objs/Makefile

Configuration summary
  + using threads
  + using system PCRE library
  + using system OpenSSL library
  + using system zlib library

  nginx path prefix: "/etc/nginx"
  nginx binary file: "/usr/sbin/nginx"
  nginx modules path: "/usr/lib/nginx/modules"
  nginx configuration prefix: "/etc/nginx"
  nginx configuration file: "/etc/nginx/nginx.conf"
  nginx pid file: "/var/run/nginx.pid"
  nginx error log file: "/var/log/nginx/error.log"
  nginx http access log file: "/var/log/nginx/access.log"
  nginx http client request body temporary files: "/var/cache/nginx/client_temp"
  nginx http proxy temporary files: "/var/cache/nginx/proxy_temp"
  nginx http fastcgi temporary files: "/var/cache/nginx/fastcgi_temp"
  nginx http uwsgi temporary files: "/var/cache/nginx/uwsgi_temp"
  nginx http scgi temporary files: "/var/cache/nginx/scgi_temp"

(root@batman)-(01:20 AM Fri Jul 29)-(/usr/local/src/nginx-1.11.3)
# make modules
make -f objs/Makefile modules
make[1]: Entering directory `/usr/local/src/nginx-1.11.3'
cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/http/modules/perl -I /usr/local/src/nginx-rtmp-module -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream \
                -o objs/src/http/modules/ngx_http_xslt_filter_module.o \
                src/http/modules/ngx_http_xslt_filter_module.c
...
cc -o objs/ngx_rtmp_module.so \
        objs/addon/nginx-rtmp-module/ngx_rtmp.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_init.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_handshake.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_handler.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_amf.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_send.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_shared.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_eval.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_receive.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_core_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_cmd_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_codec_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_access_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_record_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_live_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_play_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_flv_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_mp4_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_netcall_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_relay_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_bandwidth.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_exec_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_auto_push_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_notify_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_log_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_limit_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_bitop.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_proxy_protocol.o \
        objs/addon/hls/ngx_rtmp_hls_module.o \
        objs/addon/dash/ngx_rtmp_dash_module.o \
        objs/addon/hls/ngx_rtmp_mpegts.o \
        objs/addon/dash/ngx_rtmp_mp4.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_stat_module.o \
        objs/addon/nginx-rtmp-module/ngx_rtmp_control_module.o \
        objs/ngx_rtmp_module_modules.o \
        -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed \
        -shared
make[1]: Leaving directory `/usr/local/src/nginx-1.11.3'
(root@batman)-(01:20 AM Fri Jul 29)-(/usr/local/src/nginx-1.11.3)
# cp -v objs/ngx_rtmp_module.so /etc/nginx/modules/
‘objs/ngx_rtmp_module.so’ -> ‘/etc/nginx/modules/ngx_rtmp_module.so’
(root@batman)-(01:21 AM Fri Jul 29)-(/usr/local/src/nginx-1.11.3)
# make clean
rm -rf Makefile objs
(root@batman)-(01:21 AM Fri Jul 29)-(/usr/local/src/nginx-1.11.3)
# nginx -t
Segmentation fault (core dumped)
(root@batman)-(01:21 AM Fri Jul 29)-(/usr/local/src/nginx-1.11.3)
# gdb /usr/sbin/nginx
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/nginx...(no debugging symbols found)...done.
(gdb) run -t
Starting program: /usr/sbin/nginx -t
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
ngx_rtmp_core_server (cf=0x7fffffffe740, cmd=<optimized out>, conf=<optimized out>) at /usr/local/src/nginx-rtmp-module/ngx_rtmp_core_module.c:389
389         cscf->ctx = ctx;
(gdb) where
#0  ngx_rtmp_core_server (cf=0x7fffffffe740, cmd=<optimized out>, conf=<optimized out>) at /usr/local/src/nginx-rtmp-module/ngx_rtmp_core_module.c:389
#1  0x00000000004268fb in ngx_conf_parse ()
#2  0x00007ffff5fe558a in ngx_rtmp_block (cf=0x7fffffffe740, cmd=<optimized out>, conf=<optimized out>) at /usr/local/src/nginx-rtmp-module/ngx_rtmp.c:202
#3  0x00000000004268fb in ngx_conf_parse ()
#4  0x0000000000424101 in ngx_init_cycle ()
#5  0x0000000000412b94 in main ()
(gdb) bt full
#0  ngx_rtmp_core_server (cf=0x7fffffffe740, cmd=<optimized out>, conf=<optimized out>) at /usr/local/src/nginx-rtmp-module/ngx_rtmp_core_module.c:389
        rv = <optimized out>
        mconf = <optimized out>
        m = <optimized out>
        pcf = <optimized out>
        module = <optimized out>
        ctx = 0x7c7858
        rtmp_ctx = <optimized out>
        cscf = 0x10000
        cscfp = <optimized out>
        cmcf = <optimized out>
#1  0x00000000004268fb in ngx_conf_parse ()
No symbol table info available.
#2  0x00007ffff5fe558a in ngx_rtmp_block (cf=0x7fffffffe740, cmd=<optimized out>, conf=<optimized out>) at /usr/local/src/nginx-rtmp-module/ngx_rtmp.c:202
        rv = <optimized out>
        i = <optimized out>
        m = <optimized out>
        mi = <optimized out>
        s = <optimized out>
        pcf = {name = 0x0, args = 0x74b288, cycle = 0x749370, pool = 0x749320, temp_pool = <optimized out>, conf_file = <optimized out>, log = <optimized out>, ctx = <optimized out>, module_type = <optimized out>,
          cmd_type = <optimized out>, handler = <optimized out>, handler_conf = <optimized out>}
        ports = {elts = 0x7ca4c0, nelts = 7656240, size = 10007, nalloc = 7639840, pool = 0x7ca4c0}
        listen = <optimized out>
        module = <optimized out>
        ctx = 0x7c7838
        cscf = <optimized out>
        cscfp = <optimized out>
        cmcf = <optimized out>
#3  0x00000000004268fb in ngx_conf_parse ()
No symbol table info available.
#4  0x0000000000424101 in ngx_init_cycle ()
No symbol table info available.
#5  0x0000000000412b94 in main ()
No symbol table info available.
(gdb)