MUsman89 / rfc5766-turn-server

Automatically exported from code.google.com/p/rfc5766-turn-server
0 stars 0 forks source link

[proposal] Do not add the symbol information in binary package? #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!

I use turnserver-3.2.2.8-debian-wheezy-ubuntu-mint-x86-64bits binary package.

yesterday turnserver is crash(use tcp relay).

    |Feb 26 12:42:49 ip-XXX-XXX-XXX-XXX kernel: [5654721.068269] turnserver[11717]: segfault at 7ff3a64e2000 ip 00007ff3c3c5e8c7 sp 00007ff3bcea4d60 error 4 in turnserver[7ff3c3c35000+46000]

gdb trace from core dump file.

    |GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
    |Copyright (C) 2012 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".
    |For bug reporting instructions, please see:
    |<http://bugs.launchpad.net/gdb-linaro/>...
    |Reading symbols from /home/xxx/turnserver...(no debugging symbols found)...done.
    |[New LWP 11717]
    |[New LWP 11718]
    |[New LWP 11719]
    |[New LWP 11716]
    |
    |warning: Can't read pathname for load map: Input/output error.
    |[Thread debugging using libthread_db enabled]
    |Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    |Core was generated by `/usr/bin/turnserver -c /etc/turnserver.conf'.
    |Program terminated with signal 11, Segmentation fault.
    |#0  0x00007ff3c3c5e8c7 in ?? ()
    |(gdb) bt
    |#0  0x00007ff3c3c5e8c7 in ?? ()
    |#1  0x00007ff3c2b9d181 in ?? () from /usr/lib/libevent_core-2.0.so.5
    |#2  0x00007ff3c2b937f7 in event_base_loop () from /usr/lib/libevent_core-2.0.so.5
    |#3  0x00007ff3c3c47e8e in ?? ()
    |#4  0x00007ff3c3c47f69 in ?? ()
    |#5  0x00007ff3c160de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
    |#6  0x00007ff3c19173fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
    |#7  0x0000000000000000 in ?? ()
    |(gdb)

binary package without symbol information.
problem details unknown.

Do not add the symbol information in binary package to get a detailed trace?

created a binary with a symbol information.
I'm waiting to reproduce.

Original issue reported on code.google.com by mutsutos...@mixi.co.jp on 27 Feb 2014 at 2:39

GoogleCodeExporter commented 9 years ago
The debian package is compiled by the Debian utilities... I do not know how to 
include the symbol table and distribute it with Debian package.  Mutsutoshi, if 
you can figure out how to do that, and if you can reproduce the problem, that 
would be great ! Thanks !

Original comment by mom040...@gmail.com on 27 Feb 2014 at 6:09

GoogleCodeExporter commented 9 years ago
it is considered that regardless of the debian package, to be a good idea to 
put the symbol information always.
It is to be able to investigate at any time.

append '-g' flag to Makefile.in.

    |CFLAGS += -g ${INCFLAGS}

If, Debian package only, Maybe... will be added to the following rules.

    |DEB_CFLAGS_MAINT_APPEND = -g

we are investigating in the reproduction problem waiting to segfault.

Original comment by mutsutos...@mixi.co.jp on 27 Feb 2014 at 8:45

GoogleCodeExporter commented 9 years ago
I am not sure how -g flag will affect the performance. Also, the structure of 
the Debian package is quite strict, I am not sure that it has a place for the 
symbols map. I'll investigate it later.

Original comment by mom040...@gmail.com on 27 Feb 2014 at 8:51

GoogleCodeExporter commented 9 years ago
By the way, if you are using the TURN server for TCP data relay (RFC 6062) then 
Debian is not the best choice... CentOS 6.5 or ArchLinux or Fedora or BSD would 
be much better. The problem with Debian is that it currently does not support 
SO_REUSEPORT socket option and without that socket option RFC 6062 cannot be 
implemented accurately and cleanly. In Debian, we use a rather dirty hack to 
overcome that problem - see the function 
ioa_create_connecting_tcp_relay_socket() with comments inside. So for a serious 
production environment I'd recommend CentOS 6.5 (until Debian includes 
SO_REUSEPORT).

Original comment by mom040...@gmail.com on 27 Feb 2014 at 9:10

GoogleCodeExporter commented 9 years ago
Oops!
's True! There is no SO_REUSEPORT!

    socket.h
    |/* To add :#define SO_REUSEPORT 15 */

I think migration to CentOS. 
Thanks a bunch!

Original comment by mutsutos...@mixi.co.jp on 27 Feb 2014 at 10:17

GoogleCodeExporter commented 9 years ago
I checked the Debian package building process. The binaries are compiled with 
-g -O2 flags - but after that they are stripped. This is why you see no symbol 
table. We do not have control over that stripping process and I am not sure 
whether we can do anything about that.

Were you able to reproduce the problem ?

Original comment by mom040...@gmail.com on 28 Feb 2014 at 6:56

GoogleCodeExporter commented 9 years ago
Fixed in 3.2.2.9

Original comment by mom040...@gmail.com on 3 Mar 2014 at 4:25