-
Notifications
You must be signed in to change notification settings - Fork 31
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
EAGAIN / EWOULDBLOCK when writing logs to stderr, causing failure #378
Comments
Got another backtrace, not sure if a good one:
|
It looks like your OS is not letting you create new processes/threads - you have run out of them for some reason. I think the solution is to find every place bupstash is spawning threads and add better error messages and also reevaluate the defaults for how many threads are being created. For your system as a work around I think you need to find the right resource limit to increase. |
I think it can't be threads, because then it would be a panic, but instead |
Is the error in clone3? that looks like creating a thread, see https://man.archlinux.org/man/clone3.2.en |
You are reading the backtrace backwards, the most recent call is at the top. So
So the error happens while trying to log the file action to As per travis-ci/travis-ci#4704 (comment), it might be the case that stderr is somehow opened in non-blocking mode (n.b. "Resource temporarily unavailable" is the name for EAGAIN as per |
Great detective work - sorry for reading it backwards - must be tired. That would make some sense, stderr might be backed up on a busy system when writing to the systemd journal. |
I can now confirm that stderr is set to non-blocking mode for some reason, that this is the failure cause and that it already is set like that from the very first log_fn call. I am not sure why and how and where it is set to non-blocking though, my strace skills are honestly not strong enough for that. (I thought I found something interesting, then it turned out to be in the ssh sub-process and thus irrelevant) |
This comment was marked as outdated.
This comment was marked as outdated.
Well, turns out that fd properties may be shared across processes, so this is not only relevant but turns out to actually be the root cause. #382 has a workaround-fix for it. |
I think I may also be running into this. Tried setting up a systemd service but it won't run for more than a second or so. |
Separating out the issue from #367. Backtrace:
I'll try to get a better trace with line numbers, but this might already be sufficient for tracking it down.
This might very well be an error caused on my side due to how I deploy it (systemd service), but currently I don't understand enough about what's going wrong there to be sure.
The text was updated successfully, but these errors were encountered: