Skip to content
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

segfault exitting SIPp when using rtpstream with multiple calls started at same time #699

Open
peter-oneill opened this issue Mar 21, 2024 · 1 comment

Comments

@peter-oneill
Copy link
Contributor

Hit a segfault when SIPp exits after running calls using RTPstream. Backtrace from gdb:

(gdb) bt
#0  0x000000000043c624 in rtpstream_playback_thread (params=0x7ffff7f2f6e0) at /sipp/src/rtpstream.cpp:1328
#1  0x000000000059e878 in start (p=0x7ffff605fef0) at src/thread/pthread_create.c:207
#2  0x000000000059fa47 in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC

invoked as gdb --args ./sipp-2e74b74b3b3bd076ce2c0d969916fc139ac008f9-debug -sf /app/dcluac_transcoding_rtp.xml -d 4000 -s 0123450000 <redacted IP1> -i <redacted IP2> -mi <redacted IP3> -r 10

Consistently reproduces with high enough call rate (e.g. 10 cps for me). Doesn't repro with 1cps. Intermittent at in between call rates.

Hittable at commit 2e74b74, not at commit e55f871

@peter-oneill
Copy link
Contributor Author

From a code skim, not sure how this is really intended to work: I think rtpstream_shutdown sets the exit_flag on every thread to 1, then immediately frees the memory. But rtpstream_playback_thread keeps references to threaddata for some time after exit_flag is last checked. Naively it looks like a race condition and is fundamentally unsafe.

But I don't seehow the timeout for a select call in rtp_playrtptask would affect this, so clearly I don't understand the area enough :-)

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

1 participant