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

sendto() returns undocumented return code #74

Open
afindling opened this issue May 7, 2021 · 0 comments
Open

sendto() returns undocumented return code #74

afindling opened this issue May 7, 2021 · 0 comments

Comments

@afindling
Copy link

Description of Problem:
One of our Customers has recently upgrade its Linux to:
Linux demchdc178x 4.12.14-122.60-default #1 SMP Mon Feb 1 20:52:25 UTC 2021 (cb56da1) x86_64 x86_64 x86_64 GNU/Linux
From old 4.12.14-122.46-default

Now he experiences a strange new behavior with our Product that he hasn’t seen before the Linux update.
Our product uses the C system call sendto() (on a UDP socket) in order to communicate between multiple threads internally (receiver is within same process).
This function is called very often (hundreds times per sec) successfully, but from time to time this function returns an unexpected and undocumented return code EPERM
We can see this from our Exception Logging like

Logging: sendto (s: 20, msg: 0x7f240a1f97e8, len: 4, flags: 0, to: 0x10090d60, tolen: 16) = -1 - errno = EPERM(1)
msg: 0000 70 00 00 1F p...............
to: 0000 02 00 BF EB 7F 00 00 01 00 00 00 00 00 00 00 00 ..........

Now, as this is an unexpected return-code, the sender does not know how to react and therefore throws an exception and exits the process.
This means that the service is broken.
The customer reports that this happened about 150times a day and is not very happy about it.
Questions:

  1. What exactly does EPERM mean in the context of sendto() ?
  2. Why is this return-code not documented?
  3. How shall the caller proceed when this EPERM is returned.
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