Skip to content
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

connections are closed uncleanly even when using disconnect() #76

Open
kortemik opened this issue Nov 22, 2024 · 2 comments
Open

connections are closed uncleanly even when using disconnect() #76

kortemik opened this issue Nov 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@kortemik
Copy link
Member

kortemik commented Nov 22, 2024

Describe the bug
disconnect does not use verifyTransaction therefore connections may be closed uncleanly even when using disconnect()

Expected behavior
disconnect() would use verifyTransaction and close socket only after it has received a reply from server that server is ready to close.

How to reproduce
run

mvn test -Dtest=ManagedConnectionTest#testPooledReboundConnections

multiple times, open and cleanClose counters will mismatch and cause a test to be flaky on L280.

Screenshots

Software version
4.1.0

Desktop (please complete the following information if relevant):

  • OS:
  • Browser:
  • Version:

Additional context
suspected root cause:

this may be affected too by the server's hint message of 0 serverclose 0 which the server tries to send after close transaction is processed and client closes the connection and the counters are based on server's cleanClose.

  • sometimes openCount is larger than cleanCloseCount because clean close did not happen
  • sometimes cleanCloseCount is larger than openCount because ?
@kortemik kortemik added the bug Something isn't working label Nov 22, 2024
@kortemik
Copy link
Member Author

moving counters in RelpEventOpenCounting and RelpEventCloseCounting from after the accept(frameContext); to before it makes test pass cleanly.

@kortemik
Copy link
Member Author

moving counters in RelpEventOpenCounting and RelpEventCloseCounting from after the accept(frameContext); to before it makes test pass cleanly.

this indicates that there happens an exception while processing these payloads on the server side and following is seen:

[Thread-1] WARN com.teragrep.net_01.eventloop.EventLoop - Detected unexpectedly closed channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant