Skip to content
This repository has been archived by the owner on Mar 21, 2021. It is now read-only.

LinuxPidEnumerator throws if process is killed during enumeration #7

Open
cxcorp opened this issue Feb 13, 2017 · 1 comment
Open
Labels

Comments

@cxcorp
Copy link
Owner

cxcorp commented Feb 13, 2017

Exception in thread "main" java.io.UncheckedIOException: java.nio.file.NoSuchFileException: /proc/31572
	at java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:88)
	at java.nio.file.FileTreeIterator.hasNext(FileTreeIterator.java:104)
	at java.util.Iterator.forEachRemaining(Iterator.java:115)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
	at cx.corp.lacuna.core.linux.LinuxPidEnumerator.getPids(LinuxPidEnumerator.java:38)
	at cx.corp.lacuna.core.NativeProcessEnumeratorImpl.getProcesses(NativeProcessEnumeratorImpl.java:24)
	at cx.corp.lacuna.Main.main(Main.java:58)
Caused by: java.nio.file.NoSuchFileException: /proc/31572
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
	at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
	at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
	at java.nio.file.Files.readAttributes(Files.java:1737)
	at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
	at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
	at java.nio.file.FileTreeWalker.next(FileTreeWalker.java:372)
	at java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:84)
	... 11 more
@cxcorp cxcorp added the bug label Feb 13, 2017
@cxcorp
Copy link
Owner Author

cxcorp commented Feb 13, 2017

Files.walk is broken http://stackoverflow.com/a/22868706/996081

@cxcorp cxcorp added this to the v0.3.0 - Final course return milestone Feb 28, 2017
@cxcorp cxcorp removed this from the v0.3.0 - Final course return milestone Dec 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant