-
Notifications
You must be signed in to change notification settings - Fork 185
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
SIGPIPE when writing data to a server that doesn't want it #819
Comments
@djmitche If you have an easy test case for this, it would be very interesting to run it with the main branch where we have the ureq 3.x rewrite. I don't expect any behavior changes if the error arises deep in rustls, but it's interesting to know for sure. |
Huh, I can reproduce the SIGPIPE with just |
Ah, rust-lang/rust#62569 looks related, and I see the following in the trace for a run of a Rust binary:
So, this isn't a ureq issue. |
I had no idea Rust did this. Thanks! |
In GothenburgBitFactory/taskwarrior#3624, user misconfiguration means that we are sending a pretty big request body to a server that's not interested, and presumably drops the TCP connection. Ideally this should result in a
Result::Err
and we can report it back to the user, but instead the process gets a SIGPIPE and exits with a nonzero status but no console output.From the backtrace in that bug, it appears that
rustls
is usingwritev
and not usingMSG_NOSIGNAL
asureq
does. I see @jsha answered in rustls/rustls#1371 regarding a (somewhat racy) way of detecting the server closing the connection, but perhaps this doesn't cover writes viarustls
?Is there a preferred/recommended way to avoid this?
The text was updated successfully, but these errors were encountered: