Opened 5 years ago

Closed 2 years ago

#1207 closed defect (fixed)

Orchid: deadlock

Reported by: dg Owned by:
Priority: major Milestone: 0.9.27
Component: apps/plugins Version: 0.9.11
Keywords: Orchid hang Cc: zab@…
Parent Tickets:

Description (last modified by dg)

Orchid version: 1.0.0-0.3-b44
I2P version: 0.9.11-0
Java version: Oracle Corporation 1.7.0_51 (OpenJDK Runtime Environment 1.7.0_51-b00)
2014/02/15 21:24:59 | Found one Java-level deadlock:
2014/02/15 21:24:59 | =============================
2014/02/15 21:24:59 | "pool-138-thread-61":
2014/02/15 21:24:59 |   waiting to lock monitor 0x00007fb06621a1c8 (object 0x00000000e53758f8, a java.util.HashMap),
2014/02/15 21:24:59 |   which is held by "Thread-684"
2014/02/15 21:24:59 | "Thread-684":
2014/02/15 21:24:59 |   waiting to lock monitor 0x00007fb06544f728 (object 0x00000000e5b7af48, a java.util.HashMap),
2014/02/15 21:24:59 |   which is held by "pool-135-thread-387"
2014/02/15 21:24:59 | "pool-135-thread-387":
2014/02/15 21:24:59 |   waiting to lock monitor 0x00007fb06621a1c8 (object 0x00000000e53758f8, a java.util.HashMap),
2014/02/15 21:24:59 |   which is held by "Thread-684"
2014/02/15 21:24:59 | 
2014/02/15 21:24:59 | Java stack information for the threads listed above:
2014/02/15 21:24:59 | ===================================================
2014/02/15 21:24:59 | "pool-138-thread-61":
2014/02/15 21:24:59 | 	at com.subgraph.orchid.connections.ConnectionImpl.bindCircuit(ConnectionImpl.java:96)
2014/02/15 21:24:59 | 	- waiting to lock <0x00000000e53758f8> (a java.util.HashMap)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.CircuitImpl.bindToConnection(CircuitImpl.java:93)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.CircuitBuildTask.openEntryNodeConnection(CircuitBuildTask.java:97)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.CircuitBuildTask.run(CircuitBuildTask.java:48)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.CircuitManagerImpl.tryOpenCircuit(CircuitManagerImpl.java:392)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.CircuitManagerImpl.openDirectoryCircuit(CircuitManagerImpl.java:245)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.directory.downloader.DirectoryDownloaderImpl.openCircuit(DirectoryDownloaderImpl.java:131)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.directory.downloader.DirectoryDownloaderImpl.downloadRouterMicrodescriptors(DirectoryDownloaderImpl.java:104)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.directory.downloader.DirectoryDownloadTask$DownloadRouterDescriptorsTask.run(DirectoryDownloadTask.java:202)
2014/02/15 21:24:59 | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2014/02/15 21:24:59 | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2014/02/15 21:24:59 | 	at java.lang.Thread.run(Thread.java:744)
2014/02/15 21:24:59 | "Thread-684":
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.CircuitIO.processRelayDataCell(CircuitIO.java:172)
2014/02/15 21:24:59 | 	- waiting to lock <0x00000000e5b7af48> (a java.util.HashMap)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.CircuitIO.deliverRelayCell(CircuitIO.java:143)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.CircuitImpl.deliverRelayCell(CircuitImpl.java:216)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.connections.ConnectionImpl.processRelayCell(ConnectionImpl.java:285)
2014/02/15 21:24:59 | 	- locked <0x00000000e53758f8> (a java.util.HashMap)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.connections.ConnectionImpl.processCell(ConnectionImpl.java:255)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.connections.ConnectionImpl.readCellsLoop(ConnectionImpl.java:226)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.connections.ConnectionImpl.access$000(ConnectionImpl.java:44)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.connections.ConnectionImpl$1.run(ConnectionImpl.java:215)
2014/02/15 21:24:59 | 	at java.lang.Thread.run(Thread.java:744)
2014/02/15 21:24:59 | "pool-135-thread-387":
2014/02/15 21:24:59 | 	at com.subgraph.orchid.connections.ConnectionImpl.removeCircuit(ConnectionImpl.java:321)
2014/02/15 21:24:59 | 	- waiting to lock <0x00000000e53758f8> (a java.util.HashMap)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.CircuitIO.closeCircuit(CircuitIO.java:254)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.CircuitIO.removeStream(CircuitIO.java:301)
2014/02/15 21:24:59 | 	- locked <0x00000000e5b7af48> (a java.util.HashMap)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.CircuitImpl.removeStream(CircuitImpl.java:238)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.ExitCircuitImpl.openExitStream(ExitCircuitImpl.java:44)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.OpenExitStreamTask.tryOpenExitStream(OpenExitStreamTask.java:46)
2014/02/15 21:24:59 | 	at com.subgraph.orchid.circuits.OpenExitStreamTask.run(OpenExitStreamTask.java:23)
2014/02/15 21:24:59 | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2014/02/15 21:24:59 | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2014/02/15 21:24:59 | 	at java.lang.Thread.run(Thread.java:744)
2014/02/15 21:24:59 | 
2014/02/15 21:24:59 | Found 1 deadlock.

This was spammed in my wrapper log once I stopped Orchid post-restart:

2014/02/15 21:58:38 | Feb 15, 2014 9:58:38 PM com.subgraph.orchid.circuits.CircuitBuildTask run
2014/02/15 21:58:38 | WARNING: Unexpected exception while building circuit: java.lang.IllegalStateException: ConnectionCache has been closed
2014/02/15 21:58:38 | java.lang.IllegalStateException: ConnectionCache has been closed
2014/02/15 21:58:38 | 	at com.subgraph.orchid.connections.ConnectionCacheImpl.getConnectionTo(ConnectionCacheImpl.java:106)
2014/02/15 21:58:38 | 	at com.subgraph.orchid.circuits.CircuitBuildTask.openEntryNodeConnection(CircuitBuildTask.java:96)
2014/02/15 21:58:38 | 	at com.subgraph.orchid.circuits.CircuitBuildTask.run(CircuitBuildTask.java:48)
2014/02/15 21:58:38 | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2014/02/15 21:58:38 | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2014/02/15 21:58:38 | 	at java.lang.Thread.run(Thread.java:744)
Exploratory:	2
Client:	0
Participating:	0
Share ratio:	0.00

All tunnels became yellow, connected to 1 then 0 peers. "Check network connection and NAT/firewall" shows.

Subtickets

Change History (21)

comment:2 Changed 5 years ago by dg

  • Description modified (diff)

comment:3 Changed 5 years ago by dg

  • Description modified (diff)

comment:4 Changed 5 years ago by zzz

  • Component changed from unspecified to apps/plugins

comment:5 Changed 5 years ago by zzz

  • Summary changed from Found 1 deadlock. to Orchid: deadlock

comment:6 Changed 5 years ago by zzz

  • Milestone 0.9.12 deleted

See pastethis link in dup #1211 for another stack trace

comment:7 Changed 5 years ago by zzz

  • Priority changed from minor to major

comment:8 Changed 5 years ago by killyourtv

Another (and with this I'm done):

2014/02/21 01:40:46 | Found one Java-level deadlock:
2014/02/21 01:40:46 | =============================
2014/02/21 01:40:46 | "RouterConsole Jetty":
2014/02/21 01:40:46 |   waiting to lock monitor 0x00007f22a96e2838 (object 0x00000000ebc327e0, a java.util.HashMap),
2014/02/21 01:40:46 |   which is held by "Thread-1131066"
2014/02/21 01:40:46 | "Thread-1131066":
2014/02/21 01:40:46 |   waiting to lock monitor 0x00007f22b4030dd8 (object 0x00000000ec62df00, a java.util.HashMap),
2014/02/21 01:40:46 |   which is held by "pool-10770-thread-295"
2014/02/21 01:40:46 | "pool-10770-thread-295":
2014/02/21 01:40:46 |   waiting to lock monitor 0x00007f22a96e2838 (object 0x00000000ebc327e0, a java.util.HashMap),
2014/02/21 01:40:46 |   which is held by "Thread-1131066"
2014/02/21 01:40:46 | 
2014/02/21 01:40:46 | Java stack information for the threads listed above:
2014/02/21 01:40:46 | ===================================================
2014/02/21 01:40:46 | "RouterConsole Jetty":
2014/02/21 01:40:46 | 	at com.subgraph.orchid.connections.ConnectionImpl.dashboardRender(ConnectionImpl.java:332)
2014/02/21 01:40:46 | 	- waiting to lock <0x00000000ebc327e0> (a java.util.HashMap)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.dashboard.Dashboard.renderComponent(Dashboard.java:184)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.connections.ConnectionCacheImpl.dashboardRender(ConnectionCacheImpl.java:163)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.dashboard.Dashboard.renderComponent(Dashboard.java:184)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.circuits.CircuitManagerImpl.dashboardRender(CircuitManagerImpl.java:291)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.dashboard.Dashboard.renderComponent(Dashboard.java:184)
2014/02/21 01:40:46 | 	at net.i2p.orchid.OrchidController.renderStatusHTML(OrchidController.java:328)
2014/02/21 01:40:46 | 	- locked <0x00000000ea35d430> (a net.i2p.orchid.OrchidController)
2014/02/21 01:40:46 | 	at net.i2p.orchid.web.OrchidServlet.doGetAndPost(OrchidServlet.java:148)
2014/02/21 01:40:46 | 	at net.i2p.orchid.web.OrchidServlet.doGet(OrchidServlet.java:104)
2014/02/21 01:40:46 | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
2014/02/21 01:40:46 | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.Server.handle(Server.java:370)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
2014/02/21 01:40:46 | 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
2014/02/21 01:40:46 | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2014/02/21 01:40:46 | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2014/02/21 01:40:46 | 	at java.lang.Thread.run(Thread.java:744)
2014/02/21 01:40:46 | "Thread-1131066":
2014/02/21 01:40:46 | 	at com.subgraph.orchid.circuits.CircuitIO.processRelayDataCell(CircuitIO.java:172)
2014/02/21 01:40:46 | 	- waiting to lock <0x00000000ec62df00> (a java.util.HashMap)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.circuits.CircuitIO.deliverRelayCell(CircuitIO.java:143)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.circuits.CircuitImpl.deliverRelayCell(CircuitImpl.java:216)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.connections.ConnectionImpl.processRelayCell(ConnectionImpl.java:285)
2014/02/21 01:40:46 | 	- locked <0x00000000ebc327e0> (a java.util.HashMap)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.connections.ConnectionImpl.processCell(ConnectionImpl.java:255)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.connections.ConnectionImpl.readCellsLoop(ConnectionImpl.java:226)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.connections.ConnectionImpl.access$000(ConnectionImpl.java:44)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.connections.ConnectionImpl$1.run(ConnectionImpl.java:215)
2014/02/21 01:40:46 | 	at java.lang.Thread.run(Thread.java:744)
2014/02/21 01:40:46 | "pool-10770-thread-295":
2014/02/21 01:40:46 | 	at com.subgraph.orchid.connections.ConnectionImpl.removeCircuit(ConnectionImpl.java:321)
2014/02/21 01:40:46 | 	- waiting to lock <0x00000000ebc327e0> (a java.util.HashMap)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.circuits.CircuitIO.closeCircuit(CircuitIO.java:254)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.circuits.CircuitIO.removeStream(CircuitIO.java:301)
2014/02/21 01:40:46 | 	- locked <0x00000000ec62df00> (a java.util.HashMap)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.circuits.CircuitImpl.removeStream(CircuitImpl.java:238)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.circuits.ExitCircuitImpl.openExitStream(ExitCircuitImpl.java:44)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.circuits.OpenExitStreamTask.tryOpenExitStream(OpenExitStreamTask.java:46)
2014/02/21 01:40:46 | 	at com.subgraph.orchid.circuits.OpenExitStreamTask.run(OpenExitStreamTask.java:23)
2014/02/21 01:40:46 | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2014/02/21 01:40:46 | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2014/02/21 01:40:46 | 	at java.lang.Thread.run(Thread.java:744)
2014/02/21 01:40:46 | 
2014/02/21 01:40:46 | Found 1 deadlock.

I have not had a problem with all tunnels going "yellow". I've only had Orchid stop responding.

Last edited 5 years ago by killyourtv (previous) (diff)

comment:9 Changed 5 years ago by zab

  • Cc zab@… added

Fix looks really simple. http://pastethis.i2p/show/6673/

comment:10 Changed 5 years ago by zab

Fixing a few more sync issues: http://pastethis.i2p/show/6674/

comment:11 Changed 5 years ago by zzz

  • Status changed from new to testing

Fix above pushed, plugin 1.0.0-0.4-b1 released.

comment:12 Changed 5 years ago by zzz

  • Milestone set to 0.9.12
  • Resolution set to fixed
  • Status changed from testing to closed

comment:13 Changed 5 years ago by str4d

  • Resolution fixed deleted
  • Status changed from closed to reopened

There's a new deadlock, caused in part by the fix for the previous one:

| Found one Java-level deadlock:
| =============================
| "pool-151-thread-74":
|   waiting to lock monitor 0xd4e6bd6c (object 0xba9a2d10, a java.util.HashSet),
|   which is held by "pool-146-thread-1"
| "pool-146-thread-1":
|   waiting to lock monitor 0xdbb3a83c (object 0xc19e7790, a java.util.HashMap),
|   which is held by "Thread-222"
| "Thread-222":
|   waiting to lock monitor 0xd4e6bd6c (object 0xba9a2d10, a java.util.HashSet),
|   which is held by "pool-146-thread-1"
| 
| Java stack information for the threads listed above:
| ===================================================
| "pool-151-thread-74":
| 	at com.subgraph.orchid.circuits.CircuitManagerImpl.addActiveCircuit(CircuitManagerImpl.java:106)
| 	- waiting to lock <0xba9a2d10> (a java.util.HashSet)
| 	at com.subgraph.orchid.circuits.CircuitImpl.notifyCircuitBuildStart(CircuitImpl.java:137)
| 	at com.subgraph.orchid.circuits.CircuitBuildTask.run(CircuitBuildTask.java:42)
| 	at com.subgraph.orchid.circuits.CircuitManagerImpl.tryOpenCircuit(CircuitManagerImpl.java:392)
| 	at com.subgraph.orchid.circuits.CircuitManagerImpl.openDirectoryCircuit(CircuitManagerImpl.java:245)
| 	at com.subgraph.orchid.directory.downloader.DirectoryDownloaderImpl.openCircuit(DirectoryDownloaderImpl.java:131)
| 	at com.subgraph.orchid.directory.downloader.DirectoryDownloaderImpl.downloadCurrentConsensus(DirectoryDownloaderImpl.java:76)
| 	at com.subgraph.orchid.directory.downloader.DirectoryDownloadTask$DownloadConsensusTask.run(DirectoryDownloadTask.java:178)
| 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
| 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
| 	at java.lang.Thread.run(Thread.java:744)
| "pool-146-thread-1":
| 	at com.subgraph.orchid.circuits.CircuitIO.isMarkedForClose(CircuitIO.java:251)
| 	- waiting to lock <0xc19e7790> (a java.util.HashMap)
| 	at com.subgraph.orchid.circuits.CircuitImpl.isMarkedForClose(CircuitImpl.java:107)
| 	at com.subgraph.orchid.circuits.ExitCircuitImpl.canHandleExitTo(ExitCircuitImpl.java:62)
| 	at com.subgraph.orchid.circuits.CircuitCreationTask$2.filter(CircuitCreationTask.java:187)
| 	at com.subgraph.orchid.circuits.CircuitManagerImpl.getCircuitsByFilter(CircuitManagerImpl.java:137)
| 	- locked <0xba9a2d10> (a java.util.HashSet)
| 	at com.subgraph.orchid.circuits.CircuitCreationTask.countCircuitsSupportingTarget(CircuitCreationTask.java:190)
| 	at com.subgraph.orchid.circuits.CircuitCreationTask.buildCircuitIfNeeded(CircuitCreationTask.java:149)
| 	at com.subgraph.orchid.circuits.CircuitCreationTask.checkCircuitsForCreation(CircuitCreationTask.java:140)
| 	at com.subgraph.orchid.circuits.CircuitCreationTask.run(CircuitCreationTask.java:70)
| 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
| 	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
| 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
| 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
| 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
| 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
| 	at java.lang.Thread.run(Thread.java:744)
| "Thread-222":
| 	at com.subgraph.orchid.circuits.CircuitManagerImpl.removeActiveCircuit(CircuitManagerImpl.java:113)
| 	- waiting to lock <0xba9a2d10> (a java.util.HashSet)
| 	at com.subgraph.orchid.circuits.CircuitImpl.setStateDestroyed(CircuitImpl.java:228)
| 	at com.subgraph.orchid.circuits.CircuitIO.destroyCircuit(CircuitIO.java:285)
| 	- locked <0xc19e7790> (a java.util.HashMap)
| 	at com.subgraph.orchid.circuits.CircuitIO.processDestroyCell(CircuitIO.java:124)
| 	at com.subgraph.orchid.circuits.CircuitIO.deliverControlCell(CircuitIO.java:116)
| 	at com.subgraph.orchid.circuits.CircuitImpl.deliverControlCell(CircuitImpl.java:211)
| 	at com.subgraph.orchid.connections.ConnectionImpl.processControlCell(ConnectionImpl.java:293)
| 	- locked <0xbd5d8fb0> (a java.util.HashMap)
| 	at com.subgraph.orchid.connections.ConnectionImpl.processCell(ConnectionImpl.java:270)
| 	at com.subgraph.orchid.connections.ConnectionImpl.readCellsLoop(ConnectionImpl.java:226)
| 	at com.subgraph.orchid.connections.ConnectionImpl.access$000(ConnectionImpl.java:44)
| 	at com.subgraph.orchid.connections.ConnectionImpl$1.run(ConnectionImpl.java:215)
| 	at java.lang.Thread.run(Thread.java:744)
| 
| Found 1 deadlock.

comment:14 Changed 5 years ago by str4d

I think this is the fix, please comment: http://pastethis.i2p/show/6887/

comment:15 Changed 5 years ago by zzz

I defer to zab

comment:16 Changed 5 years ago by zab

Replying to str4d:

I think this is the fix, please comment: http://pastethis.i2p/show/6887/

This change will avoid the deadlock, however I'm not sure if it is safe to call these methods outside of a monitor. This is something the Orchid author Bruce Leidl - @bleidl on twitter - should take a look at.

comment:18 Changed 4 years ago by str4d

bitcoinj have fixed the deadlock in a different way:
https://github.com/bitcoinj/bitcoinj/pull/185/files#diff-67603e95d69927fc6117d1253dcc9dbfR152

They have also found another similar deadlock:
https://github.com/subgraph/Orchid/pull/10#issuecomment-53165965

They have moved to using com.google.common.util.concurrent.CycleDetectingLockFactory from guava. Is this a dependency we can add to our Orchid plugin? If so, I will port their fixes to the pull request above (for the benefit of all), and check them in.

comment:19 Changed 4 years ago by zzz

Guava's been suggested in the distant past for other stuff in the router. IIRC it's pretty big and difficult to pull out just a small part as it's all interconnected. We never found a good reason to pull it in.

For a plugin, most of those objections go away. Unless it's still on a roadmap to eventually ship Orchid for everybody.

If it's possible to just grab a few classes out of Guava I have zero objections. If that's too hard and we need to ship all of Guava, I guess I have objections in theory. But in practice I don't really care that much and/or don't have the time to maintain Orchid or keep up with what bitcoinj is doing. I guess I got discouraged that Orchid turned out to be a one-off with lots of bugs that did not get maintained by Bruce. So if you're doing the work you get to do it how you want. If bitcoinj is maintaining it then the easiest thing by far is to take there fixes as-is and bundle whatever libs they have selected and we need to to make it work.

comment:20 Changed 4 years ago by str4d

  • Keywords Orchid added

comment:21 Changed 4 years ago by str4d

  • Keywords hang added

comment:22 Changed 2 years ago by zzz

  • Milestone set to 0.9.27
  • Resolution set to fixed
  • Status changed from reopened to closed

bitcoinj changes merged in (from patch by thebland), and then Guava dependencies backed out, in unreleased version 1.2.1-0.1; released version will be 1.2.2-0.1, expected today.

See http://zzz.i2p/topics/2031 for details

Note: See TracTickets for help on using tickets.