Opened 4 years ago

Closed 4 years ago

#1575 closed defect (fixed)

I2PSnark: Specified data dir resets to default after first failure if torrent link is specified at "From URL:" and does not clean up in specified data dir

Reported by: djjeshk Owned by: zzz
Priority: minor Milestone: 0.9.23
Component: apps/i2psnark Version: 0.9.19
Keywords: Cc:
Parent Tickets:

Description

I2P version: 0.9.19-20-rc
Java version: Oracle Corporation 1.8.0_45 (Java(TM) SE Runtime Environment 1.8.0_45-b15)
Wrapper version: 3.5.25
Server version: 8.1.17.v20150415
Servlet version: Jasper JSP 2.1 Engine
Platform: Windows 7 x86 6.1
Processor: Core 2 (45nm) (core2)
Jbigi: Locally optimized library jbigi-windows-core2.dll loaded from file
Encoding: Cp1257
Charset: windows-1257

Requirements to reproduce error:

  1. Data storage (drive) at which default data directory does not points
  2. Large torrent file that contains at least of two files hosted at website (you will need to specify link at "From URL:"), these files should fit in that drive.
  3. Ability to occupy that drive free space in way that first file from torrent fits in free space, but whole torrent content not.

Steps to reproduce:

  1. Occupy free space as mentioned in Requirement 3.
  2. Specify link at "From URL:" and directory that points to drive at which default data directory does not points at "Data dir:" (Requirement 2), and click "Add torrent".

Once torrent file is downloaded, similar messages should appear at logs:

15.12.5 19:23:15 ERROR [k DirMonitor] org.klomp.snark.Snark         : Could not check or create storage
java.io.IOException: There is not enough space on the disk
	at java.io.RandomAccessFile.setLength(Native Method)
	at org.klomp.snark.Storage$TorrentFile.allocateFile(Storage.java:1311)
	at org.klomp.snark.Storage.allocateFile(Storage.java:937)
	at org.klomp.snark.Storage.locked_checkCreateFiles(Storage.java:839)
	at org.klomp.snark.Storage.checkCreateFiles(Storage.java:802)
	at org.klomp.snark.Storage.check(Storage.java:600)
	at org.klomp.snark.Snark.<init>(Snark.java:439)
	at org.klomp.snark.SnarkManager.addTorrent(SnarkManager.java:1247)
	at org.klomp.snark.SnarkManager.addTorrent(SnarkManager.java:1149)
	at org.klomp.snark.SnarkManager.monitorTorrents(SnarkManager.java:2115)
	at org.klomp.snark.SnarkManager.access$1200(SnarkManager.java:51)
	at org.klomp.snark.SnarkManager$DirMonitor.run(SnarkManager.java:1939)
	at java.lang.Thread.run(Unknown Source)
	at net.i2p.util.I2PThread.run(I2PThread.java:107)
15.12.5 19:23:15 ERROR [k DirMonitor] org.klomp.snark.SnarkManager  : Unable to add the torrent C:\x\x.torrent
java.lang.RuntimeException: Could not check or create storage: java.io.IOException: There is not enough space on the disk
	at org.klomp.snark.Snark.fatal(Snark.java:1128)
	at org.klomp.snark.Snark.<init>(Snark.java:453)
	at org.klomp.snark.SnarkManager.addTorrent(SnarkManager.java:1247)
	at org.klomp.snark.SnarkManager.addTorrent(SnarkManager.java:1149)
	at org.klomp.snark.SnarkManager.monitorTorrents(SnarkManager.java:2115)
	at org.klomp.snark.SnarkManager.access$1200(SnarkManager.java:51)
	at org.klomp.snark.SnarkManager$DirMonitor.run(SnarkManager.java:1939)
	at java.lang.Thread.run(Unknown Source)
	at net.i2p.util.I2PThread.run(I2PThread.java:107)
Caused by: java.io.IOException: There is not enough space on the disk
	at java.io.RandomAccessFile.setLength(Native Method)
	at org.klomp.snark.Storage$TorrentFile.allocateFile(Storage.java:1311)
	at org.klomp.snark.Storage.allocateFile(Storage.java:937)
	at org.klomp.snark.Storage.locked_checkCreateFiles(Storage.java:839)
	at org.klomp.snark.Storage.checkCreateFiles(Storage.java:802)
	at org.klomp.snark.Storage.check(Storage.java:600)
	at org.klomp.snark.Snark.<init>(Snark.java:439)
	... 7 more

If storage at which default data directory points is large enough to fit whole torrent contents, after minute torrent starts normally without errors. If that storage is not large enough, errors continue to appear.

  1. If torrent started normally, go to next step, else undo step 1.

Errors will continue to appear. If all above is true, I2PSnark lost specified data dir.

  1. Check data directory which you specified at step 2. If it contains files from torrent, I2PSnark did not cleared them up.

Subtickets

Change History (1)

comment:1 Changed 4 years ago by zzz

  • Milestone changed from undecided to 0.9.23
  • Resolution set to fixed
  • Status changed from new to closed

I think this is the same as #1658 -- see that ticket for resolution.

Note: See TracTickets for help on using tickets.