Why semtimedop returns EAGAIN? (Doc ID 2111325.1)

Last updated on AUGUST 01, 2016

Applies to:

Solaris Operating System - Version 10 1/13 U11 and later
Information in this document applies to any platform.

Goal

Running truss(1) on a process may show semtimedop(2) return EAGAIN as follows.


44267/1:        semtimedop(234881131, 0xFFFFFFFF7FFFCAF4, 1, 0xFFFFFFFF7FFFCAE0) (sleeping...)
44267/1:                semnum=170   semop=-1    semflg=0
44267/1:                timeout: 5.000000000 sec
44267/1:         7.5196  5.0107  0.0001 semtimedop(234881131, 0xFFFFFFFF7FFFCAF4, 1, 0xFFFFFFFF7FFFCAE0) Err#11 EAGAIN
44267/1:                semnum=170   semop=-1    semflg=0
44267/1:                timeout: 5.000000000 sec

In general, EAGAIN is used as the error code when there is a resource issue. strerror(3C) translates EAGAIN to Resource temporarily unavailable.

However, if the system call is semtimedop(2), EAGAIN does not necessarily mean any resource issue. This can often be mis-diagnosed as an Operating System resource issue.


This document explains the why semtimedop() returns EAGAIN and why, most of the time, it is not necessary Operating System.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms