Repository navigation
Clear vio so lingering IO is not confused when error message is returned - #3268
Conversation
|
Yes, clearly if the producer is going to be marked dead (not alive) then it shouldn't have any outstanding read operation. Because it's dead! |
|
I'm not sure why we need this line. If producer timeout occur , we will shutdown read and send 408 response , So read side should not be triggered again. |
|
@scw00 that is an interesting point. However, I don't think shutdown will pull the file descriptor out of the epoll object. If the packet already arrived the epoll structure would mark it as read ready possible. Though do_io_shutodown does clear the enable flag. I need to update this fix to make another null check. I'll get this deployed a bit more internally. Last night our 7.1.2 build deployed on 20 machines core dumped 8 times with this issue. So there is an issue, but possibly I'm missing the problem path. |
|
I looked at your other PR and see how the mainEvent does look at f.shutdown as well. I'm pulling in your fix too and will do some experiments today. We are seeing the crash frequently enough, we hopefully get a fix tracked down today. |
SolidWallOfCode
left a comment
There was a problem hiding this comment.
@shinrich and I discussed this and as noted we think data can arrive in the gap between the location of this fix and the IO shutdown call, as evidenced by the behavior in production.
|
Cherry-picked to 7.1.x |
Addresses issue #3239
When a user agent timeout occurs, ATS sets up a tunnel to send a 408 response to the client. The original post body tunnel is cleared but the read_vio on the client remains. If the client awaken the read ready request gets delivered to the consumer_handler which is expecting only write operations.
If we clear the read_vio before setting up the error tunnel, any additional read operations from the timed out client will be ignored.