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

Sequence Numbers for the Logout Message not validated #461

Open
julianrpereira opened this issue Jan 21, 2022 · 2 comments
Open

Sequence Numbers for the Logout Message not validated #461

julianrpereira opened this issue Jan 21, 2022 · 2 comments
Labels

Comments

@julianrpereira
Copy link

Describe the bug
When receiving a Logout message with a sequence gap a Logout message is sent out as a response instead of a ResendRequest to recover the gap and then logging out.

To Reproduce

  1. Initiator sends a Logon with Sequence Number 1
  2. Acceptor sends a Logon with Sequence Number 1
  3. Initiator sends a Logout with Sequence Number 5

Actual next step:
4. Acceptor sends a Logout with Sequence Number 2

Expected behavior
4. Acceptor sends a Resend Request to recover messages from the Initiator with Sequence Numbers 2, 3 and 4 and then Logout on receiving the missed messages

system information:

  • OS: Windows, Linux
  • Java version JDK11
  • QFJ Version 2.3.0

Additional context
Note that on the next Logon if the Initiator sends a Logon message with Sequence Number 5 (and Reset Sequence=No), then a Resend Request is generated to request from sequence 2.

Impact:
In the event that the Initiator Logs on the next session with Reset Sequence = Yes, then we have missed those messages as a Resend Request will not be triggered.

Example sequence of events:
image

@chrjohn
Copy link
Member

chrjohn commented Jan 24, 2022

@julianrpereira
I think this should be an easy fix, IIRC this is just controlled by a boolean flag. Are you willing to submit a PR?
We should verify that the Logout process times out to prevent a lengthy resend process.

@julianrpereira
Copy link
Author

@chrjohn thanks for reviewing. Yes I saw the boolean flag you are referring to. Will submit a PR for same. I do see a potential problem, I maybe wrong. Appreciate your opinion on the below flow.

  1. Initiator sends out of sequence Logout message
  2. Acceptor queues the Logout message and requests a resend
  3. Initiator will send all missed messages and a Gap Fill instead of the Logout message (as Heartbeats/Logons and Logouts are not required to be recovered)
  4. Acceptor does not process the queued Logout message since it received the Gap Fill
  5. Initirator terminates the connection as it did not receive a Logout response within the timeout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants