-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
inputready fd not set high following NCKEY_EOF #2525
Comments
so the weird thing is....with the
so we're passing through the without the poll, we immediately get it, and exit:
weird! but surely also the key to the problem. |
we only generate
so if we always hit this and have data available -- which we do, if we're checking the solution here is tripartite: |
so yeah it doesn't look like we "generate an |
we're seeing a livelock in our drone CI when doing i got perf output from a livelock: 44.34% notcurses-input libpthread-2.33.so [.] __pthread_mutex_unlock_usercnt ▒
42.98% notcurses-input libpthread-2.33.so [.] __pthread_mutex_lock ▒
6.78% notcurses-input libnotcurses-core.so.3.0.3 [.] process_ncinput ◆
3.28% notcurses-input libnotcurses-core.so.3.0.3 [.] process_melange ▒
1.21% notcurses-input libnotcurses-core.so.3.0.3 [.] pthread_mutex_lock@plt ▒
1.05% notcurses-input libnotcurses-core.so.3.0.3 [.] pthread_mutex_unlock@plt |
if we're spinning on pthreads....hrmmm, are we certain that's a livelock, and not just a long-lived process? eh, it's running twenty minutes, so presumably... |
When we get to the EOF on stdin, we need account for that with the readiness fd. Post to it upon the EOF transition. Closes #2525.
When we get to the EOF on stdin, we need account for that with the readiness fd. Post to it upon the EOF transition. Closes #2525.
When we get to the EOF on stdin, we need account for that with the readiness fd. Post to it upon the EOF transition. Closes #2525.
ok, so there's one more issue, and this is presumably why our CI is failing. we can get the EOF before we get the flurry of terminal responses, as we probably do when redirecting from
and here we never really process the EOF. |
hrmm, no, i just hadn't brought my local checkout up to speed. once i did, this problem goes away. we're still breaking in CI, though =. |
so in the drone context where we're seeing this lockup, here's our open fds:
|
so different pipes for stdout and stderr, /dev/null for stdin |
environment:
|
environment of actual
and now we just have more pipes:
|
When we get to the EOF on stdin, we need account for that with the readiness fd. Post to it upon the EOF transition. Closes #2525.
so we're sitting on the |
When we get to the EOF on stdin, we need account for that with the readiness fd. Post to it upon the EOF transition. Closes #2525.
When we get to the EOF on stdin, we need account for that with the readiness fd. Post to it upon the EOF transition. Closes #2525.
I can constantly read
NCKEY_EOF
, but the inputready fd is never high. If I add a check on input readiness, I never see theNCKEY_EOF
. Test withcli1
. See also #2521.The text was updated successfully, but these errors were encountered: