tomaswolf commented on issue #410:
URL: https://github.com/apache/mina-sshd/issues/410#issuecomment-1700652719

   All right. I have now a test case that reproduces this. It's hyper-ugly test 
code, and to reproduce the race I had to instrument the code in 
`AbstractChannel`. But there is definitely a race, and it looks as if it's not 
easily solvable. With a default Apache MINA sshd server it's even harder to 
reproduce because a default server ignores requests for unknown channels. (The 
EOF sent after the close would arrive at the server for an unknown channel.) 
But making the server close the session on requests for unknown channels (which 
is the OpenSSH behavior) I can reproduce this consistently now.
   
   The race will not be fixed by the proposal you made. That still has the race 
: first, the field would have to be volatile at least, and second, 
`handleClose()` might still reach the `(this.sendEofFuture != null) {` _before_ 
`sendEof()` has set it.
   
   Fixing this will require a bit more work. I don't think it's solvable with 
the `AtomicBoolean eofSent;` this needs to be done more carefully. I have some 
ideas and will take another look over the week-end.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to