Opened 21 months ago

Last modified 21 months ago

#1990 accepted defect

stack trace on running a torrent while hashing...

Reported by: echelon Owned by: zzz
Priority: minor Milestone: 0.9.31
Component: apps/i2psnark Version: 0.9.30
Keywords: Cc:
Parent Tickets:

Description

I added a new torrent to i2psnark. It is still on stop, it hashes the storage.
While it allocates the storage, I click on run and I get this stack trace:

Problem accessing /i2psnark/_post. Reason:

Server Error

Caused by:

java.lang.RuntimeException?: Could not reopen storage: java.io.IOException: Storage not checked yet

at org.klomp.snark.Snark.fatal(Snark.java:1185)
at org.klomp.snark.Snark.x_startTorrent(Snark.java:602)
at org.klomp.snark.Snark.startTorrent(Snark.java:547)
at org.klomp.snark.SnarkManager?.startTorrent(SnarkManager?.java:2571)
at org.klomp.snark.SnarkManager?.startTorrent(SnarkManager?.java:2550)
at org.klomp.snark.web.I2PSnarkServlet.processRequest(I2PSnarkServlet.java:1029)
at org.klomp.snark.web.I2PSnarkServlet.doGetAndPost(I2PSnarkServlet.java:260)
at org.klomp.snark.web.I2PSnarkServlet.doPost(I2PSnarkServlet.java:154)
at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:707)
at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:790)
at org.eclipse.jetty.servlet.ServletHolder?.handle(ServletHolder?.java:812)
at org.eclipse.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1669)
at net.i2p.servlet.filters.XSSFilter.doFilter(XSSFilter.java:28)
at org.eclipse.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1652)
at org.eclipse.jetty.servlet.ServletHandler?.doHandle(ServletHandler?.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler?.handle(ScopedHandler?.java:143)
at org.eclipse.jetty.security.SecurityHandler?.handle(SecurityHandler?.java:577)
at org.eclipse.jetty.server.session.SessionHandler?.doHandle(SessionHandler?.java:223)
at org.eclipse.jetty.server.handler.ContextHandler?.doHandle(ContextHandler?.java:1127)
at org.eclipse.jetty.servlet.ServletHandler?.doScope(ServletHandler?.java:515)
at org.eclipse.jetty.server.session.SessionHandler?.doScope(SessionHandler?.java:185)
at org.eclipse.jetty.server.handler.ContextHandler?.doScope(ContextHandler?.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler?.handle(ScopedHandler?.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection?.handle(ContextHandlerCollection?.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection?.handle(HandlerCollection?.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper?.handle(HandlerWrapper?.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel?.handle(HttpChannel?.java:311)
at org.eclipse.jetty.server.HttpConnection?.onFillable(HttpConnection?.java:258)
at org.eclipse.jetty.io.AbstractConnection?$2.run(AbstractConnection?.java:544)
at org.eclipse.jetty.util.thread.QueuedThreadPool?.runJob(QueuedThreadPool?.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool?$3.run(QueuedThreadPool?.java:555)
at java.lang.Thread.run(Thread.java:745)

Caused by: java.io.IOException: Storage not checked yet

at org.klomp.snark.Storage.reopen(Storage.java:711)
at org.klomp.snark.Snark.x_startTorrent(Snark.java:597)
... 31 more

Caused by:

java.io.IOException: Storage not checked yet

at org.klomp.snark.Storage.reopen(Storage.java:711)
at org.klomp.snark.Snark.x_startTorrent(Snark.java:597)
at org.klomp.snark.Snark.startTorrent(Snark.java:547)
at org.klomp.snark.SnarkManager?.startTorrent(SnarkManager?.java:2571)
at org.klomp.snark.SnarkManager?.startTorrent(SnarkManager?.java:2550)
at org.klomp.snark.web.I2PSnarkServlet.processRequest(I2PSnarkServlet.java:1029)
at org.klomp.snark.web.I2PSnarkServlet.doGetAndPost(I2PSnarkServlet.java:260)
at org.klomp.snark.web.I2PSnarkServlet.doPost(I2PSnarkServlet.java:154)
at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:707)
at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:790)
at org.eclipse.jetty.servlet.ServletHolder?.handle(ServletHolder?.java:812)
at org.eclipse.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1669)
at net.i2p.servlet.filters.XSSFilter.doFilter(XSSFilter.java:28)
at org.eclipse.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1652)
at org.eclipse.jetty.servlet.ServletHandler?.doHandle(ServletHandler?.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler?.handle(ScopedHandler?.java:143)
at org.eclipse.jetty.security.SecurityHandler?.handle(SecurityHandler?.java:577)
at org.eclipse.jetty.server.session.SessionHandler?.doHandle(SessionHandler?.java:223)
at org.eclipse.jetty.server.handler.ContextHandler?.doHandle(ContextHandler?.java:1127)
at org.eclipse.jetty.servlet.ServletHandler?.doScope(ServletHandler?.java:515)
at org.eclipse.jetty.server.session.SessionHandler?.doScope(SessionHandler?.java:185)
at org.eclipse.jetty.server.handler.ContextHandler?.doScope(ContextHandler?.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler?.handle(ScopedHandler?.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection?.handle(ContextHandlerCollection?.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection?.handle(HandlerCollection?.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper?.handle(HandlerWrapper?.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel?.handle(HttpChannel?.java:311)
at org.eclipse.jetty.server.HttpConnection?.onFillable(HttpConnection?.java:258)
at org.eclipse.jetty.io.AbstractConnection?$2.run(AbstractConnection?.java:544)
at org.eclipse.jetty.util.thread.QueuedThreadPool?.runJob(QueuedThreadPool?.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool?$3.run(QueuedThreadPool?.java:555)
at java.lang.Thread.run(Thread.java:745)

Subtickets (add)

Change History (5)

comment:1 Changed 21 months ago by echelon

  • Resolution set to not a bug
  • Status changed from new to closed

Oh, it is a permission denied in another form...
sorry...

comment:2 Changed 21 months ago by zzz

  • Resolution not a bug deleted
  • Status changed from closed to reopened

I'm going to reopen this, as the error message isn't very good, so let's fix that. The issue is with adding a magnet when you don't have write permissions for the snark directory?

comment:3 Changed 21 months ago by echelon

Correct. Copy a magnet link into "torrent" box, snark tries to fetch it, shows in the list of torrents, but as stopped. On clicking start, the error appears.

comment:4 Changed 21 months ago by zzz

  • Status changed from reopened to accepted

OK thanks, should be able to reproduce it from that.

comment:5 Changed 21 months ago by zzz

Partial fix in 098e31ae6c0969990791077264bfd58d8ac3680c to be 0.9.30-4

  • Prevent add/create/delete/remove from UI if r/o i2psnark dir
  • Null out storage field on failure, so there won't be a reopen that throws an IOE

If there is an IOE on storage creation (other than a r/o snark dir), the Snark object will still be in an inconsistent state and can't be successfully restarted. That's still todo. Leaving ticket open for that.

Note: See TracTickets for help on using tickets.