Opened 7 years ago

Closed 4 years ago

#641 closed enhancement (fixed)

IOException: File does not exist (self-caused)

Reported by: DISABLED Owned by: zzz
Priority: minor Milestone: 0.9.16
Component: apps/i2psnark Version: 0.9
Keywords: Cc:
Parent Tickets: Sensitive: no

Description

HTTP ERROR 500

Problem accessing /i2psnark/_post. Reason:

Could not reopen storage: java.io.IOException: File does not exist: /home/opt/i2p/snark-torrent/placeholder

Caused by:

java.lang.RuntimeException?: Could not reopen storage: java.io.IOException: File does not exist: /home/opt/i2p/snark-torrent/placeholder

at org.klomp.snark.Snark.fatal(Snark.java:1038)
at org.klomp.snark.Snark.startTorrent(Snark.java:563)
at org.klomp.snark.web.I2PSnarkServlet.processRequest(I2PSnarkServlet.java:586)
at org.klomp.snark.web.I2PSnarkServlet.service(I2PSnarkServlet.java:198)
at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:717)
at org.mortbay.jetty.servlet.ServletHolder?.handle(ServletHolder?.java:511)
at org.mortbay.jetty.servlet.ServletHandler?.handle(ServletHandler?.java:401)
at org.mortbay.jetty.security.SecurityHandler?.handle(SecurityHandler?.java:216)
at org.mortbay.jetty.servlet.SessionHandler?.handle(SessionHandler?.java:182)
at org.mortbay.jetty.handler.ContextHandler?.handle(ContextHandler?.java:766)
at org.mortbay.jetty.webapp.WebAppContext?.handle(WebAppContext?.java:450)
at org.mortbay.jetty.handler.ContextHandlerCollection?.handle(ContextHandlerCollection?.java:230)
at org.mortbay.jetty.handler.HandlerCollection?.handle(HandlerCollection?.java:114)
at org.mortbay.jetty.handler.HandlerWrapper?.handle(HandlerWrapper?.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection?.handleRequest(HttpConnection?.java:542)
at org.mortbay.jetty.HttpConnection?$RequestHandler?.content(HttpConnection?.java:945)
at org.mortbay.jetty.HttpParser?.parseNext(HttpParser?.java:756)
at org.mortbay.jetty.HttpParser?.parseAvailable(HttpParser?.java:218)
at org.mortbay.jetty.HttpConnection?.handle(HttpConnection?.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint?.run(SelectChannelEndPoint?.java:410)
at java.util.concurrent.ThreadPoolExecutor?$Worker.runTask(ThreadPoolExecutor?.java:886)
at java.util.concurrent.ThreadPoolExecutor?$Worker.run(ThreadPoolExecutor?.java:908)
at java.lang.Thread.run(Thread.java:662)

Caused by: java.io.IOException: File does not exist: /home/opt/i2p/snark-torrent/placeholder

at org.klomp.snark.Storage.reopen(Storage.java:565)
at org.klomp.snark.Snark.startTorrent(Snark.java:558)
… 22 more

Caused by:

java.io.IOException: File does not exist: /home/opt/i2p/snark-torrent/placeholder

at org.klomp.snark.Storage.reopen(Storage.java:565)
at org.klomp.snark.Snark.startTorrent(Snark.java:558)
at org.klomp.snark.web.I2PSnarkServlet.processRequest(I2PSnarkServlet.java:586)
at org.klomp.snark.web.I2PSnarkServlet.service(I2PSnarkServlet.java:198)
at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:717)
at org.mortbay.jetty.servlet.ServletHolder?.handle(ServletHolder?.java:511)
at org.mortbay.jetty.servlet.ServletHandler?.handle(ServletHandler?.java:401)
at org.mortbay.jetty.security.SecurityHandler?.handle(SecurityHandler?.java:216)
at org.mortbay.jetty.servlet.SessionHandler?.handle(SessionHandler?.java:182)
at org.mortbay.jetty.handler.ContextHandler?.handle(ContextHandler?.java:766)
at org.mortbay.jetty.webapp.WebAppContext?.handle(WebAppContext?.java:450)
at org.mortbay.jetty.handler.ContextHandlerCollection?.handle(ContextHandlerCollection?.java:230)
at org.mortbay.jetty.handler.HandlerCollection?.handle(HandlerCollection?.java:114)
at org.mortbay.jetty.handler.HandlerWrapper?.handle(HandlerWrapper?.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection?.handleRequest(HttpConnection?.java:542)
at org.mortbay.jetty.HttpConnection?$RequestHandler?.content(HttpConnection?.java:945)
at org.mortbay.jetty.HttpParser?.parseNext(HttpParser?.java:756)
at org.mortbay.jetty.HttpParser?.parseAvailable(HttpParser?.java:218)
at org.mortbay.jetty.HttpConnection?.handle(HttpConnection?.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint?.run(SelectChannelEndPoint?.java:410)
at java.util.concurrent.ThreadPoolExecutor?$Worker.runTask(ThreadPoolExecutor?.java:886)
at java.util.concurrent.ThreadPoolExecutor?$Worker.run(ThreadPoolExecutor?.java:908)
at java.lang.Thread.run(Thread.java:662)

How did that happen:

1) Torrent is loaded, a total of 6 GB size.
2) Snark populates all files with garbage (ballooning).
3) Priority changed by hand. Need only one file (1.4 GB) totaling fourteen.
4) Unnecessary files (4.6 GB) from the hard disk.
5) After some time (loded 405 MB), Snark breaks off with the loading error message. Restart impossible.
6) Any missing file using "touch" restored.
7) Snark claims, recovered files are now "complete" with "0 bytes" and continue the download.

Wish:

Prevent ballooning.

One more request:

An additional switch, with which all files at once can be selected or deselected (compare rtorrent).

I hope you understand my concern.
–Kleiber


Original (translation de-en by $automat):

Wie das passiert ist:

1) Torrent geladen, Größe insgesamt 6 GB.
2) Snark füllt sämtliche Dateien mit Müll auf.
3) Priorität von Hand geändert. Brauche nur eine Datei (1,4 GB) von insgesamt vierzehn.
4) Überflüssige Dateien (4,6 GB) von der Festplatte gelöscht.
5) Nach einiger Zeit (405 MB geladen) bricht Snark das Laden mit Fehlermeldung ab. Neustart unmöglich.
6) Jede fehlende Datei mittels "touch" wiederhergestellt.
7) Snark behauptet, wiederhergestellte Dateien sind "Complete" mit "0 Byte" und setzt den Download fort.

Wunsch:

Die Dateien anfangs nicht Aufpusten lassen.

Noch ein Wunsch:

Ein zusätzlicher Schalter, mit dem alle Dateien auf einmal an- oder abgewählt werden können (vergleiche rtorrent).

Ich hoffe, Sie verstehen mein Anliegen.

Subtickets

Change History (6)

comment:1 Changed 7 years ago by zzz

Milestone: 0.9.3
Status: newaccepted

yes. This is a partial dup of #447. Need to do better.

comment:2 Changed 7 years ago by zzz

Milestone: 0.9.30.9.1

The "ballooning", of course, is to prevent massive disk fragmentation.

I'm going to create them as sparse files (so ls -l shows the normal length but du will show 0), and then 'balloon' non-skipped files at the first write.

The skipped files must still exist (they can't be removed) because I have to store the piece fragments at the beginning and end of the skipped file. But now there is no need to remove them since they don't take up any disk space (except for the fragments).

We could, of course, store the piece fragments in some hidden file like .piece952, but that's a lot harder to implement.

comment:3 Changed 7 years ago by zzz

Deferred ballooning implemented in 0.9-3.

As explained above, you still can't remove the skipped files.

Leaving for the select/deselect button idea.

comment:4 Changed 6 years ago by str4d

Milestone: 0.9.1

comment:5 Changed 4 years ago by user

I tihnk this can be closed.
As I understand it, this button is meant to skip all or undo the skip all.
This is already in place (skip all, all normal, all high).

comment:6 Changed 4 years ago by zzz

Milestone: 0.9.16
Resolution: fixed
Status: acceptedclosed

Agreed, comment 3 says this ticket was left open only for the buttons. Added in 0.9.16 see #1376

Note: See TracTickets for help on using tickets.