Operating System - Tru64 Unix
1753935 Members
9819 Online
108810 Solutions
New Discussion юеВ

Error EWOULDBLOCK

 
Celia
Occasional Contributor

Error EWOULDBLOCK

Hello:

I have the following error:
EWOULDBLOCK (the socket is marked nonblocking and the operation could not complete). What can I do?

Thanks and regards.
6 REPLIES 6
Michael Schulte zur Sur
Honored Contributor

Re: Error EWOULDBLOCK

What is the context, you get this error?

Michael
Dave Bechtold
Respected Contributor

Re: Error EWOULDBLOCK

Hi Celia,

The EWOULDBLOCK error message can result from many various programming calls. It could be related to socket calls or file calls failing, resource exhaustion, etc...

It's documented as follows under intro(2) man page.

[EWOULDBLOCK] Operation would block
Indicates one or more of the following errors:

+ The socket is marked nonblocking and no connections are waiting to
be accepted.

+ The socket is marked nonblocking and connection cannot be immedi-
ately completed.

+ The file is locked and the function is instructed not to block
when locking.

+ The socket is marked as nonblocking and no space is available for
the specified function.

We really need to understand what service or program is reporting the error. Where is the message logged etc...

Dave Bechtold
Celia
Occasional Contributor

Re: Error EWOULDBLOCK

Hi!

The context is the following: we are using communications between two IPC proccess using the msgsnd. The error appears occasionaly.
We think that it can be an EAGAIN error. Do you have one idea?

Thanks.
Ralf Puchner
Honored Contributor

Re: Error EWOULDBLOCK

maybe the code is waiting for an I/O completion not getting from other side (lost of communication). If code inherits another I/O operation the function would block until first action resumes.
Help() { FirstReadManual(urgently); Go_to_it;; }
Vouters
Advisor

Re: Error EWOULDBLOCK

If your machine uptime is greater than 97,09 days and there are ACKs between the two computers retransmitted , you might incur a problem with the TCP layer that has to deal with an incorrect handling of a timer computation.

If so, please contact your customer support center to request a fix. Please specify the OS version.

If your computer has an uptime greater than 97 days, ACKs are being retransmitted and you do not have a contrat support, the only solution is to reboot, until there is a public patch kit.
Dave Bechtold
Respected Contributor

Re: Error EWOULDBLOCK

Hi Celia,

How is the msgflg argument set for the msgsnd() call?

If the IPC_NOWAIT flag is set then yes I'd expect it's returning EAGAIN error. Which can be caused by either the maximum number of message headers has been allocated or the message queue is full.

You can monitor the IPC Msg Queues using ipcs(8) command (Ex. ipcs -aq). Maybe there is some tuning that needs to be performed.

For information on tuning IPC msg's see "man sys_attrs_ipc" and the System Configuration and Tuning Guide section on Tuning Interprocess Communications.

Regards,
Dave Bechtold