zeromq / netmq

A 100% native C# implementation of ZeroMQ for .NET
Other
2.94k stars 742 forks source link

avoid NRE on disposed timers #1011

Open valeriob opened 2 years ago

valeriob commented 2 years ago

It looks like that using HeartbeatTimers causes a race condition so that timers gets disposed before execution, when it happens the whole process crashes, this only mitigates the problem, I still do not understand why it's happening, but it looks like complicated to debug.

codecov[bot] commented 2 years ago

Codecov Report

Merging #1011 (6e2e089) into master (0b58c23) will increase coverage by 65.76%. The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           master    #1011       +/-   ##
===========================================
+ Coverage        0   65.76%   +65.76%     
===========================================
  Files           0      146      +146     
  Lines           0     9065     +9065     
  Branches        0     1451     +1451     
===========================================
+ Hits            0     5962     +5962     
- Misses          0     2496     +2496     
- Partials        0      607      +607     
Impacted Files Coverage Δ
src/NetMQ/Core/IOObject.cs 96.00% <0.00%> (ø)
src/NetMQ/OutgoingSocketExtensions.cs 76.71% <0.00%> (ø)
src/NetMQ/Core/Utils/YQueue.cs 96.61% <0.00%> (ø)
src/NetMQ/Sockets/SubscriberSocket.cs 42.10% <0.00%> (ø)
src/NetMQ/RoutingKey.cs 9.61% <0.00%> (ø)
src/NetMQ/Core/Utils/PollerBase.cs 100.00% <0.00%> (ø)
src/NetMQ/EmptyArray.cs 100.00% <0.00%> (ø)
src/NetMQ/Core/YPipe.cs 100.00% <0.00%> (ø)
src/NetMQ/Core/Utils/StringLib.cs 0.00% <0.00%> (ø)
src/NetMQ/Core/Reaper.cs 93.61% <0.00%> (ø)
... and 137 more