[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: open - resource temporarily unavailable



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, Jun 17, 2016 at 11:06:15AM +0000, Andrey wrote:
>  <tomas <at> tuxteam.de> writes:

[...]

> > If the problem is somehow repeatable [...]

> It happens very rare and rather unpredictable 
> sometimes when a lot of files are created
> and sometimes without such obvious signs.

Darn. This makes the problem "interesting".

> > Other things to check: does that happen on any files? On a
> > specific file system? If yes: how is that one mounted?
> > 
> 
> It happens to any file on any ext4 partition which are locally mounted.
> 
> Is there a way to find out at least which part of the system is responsible
> for 'resource temporarily unavailable'.

OK. I've got one more hint. Reading through the open(2) man page
(assuming it is really open what's failing on you -- what evidence
do you have?), EAGAIN isn't listed among the possible errno values,
but EWOULDBLOCK

   EWOULDBLOCK
          The O_NONBLOCK flag was specified, and an incompatible
          lease was held on the file (see fcntl(2)).

Now, on POSIX systems EWOULDBLOCK and EAGAIN could be one and the
same. Lo and behold, a small test program on my box reveals that
both at least translate to 'Resource temporarily unavailable':

    #include <stdio.h>
    #include <errno.h>
    #include <string.h>
    
    int main(int argc, char *argv[])
    {
     printf("EAGAIN is '%s'\n"
            "EWOULDBLOCK is '%s'\n",
            strerror(EAGAIN),
            strerror(EWOULDBLOCK));
    }
    
    ==>
    
    tomas@rasputin:~/prog/C$ ./errno
    EAGAIN is 'Resource temporarily unavailable'
    EWOULDBLOCK is 'Resource temporarily unavailable'


This will all depend on things like kernel version, libc and whatnot,
but the most likely candidate at the moment seems to be the app playing
games with fcntl leases.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAldj35cACgkQBcgs9XrR2kbwSwCfU1kdxFV6vp/xvS0/O1WuUEj8
IWgAnA9jtNDLJxc4AVtg17gDNYrxX3AR
=pnjY
-----END PGP SIGNATURE-----


Reply to: