8000 Segmentation fault on SIGHUP · Issue #1629 · coturn/coturn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Segmentation fault on SIGHUP #1629

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

Closed
nicolas-laduguie opened this issue Jan 16, 2025 · 3 comments
Closed

Segmentation fault on SIGHUP #1629

nicolas-laduguie opened this issue Jan 16, 2025 · 3 comments

Comments

@nicolas-laduguie
Copy link
Contributor

Hi,

Our Coturn V4.6.3 (latest at the time of writing) compiled from source receives segfault when triggering SIGHUP signal on the process.
From the logs it shows:

Jan 16 09:42:53 XXX
 kernel: [7254972.859762] turnserver[3777793]: segfault at 7ffff4e00c98 ip 00005555555a9d1e sp 00007ffff4e00ca0 error 6 in turnserver[55555555d000+6e000] likely on CPU 0 (core 0, socket 0)
Jan 16 09:42:53 XXX kernel: [7254972.859786] Code: 4c 8d 05 ad e9 02 00 48 8d 05 b6 e7 02 00 48 89 c1 ba 00 00 00 00 be 71 01 00 00 48 8d 05 02 e7 02 00 48 89 c7 b8 00 00 00 00 <e8> 56 09 00 00 e8 00 fc ff ff c7 05 b2 1c 07 00 00 00 00 00 8b 05

Could capture what happens with GDB and here is what I get:

Thread 4 "turnserver" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe7600640 (LWP 3778663)]
0x00005555555a9d1e in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
369	    TURN_LOG_FUNC(TURN_LOG_LEVEL_DEBUG, "%s: resetting the log file\n", __FUNCTION__);

Seems that resetting the log file doesn't work properly, but don't understand why.
Anyone able to help me ?

System information:
6.8.0-47-generic #47~22.04.1-Ubuntu
AMD64

@nicolas-laduguie
Copy link
Contributor Author

Backtrace capture:

(gdb) bt
#0  0x00005555555a9d1e in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#1  0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#2  0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#3  0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#4  0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#5  0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#6  0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#7  0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#8  0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#9  0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#10 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#11 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#12 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#13 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#14 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#15 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#16 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#17 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#18 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#19 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#20 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#21 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#22 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#23 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#24 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#25 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#26 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#27 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#28 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#29 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#30 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#31 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#32 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#33 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#34 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#35 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#36 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#37 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#38 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#39 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#40 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#41 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#42 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#43 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#44 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#45 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#46 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#47 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#48 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#49 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#50 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#51 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#52 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#53 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#54 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#55 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#56 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#57 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#58 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#59 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#60 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#61 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#62 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#63 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#64 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#65 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#66 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#67 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#68 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#69 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#70 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#71 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#72 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#73 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#74 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#75 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#76 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#77 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#78 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#79 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#80 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#81 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#82 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369
#83 0x00005555555aaa92 in turn_log_func_default (file=0x5555555d8418 "src/apps/common/ns_turn_utils.c", line=369, level=TURN_LOG_LEVEL_DEBUG, format=0x5555555d84b8 "%s: resetting the log file\n") at src/apps/common/ns_turn_utils.c:607
#84 0x00005555555a9d23 in set_rtpfile () at src/apps/common/ns_turn_utils.c:369

So is it simply going into an infinite loop ?

@nicolas-laduguie
Copy link
Contributor Author

Should be coming from this commit 8f9446c
And that's probably why we where using the printf function instead of TURN_LOG_FUNC: the TURN_LOG_FUNC has now the log logic including call to set_rtpfile.

@ggarber
Copy link
Contributor
ggarber commented May 25, 2025

thx for the report and the fix

@ggarber ggarber closed this as completed May 25, 2025
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
0