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

send_packets: Avoid crashing on errors in sendto call. #74

Closed
wants to merge 1 commit into from

Conversation

sruffell
Copy link

If sendto() returned an error, pthread_cleanup_pop() was not called before
return, resulting in a segfault on my CentOS 5.x platform.

Next, I need to look into why sendto is failing on CentOS 5.x but not on other
platforms.

If sendto() returned an error, pthread_cleanup_pop() was not called before
return, resulting in a segfault on my CentOS 5.x platform.

Next, I need to look into why sendto is failing on CentOS 5.x but not on other
platforms.
@sruffell
Copy link
Author

I also now see that this change wouldn't be necessary if Pull Request #57 is merged since it drops the use of the pthread_cleanup_push/pop calls.

@sruffell sruffell closed this May 28, 2014
@sruffell sruffell reopened this May 28, 2014
@wdoekes
Copy link
Member

wdoekes commented May 28, 2014

Yes. I had the same problem with the pthread_cleanup stuff (on Ubuntu), so I had to hack it out too.

@sruffell
Copy link
Author

You wouldn't know what the issue with sendto/raw sockets is would you? I think there must be some difference in glib on the platforms since just changing the kernel out on Centos 5.x to 3.2.x from the stock 2.6.18 didn't fix the "invalid arguement" error. But running under CentOS 6.x and Debian 6.0 did not have a problem.

I have the same failure running ossobv:wjd-no_root_for_pcap.

@wdoekes
Copy link
Member

wdoekes commented May 29, 2014

No, that I don't. The sendto issues I had were my own doing when I was hacking on the non-root play.

@wdoekes wdoekes force-pushed the master branch 2 times, most recently from bebdf78 to 8923379 Compare October 3, 2014 06:55
@vodik vodik force-pushed the master branch 3 times, most recently from 231edd4 to 341fb97 Compare July 16, 2015 20:58
@wdoekes wdoekes self-assigned this Jan 21, 2016
@tebriel
Copy link

tebriel commented Nov 9, 2016

I was seeing the same segfault issue, randomly after 30-70 calls. I'm running in two dockers communicating to each other over a bridged network.

dmesg shows:

[2860961.852761] traps: sipp[9672] general protection ip:7f6e211a32f0 sp:1f45fa96183e4bc9 error:0 in libc-2.23.so[7f6e2116e000+1bf000]

And the error I see in sipp is:

2016-11-09      20:36:04.498133 1478723764.498133: send_packets.c: sendto failed with error: Operation not permitted.

Sipp was exiting status code 139.

I can reproduce with great regularity, let me know if I can provide any more debugging output.

I created a patch for 2.5.1 since this branch has merge conflicts, patch attached.

send_packets.patch.txt

wdoekes pushed a commit that referenced this pull request Feb 26, 2019
(cherry-picked 6b11afc)
(cherry-picked a36c62b)

Closes #74
Closes #370
@wdoekes
Copy link
Member

wdoekes commented Feb 26, 2019

Fixed in recent commits

@wdoekes wdoekes closed this Feb 26, 2019
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

Successfully merging this pull request may close these issues.

None yet

3 participants