Opened 5 years ago

Closed 5 years ago

#1407 closed defect (fixed)

I2PSnark Gives HTTP ERROR 500 When Deleting a Torrent Whose Content is Missing

Reported by: somewon Owned by: zzz
Priority: minor Milestone: 0.9.17
Component: apps/i2psnark Version: 0.9.16
Keywords: Cc:
Parent Tickets:

Description

To reproduce:

  1. Start a torrent with I2PSnark. Allow it to download a portion of the torrent's contents.
  1. Click the "Stop" icon in I2PSnark for that torrent.
  1. With an external file manager or terminal, move the torrent contents (but not the torrent file) to a different location.
  1. Return to I2PSnark, click the "X" (Delete) icon for that torrent.
  1. I2PSnark immediately directs you to an error page similar to the following:

HTTP ERROR 500

Problem accessing /i2psnark/_post. Reason:

Server Error

Caused by:

java.lang.NullPointerException?

at org.klomp.snark.web.I2PSnarkServlet.processRequest(I2PSnarkServlet.java:1045)
at org.klomp.snark.web.I2PSnarkServlet.doGetAndPost(I2PSnarkServlet.java:253)
at org.klomp.snark.web.I2PSnarkServlet.doPost(I2PSnarkServlet.java:150)
at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:755)
at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:848)
at org.eclipse.jetty.servlet.ServletHolder?.handle(ServletHolder?.java:684)
at org.eclipse.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1496)
at net.i2p.servlet.filters.XSSFilter.doFilter(XSSFilter.java:28)
at org.eclipse.jetty.servlet.ServletHandler?$CachedChain?.doFilter(ServletHandler?.java:1476)
at org.eclipse.jetty.servlet.ServletHandler?.doHandle(ServletHandler?.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler?.handle(ScopedHandler?.java:137)
at org.eclipse.jetty.security.SecurityHandler?.handle(SecurityHandler?.java:557)
at org.eclipse.jetty.server.session.SessionHandler?.doHandle(SessionHandler?.java:231)
at org.eclipse.jetty.server.handler.ContextHandler?.doHandle(ContextHandler?.java:1086)
at org.eclipse.jetty.servlet.ServletHandler?.doScope(ServletHandler?.java:428)
at org.eclipse.jetty.server.session.SessionHandler?.doScope(SessionHandler?.java:193)
at org.eclipse.jetty.server.handler.ContextHandler?.doScope(ContextHandler?.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler?.handle(ScopedHandler?.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection?.handle(ContextHandlerCollection?.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection?.handle(HandlerCollection?.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper?.handle(HandlerWrapper?.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection?.handleRequest(AbstractHttpConnection?.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection?.content(AbstractHttpConnection?.java:982)
at org.eclipse.jetty.server.AbstractHttpConnection?$RequestHandler?.content(AbstractHttpConnection?.java:1043)
at org.eclipse.jetty.http.HttpParser?.parseNext(HttpParser?.java:865)
at org.eclipse.jetty.http.HttpParser?.parseAvailable(HttpParser?.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection?.handle(AsyncHttpConnection?.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint?.handle(SelectChannelEndPoint?.java:667)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint?$1.run(SelectChannelEndPoint?.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool?.runJob(QueuedThreadPool?.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool?$3.run(QueuedThreadPool?.java:543)
at java.lang.Thread.run(Thread.java:745)

Powered by Jetty://

I2PSnark's own log (at the top of the interface) shows (in reverse order, pasted as displayed):

Data file could not be deleted: /home/i2puser/.i2p/i2psnark/torrent_name/torrent_data2of2.dat
Data file could not be deleted: /home/i2puser/.i2p/i2psnark/torrent_name/torrent_data1of2.dat
Torrent file deleted: /home/i2puser/.i2p/i2psnark/torrent_name.torrent
Torrent stopped: "torrent_name"

I do not know if it reproduces if the torrent contents aren't contained in a directory.

Much love to all the devs, your work is really appreciated!

Subtickets

Change History (2)

comment:1 Changed 5 years ago by somewon

I should add that it also occurs if the torrent is completed (seeding). Also that I2PSnark seems to recover just fine from the error and operates properly after reloading its interface, with the torrent removed from its list.

comment:2 Changed 5 years ago by zzz

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in e24b22633c8bfd6817619f8fbd9064db9d57fb17 branch i2p.i2p.zzz.test2 to be propped for 0.9.17

Note: See TracTickets for help on using tickets.