[
https://issues.apache.org/jira/browse/BOOKKEEPER-838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14330081#comment-14330081
]
Hadoop QA commented on BOOKKEEPER-838:
--------------------------------------
Testing JIRA BOOKKEEPER-838
Patch
[BOOKKEEPER-838.patch|https://issues.apache.org/jira/secure/attachment/12700006/BOOKKEEPER-838.patch]
downloaded at Sat Feb 21 07:54:53 UTC 2015
----------------------------
{color:green}+1 PATCH_APPLIES{color}
{color:green}+1 CLEAN{color}
{color:red}-1 RAW_PATCH_ANALYSIS{color}
. {color:green}+1{color} the patch does not introduce any @author tags
. {color:green}+1{color} the patch does not introduce any tabs
. {color:green}+1{color} the patch does not introduce any trailing spaces
. {color:green}+1{color} the patch does not introduce any line longer than
120
. {color:red}-1{color} the patch does not add/modify any testcase
{color:green}+1 RAT{color}
. {color:green}+1{color} the patch does not seem to introduce new RAT
warnings
{color:green}+1 JAVADOC{color}
. {color:green}+1{color} the patch does not seem to introduce new Javadoc
warnings
{color:green}+1 COMPILE{color}
. {color:green}+1{color} HEAD compiles
. {color:green}+1{color} patch compiles
. {color:green}+1{color} the patch does not seem to introduce new javac
warnings
{color:green}+1 FINDBUGS{color}
. {color:green}+1{color} the patch does not seem to introduce new Findbugs
warnings
{color:green}+1 TESTS{color}
. Tests run: 949
{color:green}+1 DISTRO{color}
. {color:green}+1{color} distro tarball builds with the patch
----------------------------
{color:red}*-1 Overall result, please check the reported -1(s)*{color}
The full output of the test-patch run is available at
. https://builds.apache.org/job/bookkeeper-trunk-precommit-build/899/
> ForceWriteThread::run() leaks “logFile.close()” when interrupt comes
> --------------------------------------------------------------------
>
> Key: BOOKKEEPER-838
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-838
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-server
> Reporter: Jia Zhai
> Assignee: Jia Zhai
> Attachments: BOOKKEEPER-838.patch
>
>
> According to Ivan’s email, I did a check of the build history. Seems recently
> failing is with this stack:
> java.io.IOException: Unable to delete directory
> /tmp/bkTest3561939033223584760.dir/current/0.
> at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1337)
> at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1910)
> at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1399)
> at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1331)
> at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1910)
> at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1399)
> at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1331)
> at
> org.apache.bookkeeper.test.BookKeeperClusterTestCase.cleanupTempDirs(BookKeeperClusterTestCase.java:186)
> at
> org.apache.bookkeeper.test.BookKeeperClusterTestCase.tearDown(BookKeeperClusterTestCase.java:114)
> This may be caused by an error in ForceWriteThread::run(), which leaked
> “logFile.close()” when interrupt comes.
> {code}
> private class ForceWriteThread {
> public void run() {
> LOG.info("ForceWrite Thread started");
> boolean shouldForceWrite = true;
> int numReqInLastForceWrite = 0;
> while(running) {
> ForceWriteRequest req = null;
> try {
> …
> } catch (IOException ioe) {
> LOG.error("I/O exception in ForceWrite thread", ioe);
> running = false;
> } catch (InterruptedException e) {
> LOG.error("ForceWrite thread interrupted", e);
> if (null != req) {
> req.closeFileIfNecessary(); < ==== 2, when
> interrupt, “shouldClose” not set properly, so file not close
> }
> running = false;
> }
> }
> // Regardless of what caused us to exit, we should notify the
> // the parent thread as it should either exit or be in the process
> // of exiting else we will have write requests hang
> threadToNotifyOnEx.interrupt();
> }
> // shutdown sync thread
> void shutdown() throws InterruptedException {
> running = false;
> this.interrupt(); < ==== 1, call interrupt
> this.join();
> }
> }
> public void closeFileIfNecessary() {
> // Close if shouldClose is set
> if (shouldClose) { < ==== 3, “shouldClose” is false here.
> // We should guard against exceptions so its
> // safe to call in catch blocks
> try {
> logFile.close();
> // Call close only once
> shouldClose = false;
> }
> catch (IOException ioe) {
> LOG.error("I/O exception while closing file", ioe);
> }
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)