On 20/08/2025 14:49, Genes Lists via dovecot wrote:
On Wed, 2025-08-20 at 12:33 +0200, Hauke Fath via dovecot wrote:
getpwnam()
failed: Resource temporarily unavailable
hiya

EAGAIN failure from getpwnam() seems quite odd to me - especially if it
only happens with one username.

A quick glance at current dovecot git source did not help my
understanding.  I can see how errno could be ENOMEM, EINVAL or ERANGE,
but not really EAGAIN.

I think that ERANGE is not possible since the code in i_getpwnam() loops until it gets a different errno.

Any errno different to ERANGE and EINVAL returned by the call to getpwnam_r() will end up being logged so long as no result is returned. So if EAGAIN is returned then then that will get loggged (and depending on the library implementation that may also cover EWOULDBLOCK) . If a result is returned then that is taken without checking for errno. EINVAL is not possible as the code maps it to a non error condition.


Is it possible the errno came from elsewhere somehow?

In theory yes, since the errno is not actually saved and between the getpwnam_r() call and the error being logged there are some other system calls that could potentially change errno value. However I don't believe the odds of this happening are particularly high.


Does this have auth_debug = yes?
Any chance you can run a test with current release 2.4.1 or git head to
see if it exhibits similar issues?

Not a dovecot dev, but if were me and debug logs did not reveal enough,
  I'd add some debugging print statements to src/lib/ipwd.c (thats where
the 2.4.x call to getpwnam_r() is) to try figure out what is actually
happening. I did not look to see how similar the old 2.3.x code is to
2.4.

Also the OP could construct a small test program of a few lines to call getpwnam_r and see whether the behaviour for this user lookup can be reproduced independently of Dovecot. Another idea is to look into how the system is configured to resolve calls to getpwnam_r, e.g. nsswitch.conf if this is linux/unix or similar.

John


Aki can likely offer real insight.


_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to