You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quick and dirty reproducer on trying to close the identity_map_codec (with running cleaner thread):
require'logstash-core'require'logstash/codecs/plain'require'logstash/codecs/identity_map_codec'defstart_codec(identity: Object.new)codec=LogStash::Codecs::Plain.new(Hash.new)codec=LogStash::Codecs::IdentityMapCodec.new(codec)codec.close# file input does it this way - closes the codec before usecodec.send:stream_codec,identity# cleaner and auto-flusher threads start again on first usecodecenddefstart_threads!100.times.mapdo |i|
Thread.startdoThread.current.name="t-#{i}"begincodec=start_codecThread.passcodec.cleaner.stop# a more direct codec.closerescue=>eputs"ERROR: #{e.inspect}\n#{e.backtrace.join("\n ")}"endendendendstart=Time.nowiteration=0loopdoiteration += 1puts"Elapsed time: #{Time.now - start}, iteration: #{iteration}"threads=start_threads!sleep(1.0)threads.eachdo |thread|
ifthread.alive?sleep(5)ifthread.alive?puts"Elapsed time: #{Time.now - start}"puts"LOCKED THREAD FOUND: #{thread.name}#{thread.inspect}"sleep(60)ifthread.alive?puts"BUG: thread (still) alive after 60seconds"exit(1)endendendendend
Quick and dirty reproducer on trying to close the
identity_map_codec
(with running cleaner thread):more real-world details at: logstash-plugins/logstash-input-file#298
The text was updated successfully, but these errors were encountered: