Opened 4 years ago

Closed 4 years ago

#19830 closed defect (fixed)

Check if recent directory exists before checking available space

Reported by: karsten Owned by: iwakeh
Priority: Medium Milestone: CollecTor 1.0.0
Component: Metrics/CollecTor Version:
Severity: Normal Keywords:
Cc: iwakeh Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Today this exception was thrown at me by a fresh CollecTor instance:

2016-08-04 12:28:16,067 WARN o.t.c.c.CollecTorMain:75 Cannot access out/recent; reason: out/recent
java.nio.file.NoSuchFileException: out/recent
	at sun.nio.fs.UnixException.translateToIOException( ~[na:1.8.0_102]
	at sun.nio.fs.UnixException.rethrowAsIOException( ~[na:1.8.0_102]
	at sun.nio.fs.UnixException.rethrowAsIOException( ~[na:1.8.0_102]
	at sun.nio.fs.UnixFileStore.devFor( ~[na:1.8.0_102]
	at sun.nio.fs.UnixFileStore.<init>( ~[na:1.8.0_102]
	at sun.nio.fs.BsdFileStore.<init>( ~[na:1.8.0_102]
	at sun.nio.fs.BsdFileSystemProvider.getFileStore( ~[na:1.8.0_102]
	at sun.nio.fs.BsdFileSystemProvider.getFileStore( ~[na:1.8.0_102]
	at sun.nio.fs.UnixFileSystemProvider.getFileStore( ~[na:1.8.0_102]
	at java.nio.file.Files.getFileStore( ~[na:1.8.0_102]
	at org.torproject.collector.cron.CollecTorMain.checkAvailableSpace( [collector-0.9.0-dev.jar:0.9.0-dev-f2d0cf0]
	at org.torproject.collector.relaydescs.ArchiveWriter.startProcessing( [collector-0.9.0-dev.jar:0.9.0-dev-f2d0cf0]
	at [collector-0.9.0-dev.jar:0.9.0-dev-f2d0cf0]
	at java.util.concurrent.Executors$ [na:1.8.0_102]
	at java.util.concurrent.FutureTask.runAndReset( [na:1.8.0_102]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301( [na:1.8.0_102]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ [na:1.8.0_102]
	at java.util.concurrent.ThreadPoolExecutor.runWorker( [na:1.8.0_102]
	at java.util.concurrent.ThreadPoolExecutor$ [na:1.8.0_102]
	at [na:1.8.0_102]

Looks like a trivial bug in #18865.

Child Tickets

Change History (4)

comment:1 Changed 4 years ago by iwakeh

Owner: set to iwakeh
Status: newaccepted

Yes, that should be checked. Good catch!

comment:2 Changed 4 years ago by iwakeh

Status: acceptedneeds_review

Please review my branch.

Now check the root of given path. That should always exist and be accessible. Any IOException here is a major problem and escalated via RuntimeException.

Added test for the problem and added some necessary test permissions.

comment:3 Changed 4 years ago by iwakeh

Priority: LowMedium

Increasing priority, so this floats near the top of the stack of reviews.

comment:4 Changed 4 years ago by karsten

Resolution: fixed
Status: needs_reviewclosed

Looks good, merged. Thanks! Closing.

Note: See TracTickets for help on using tickets.