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

Infinite loop by WebGateway client logout #125

Open
SmySmy opened this issue Jul 28, 2022 · 0 comments
Open

Infinite loop by WebGateway client logout #125

SmySmy opened this issue Jul 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@SmySmy
Copy link

SmySmy commented Jul 28, 2022

Describe the bug
After closing a WebSocket the OpcUa WebServer tries to logout the client.
For this the function WebGateway::Client::logout(...) is called.
This function first checks if the call is made in the correct thread.
The condition for this is "if (!strand_->running_in_this_thread()) {...}".
If this is not true, the function call is passed to the thread via dispatch.

Now on Windows we could observe that this condition very rarely becomes true.
Mostly we see an infinite loop here.

This causes the problem that the clients are never closed and cleaned up.

To Reproduce
Steps to reproduce the behavior:

  1. Create an active connection over the WebGateway with an OpcUa Server. As a client we use the Firefox Browser.
  2. Close the Tab in which the WebSockets runs.
  3. The WebGateway::ClientManager::receiveMessage() receives a message with the type: "CHANNELCLOSE_MESSAGE".
  4. The WebServer now tries to close the client.
  5. The condition in WebGateway::Client::logout is never true.

Expected behavior
The client should really log out and not be stuck in an infinite loop.

Logs
OpcUaServer.log

Environment (please complete the following information):

  • OS: Windows 10
  • OpcUaStack: 4 - Branch: 392_windows_build_not_working (2022-06-27 16:06:13)
  • Boost: 1.79
  • Platform: x86
@SmySmy SmySmy added the bug Something isn't working label Jul 28, 2022
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