Opened 2 weeks ago

Last modified 2 weeks ago

#2798 accepted defect

SSU: W+ deadlock

Reported by: zzz Owned by: zzz
Priority: blocker Milestone: 0.9.49
Component: router/transport Version: 0.9.48
Keywords: Cc: zlatinb
Parent Tickets: Sensitive: no

Description

reported by drzed

Version: I2P+ 0.9.48-12 (line numbers slightly off from our trunk)
but reportedly happened before -12 also

analysis:
threads 2 and 3 deadlocked; thread 1 an innocent casualty
likely introduced in w+ 0.9.48-6
blocker for 0.9.49

 Found one Java-level deadlock:
<dr|z3d_> =============================
<dr|z3d_> "SimpleTimer2 1/2":
<dr|z3d_>   waiting to lock monitor 0x00007f8ce4008780 (object 0x0000000085c2ca88, a net.i2p.router.transport.udp.PeerState),
<dr|z3d_>   which is held by "UDP Packet Pusher"

<dr|z3d_> "UDP Packet Pusher":
<dr|z3d_>   waiting to lock monitor 0x00007f8cd8137380 (object 0x0000000085c2d280, a net.i2p.router.transport.udp.SimpleBandwidthEstimator),
<dr|z3d_>   which is held by "UDP Packet Handler 1/2"

<dr|z3d_> "UDP Packet Handler 1/2":
<dr|z3d_>   waiting to lock monitor 0x00007f8ce4008780 (object 0x0000000085c2ca88, a net.i2p.router.transport.udp.PeerState),
<dr|z3d_>   which is held by "UDP Packet Pusher"


Java stack information for the threads listed above:
===================================================
"SimpleTimer2 1/2":
 at net.i2p.router.transport.udp.PeerState.getMessagesReceived(PeerState.java:1212)
 - waiting to lock <0x0000000085c2ca88> (a net.i2p.router.transport.udp.PeerState)
 at net.i2p.router.transport.udp.UDPTransport.countActivePeers(UDPTransport.java:2814)
 at net.i2p.router.transport.TransportManager.countActivePeers(TransportManager.java:539)
 at net.i2p.router.transport.CommSystemFacadeImpl.countActivePeers(CommSystemFacadeImpl.java:94)
 at net.i2p.router.tasks.CoalesceStatsEvent.timeReached(CoalesceStatsEvent.java:63)
 at net.i2p.util.SimpleTimer2$2.timeReached(SimpleTimer2.java:203)
 at net.i2p.util.SimpleTimer2$TimedEvent.run2(SimpleTimer2.java:482)
 at net.i2p.util.SimpleTimer2$TimedEvent.run(SimpleTimer2.java:421)
 at net.i2p.util.SimpleTimer2$PeriodicTimedEvent.run(SimpleTimer2.java:576)
 at java.util.concurrent.Executors$RunnableAdapter.call(java.base@15/Executors.java:515)
 at java.util.concurrent.FutureTask.run(java.base@15/FutureTask.java:264)
 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(java.base@15/ScheduledThreadPoolExecutor.java:304)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@15/ThreadPoolExecutor.java:1130)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@15/ThreadPoolExecutor.java:630)
 at java.lang.Thread.run(java.base@15/Thread.java:832)

"UDP Packet Pusher":
 at net.i2p.router.transport.udp.SimpleBandwidthEstimator.getBandwidthEstimate(SimpleBandwidthEstimator.java:82)
 - waiting to lock <0x0000000085c2d280> (a net.i2p.router.transport.udp.SimpleBandwidthEstimator)
 at net.i2p.router.transport.udp.PeerState.congestionOccurred(PeerState.java:782)
 at net.i2p.router.transport.udp.PeerState.messageRetransmitted(PeerState.java:1182)
 - locked <0x0000000085c2ca88> (a net.i2p.router.transport.udp.PeerState)
 at net.i2p.router.transport.udp.OutboundMessageFragments.preparePackets(OutboundMessageFragments.java:411)
 at net.i2p.router.transport.udp.OutboundMessageFragments.getNextVolley(OutboundMessageFragments.java:358)
 at net.i2p.router.transport.udp.PacketPusher.run(PacketPusher.java:41)
 at java.lang.Thread.run(java.base@15/Thread.java:832)
 at net.i2p.util.I2PThread.run(I2PThread.java:103)

"UDP Packet Handler 1/2":
 at net.i2p.router.transport.udp.PeerState.getRTT(PeerState.java:1191)
 - waiting to lock <0x0000000085c2ca88> (a net.i2p.router.transport.udp.PeerState)
 at net.i2p.router.transport.udp.SimpleBandwidthEstimator.addSample(SimpleBandwidthEstimator.java:73)
 - locked <0x0000000085c2d280> (a net.i2p.router.transport.udp.SimpleBandwidthEstimator)
 at net.i2p.router.transport.udp.PeerState.messageACKed(PeerState.java:1112)
 at net.i2p.router.transport.udp.PeerState.acked(PeerState.java:1769)
 at net.i2p.router.transport.udp.InboundMessageFragments.receiveACKs(InboundMessageFragments.java:226)
 at net.i2p.router.transport.udp.InboundMessageFragments.rcvData(InboundMessageFragments.java:95)
 at net.i2p.router.transport.udp.InboundMessageFragments.receiveData(InboundMessageFragments.java:78)
 at net.i2p.router.transport.udp.PacketHandler$Handler.handlePacket(PacketHandler.java:775)
 at net.i2p.router.transport.udp.PacketHandler$Handler.receivePacket(PacketHandler.java:389)
 at net.i2p.router.transport.udp.PacketHandler$Handler.handlePacket(PacketHandler.java:329)
 at net.i2p.router.transport.udp.PacketHandler$Handler.run(PacketHandler.java:228)
 at java.lang.Thread.run(java.base@15/Thread.java:832)
 at net.i2p.util.I2PThread.run(I2PThread.java:103)
 

Subtickets

Change History (2)

comment:1 Changed 2 weeks ago by zzz

Status: newaccepted
Note: See TracTickets for help on using tickets.