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

SIPp giving segmentation fault. #610

Closed
sahil-ecosmob opened this issue Feb 24, 2023 · 7 comments · Fixed by #698
Closed

SIPp giving segmentation fault. #610

sahil-ecosmob opened this issue Feb 24, 2023 · 7 comments · Fixed by #698
Labels

Comments

@sahil-ecosmob
Copy link

sahil-ecosmob commented Feb 24, 2023

Hello. I am trying to do the load balancer test using SIPp. I am using the following commands for UAC and UAS :

run UAS :
sipp -sf Active-Media/uas-active.xml -i 192.168.1.10 -p 5064 -rtp_echo -m 500

run UAC :
sipp -sf Active-Media/uac-active.xml -i 192.168.1.10 192.168.1.10:5064 -rtp_echo -m 500 -r 100

It works fine until -r flag has value < 50. above this, it shows segmentation fault. Also tI don't face this problem with basic scenarios... only when I use RTP. could it be because of RTP port allocation or something ??

Any idea why this could be happening ??
Thanks in advance for help.

Regards Sahil

@wdoekes
Copy link
Member

wdoekes commented Feb 24, 2023

Those scenarios are not included in this repo. Maybe you can attach them or add them as <details><pre> so people can reproduce.

@sahil-ecosmob
Copy link
Author

sure. I am using scenarios from this git repo. https://github.com/pbertera/SIPp-by-example

@wdoekes
Copy link
Member

wdoekes commented Feb 24, 2023

That's not attaching. If someone decided to look at this in a month, that repo might be looking differently. Please make it easy on those trying to help.

@sahil-ecosmob
Copy link
Author

Hello. These are the scenario files. I have added them as .txt files as git wasn't allowing .xml format. So please rename to .xml whenever used.

uac-active.txt
uas-active.txt

@rafiw
Copy link

rafiw commented Mar 1, 2023

I also got a segmentation fault when using r=100, I used valgrind and GDB to track the problem here is the trace
the segmentation happens in this line in send_packets

   while (pkt_index < pkt_max) {
        memcpy(udp, pkt_index->data, pkt_index->pktlen); // crash here

using gdb i can see pkt_index is null. it looks like thread sync issue.

==29937== Thread 2:
==29937== Invalid read of size 8
==29937==    at 0x206447: send_packets (send_packets.c:243)
==29937==    by 0x1A02C7: send_wrapper(void*) (call.cpp:6820)
==29937==    by 0x54966DA: start_thread (pthread_create.c:463)
==29937==    by 0x6E0661E: clone (clone.S:95)
==29937==  Address 0x77df840 is 32 bytes inside a block of size 40 free'd
==29937==    at 0x4C32D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29937==    by 0x17E576: CAction::setPcapArgs(char const*) (actions.cpp:535)
==29937==    by 0x19D150: call::executeAction(char const*, message*) (call.cpp:6079)
==29937==    by 0x18B442: call::executeMessage(message*) (call.cpp:1904)
==29937==    by 0x18C6B6: call::run() (call.cpp:2218)
==29937==    by 0x20859E: traffic_thread(int&, int&) (sipp.cpp:577)
==29937==    by 0x20D13D: main (sipp.cpp:2148)
==29937==  Block was alloc'd at
==29937==    at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29937==    by 0x17E59A: CAction::setPcapArgs(char const*) (actions.cpp:540)
==29937==    by 0x19D150: call::executeAction(char const*, message*) (call.cpp:6079)
==29937==    by 0x18B442: call::executeMessage(message*) (call.cpp:1904)
==29937==    by 0x18C6B6: call::run() (call.cpp:2218)
==29937==    by 0x20859E: traffic_thread(int&, int&) (sipp.cpp:577)
==29937==    by 0x20D13D: main (sipp.cpp:2148)

@rafiw
Copy link

rafiw commented Mar 1, 2023

might be a duplicate of #576

@rafiw
Copy link

rafiw commented Mar 1, 2023

reproduce
sipp -m 3000 -inf output.csv -sf test.xml -s 1000 -max_socket 32000 -d 90000 -r 90 [IP]
use this code to generate the csv

with open("output.csv", "w") as output:
    output.write("SEQUENTIAL\n")
    for client in range(1000, 5001):
        output.write(f"{client};demo.sippulse.com;[authentication username={client} password=secret]\n")

used the xml from here
https://github.com/flaviogoncalves/astricon2017/blob/master/sipp_pcap.xml

@rkday rkday added the media label Apr 1, 2023
peter-oneill added a commit to peter-oneill/sipp that referenced this issue Mar 20, 2024
peter-oneill added a commit to peter-oneill/sipp that referenced this issue Mar 20, 2024
peter-oneill added a commit to peter-oneill/sipp that referenced this issue Mar 20, 2024
peter-oneill added a commit to peter-oneill/sipp that referenced this issue Mar 21, 2024
@orgads orgads linked a pull request Mar 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants