"SEVERE: input future failed" spams stdout/stderr
See original GitHub issueHello,
if one future fails in a combined future a large message with stacktrace is spit out via java.util.logging. This is inconvenient.
Aug 17, 2015 7:12:44 PM com.google.common.util.concurrent.Futures$CombinedFuture setExceptionAndMaybeLog
SEVERE: input future failed
We know of lots cases where this behaviour cannot or shuold not be avoided (for instance, jobs failing because of timeouts).
The exception is propagated and handled correctly by the combined future so we have other means to find out what’s wrong and handle the case gracefully (it has to be done anyway).
I can think of a few workarounds, which may even need to be applied in grops, which are equally pesky:
- Working it around by java.util.logging at the system level is not practical as it requires manual changes at the OS/environment level.
- Working it around by java.util.logging programmatically is very inconvenient because it needs to be done before starting each test, or requires all test to be derived from a common “wrapper”.
- Working it around by java.util.logging via command line is also very inconvenient because it needs to be done for each test execution environment (either surefire or Eclipse JUnit runner).
- Working it around at the code level by wrapping the input futures with a fallback (or similar) for the known cases requires lots of coding. Also breaks the downstream error handling.
- Working it around by bridging JUL to Slf4j tanks performance.
Can this be avoided? Forking and rebuilding from source just to comment out a logging line is a bit overkill.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:13 (7 by maintainers)
Top Results From Across the Web
unable handle exception from future failure - Stack Overflow
My understanding was if either of the future fails, f would be a failed future. However, when callfuture1 throws an exception. f.onFailure is ......
Read more >100 messages from Google Code
Re: Issue 532918 in chromium: Failed to reserve I420 output buffer spammed when receiving page in a WebRTC call is nuked. Re: Issue...
Read more >notes-1.10.10.txt - Panda3D
GLSL inputs * Fix ability to use deployment system when compiling without ... a task that is awaiting a non-Panda future * Optimize...
Read more >Bug listing with status RESOLVED with resolution UPSTREAM ...
status:RESOLVED resolution:UPSTREAM severity:normal ... Bug:40387 - "No keyboard or mouse after the first "enter" during the Gentoo linux install.
Read more >History - Collection of Repositories - Python.org
Issue #1688: On Windows, the input() prompt was not correctly displayed if it ... It once again reports a syntax error if a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
(Some discussion about this in internal CL 246139348, including my theorizing that it might be nice to log exception only if they’re of a different class than the original.)
In practice the second case will almost always be true if more than one Future fails. The Exceptions are collected in a ConcurrentHashSet. The problem is that almost no Exception implements equals() and hashCode() and it is highly unlikely that multiple threads throw the same instance of an Exception.
My log gets spammed with SEVERE messages because Futures.allAsList(…).cancel(true) gets called and most of my interrupted threads throw InterruptedExceptions (by design). Guava thinks one InterruptedException is different from the other, resulting in log spam.