Skip to content

Conversation

kares
Copy link
Contributor

@kares kares commented Nov 22, 2021

Plugin has been failing CI for a long time on 6.x for a long time.

The problematic spec assumes a client socket blocking from readpartial (while the server keep the socket open wout writing anything) to be interruptible on client_socket.close - this is not the case and the only reason the spec does not hang CI is due the teardown closing the server socket -> leads to a EOF from the readpartial.
Seems this has been "broken" on JRuby 9.2.7.0 (LS 6.8.x) and closing a socket stuck in readpartial hangs.

The failure aksi revealed a deeper (timeout) issue in terms of how the plugin works.
The potential use of timeout is problematic - a proper implementation would be to use select with a timeout and check for stopping periodically.

@kares kares linked an issue Nov 22, 2021 that may be closed by this pull request
@kares kares changed the title Fix: avoid using Timeout to be able to stop plugin Fix: unable to stop plugin (on older versions of LS) Nov 22, 2021
@kares kares marked this pull request as ready for review November 22, 2021 15:36
@kares kares requested a review from yaauie November 22, 2021 15:36
@kares kares requested review from andsel and removed request for yaauie December 23, 2021 11:49
Copy link

@andsel andsel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kares kares merged commit cadcdcf into logstash-plugins:main Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants