Opened 6 years ago

Closed 6 years ago

#1012 closed defect (fixed)

NTCP deadlock

Reported by: DISABLED Owned by: Zlatin Balevsky
Priority: blocker Milestone: 0.9.8
Component: router/transport Version: 0.9.7.1
Keywords: deadlock ntcp Cc: Zlatin Balevsky
Parent Tickets: Sensitive: no

Description

Hi. A few days ago I found the i2prouter console with 0 connections active and with all tunnels in idle status.
Then I performed a thread dump about one hour and a half later that I will paste in http://pastethis.i2p.
I2p was running for 14 days without interruptions with about 10 torrents in i2psnark with 3 of then actively downloading and seeding before this issue. Before I had performed the thread dump there were ping replies from google, so there was internet connection available.
In the timestamp corresponding to:

06:26:38 | CRIT [uterWatchdog] 2p.router.tasks.RouterWatchdog?: Router appears hung, or there is severe network congestion. Watchdog starts barking!

there was an Ip change (I have dynamic ip) what is very odd… it is very suspicious… or maybe only a coincidence. I usually have an Ip change every 20-25 days or so,
and there were others Ip changes without any problem running this version of i2p.

Paste address: http://pastethis.i2p/show/5371/

Thanks

Subtickets

Attachments (1)

wrapper_chopped.log (118.3 KB) - added by DISABLED 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by DISABLED

Attachment: wrapper_chopped.log added

comment:1 Changed 6 years ago by zzz

Cc: Zlatin Balevsky added
Component: unspecifiedrouter/transport
Owner: set to zzz
Priority: majorblocker

Hoo boy

07:56:50 | Found one Java-level deadlock:
1478	07:56:50 | =============================
1479	07:56:50 | "NTCP writer 2/3":
1480	07:56:50 |   waiting to lock monitor 0xaebe8060 (object 0x85d8e548, a net.i2p.router.transport.ntcp.NTCPConnection),
1481	07:56:50 |   which is held by "NTCP Pumper"
1482	07:56:50 | "NTCP Pumper":
1483	07:56:50 |   waiting to lock monitor 0xae4d6204 (object 0x85d8e630, a net.i2p.router.transport.ntcp.NTCPConnection),
1484	07:56:50 |   which is held by "NTCP reader 4/4"
1485	07:56:50 | "NTCP reader 4/4":
1486	07:56:50 |   waiting to lock monitor 0xaebe8060 (object 0x85d8e548, a net.i2p.router.transport.ntcp.NTCPConnection),
1487	07:56:50 |   which is held by "NTCP Pumper"
1488	07:56:50 | 
07:56:50 |
1489	07:56:50 | Java stack information for the threads listed above:
1490	07:56:50 | ===================================================
1491	07:56:50 | "NTCP writer 2/3":
1492	07:56:50 |      at net.i2p.router.transport.ntcp.NTCPConnection.prepareNextWrite(NTCPConnection.java:550)
1493	07:56:50 |      - waiting to lock <0x85d8e548> (a net.i2p.router.transport.ntcp.NTCPConnection)
1494	07:56:50 |      at net.i2p.router.transport.ntcp.Writer$Runner.run(Writer.java:122)
1495	07:56:50 |      at java.lang.Thread.run(Thread.java:724)
1496	07:56:50 |      at net.i2p.util.I2PThread.run(I2PThread.java:85)
1497	07:56:50 | "NTCP Pumper":
1498	07:56:50 |      at net.i2p.router.transport.ntcp.NTCPConnection.close(NTCPConnection.java:301)
1499	07:56:50 |      - waiting to lock <0x85d8e630> (a net.i2p.router.transport.ntcp.NTCPConnection)
1500	07:56:50 |      at net.i2p.router.transport.ntcp.NTCPConnection.close(NTCPConnection.java:298)
1501	07:56:50 |      at net.i2p.router.transport.ntcp.NTCPTransport.removeCon(NTCPTransport.java:398)
1502	07:56:50 |      at net.i2p.router.transport.ntcp.NTCPConnection.close(NTCPConnection.java:307)
1503	07:56:50 |      - locked <0x85d8e548> (a net.i2p.router.transport.ntcp.NTCPConnection)
1504	07:56:50 |      at net.i2p.router.transport.ntcp.NTCPConnection.close(NTCPConnection.java:298)
1505	07:56:50 |      at net.i2p.router.transport.ntcp.EventPumper.processRead(EventPumper.java:565)
1506	07:56:50 |      at net.i2p.router.transport.ntcp.EventPumper.processKeys(EventPumper.java:358)
1507	07:56:50 |      at net.i2p.router.transport.ntcp.EventPumper.run(EventPumper.java:181)
1508	07:56:50 |      at java.lang.Thread.run(Thread.java:724)
1509	07:56:50 |      at net.i2p.util.I2PThread.run(I2PThread.java:85)
1510	07:56:50 | "NTCP reader 4/4":
1511	07:56:50 |      at net.i2p.router.transport.ntcp.NTCPConnection.close(NTCPConnection.java:301)
1512	07:56:50 |      - waiting to lock <0x85d8e548> (a net.i2p.router.transport.ntcp.NTCPConnection)
1513	07:56:50 |      at net.i2p.router.transport.ntcp.NTCPConnection.close(NTCPConnection.java:298)
1514	07:56:50 |      at net.i2p.router.transport.ntcp.NTCPTransport.inboundEstablished(NTCPTransport.java:180)
1515	07:56:50 |      at net.i2p.router.transport.ntcp.NTCPConnection.finishInboundEstablishment(NTCPConnection.java:244)
1516	07:56:50 |      - locked <0x85d8e630> (a net.i2p.router.transport.ntcp.NTCPConnection)
1517	07:56:50 |      at net.i2p.router.transport.ntcp.EstablishState.verifyInbound(EstablishState.java:632)
1518	07:56:50 |      at net.i2p.router.transport.ntcp.EstablishState.receiveInbound(EstablishState.java:306)
1519	07:56:50 |      at net.i2p.router.transport.ntcp.EstablishState.receive(EstablishState.java:151)
1520	07:56:50 |      at net.i2p.router.transport.ntcp.Reader.processRead(Reader.java:162)
1521	07:56:50 |      at net.i2p.router.transport.ntcp.Reader.access$400(Reader.java:21)
1522	07:56:50 |      at net.i2p.router.transport.ntcp.Reader$Runner.run(Reader.java:118)
1523	07:56:50 |      at java.lang.Thread.run(Thread.java:724)
1524	07:56:50 |      at net.i2p.util.I2PThread.run(I2PThread.java:85)
1525	07:56:50 |
1526	07:56:50 | Found 1 deadlock.

comment:2 Changed 6 years ago by Zlatin Balevsky

Keywords: deadlock ntcp added; severe network congestion removed
Owner: changed from zzz to Zlatin Balevsky
Status: newaccepted
Summary: Severe network congestionNTCP deadlock

comment:3 Changed 6 years ago by Zlatin Balevsky

Resolution: fixed
Status: acceptedclosed

Fix pushed to trunk

Note: See TracTickets for help on using tickets.