You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Joe McDonnell (Code Review)" <ge...@cloudera.org> on 2020/04/03 01:51:30 UTC

[Impala-ASF-CR] IMPALA-9571: Fix Impala crash from unexpected boost filesystem error exception

Joe McDonnell has uploaded this change for review. ( http://gerrit.cloudera.org:8080/15640


Change subject: IMPALA-9571: Fix Impala crash from unexpected boost filesystem_error exception
......................................................................

IMPALA-9571: Fix Impala crash from unexpected boost filesystem_error exception

The no-exception signature of boost::filesystem::remove_all() has a
longstanding bug where it can throw an exception even for the
no-exceptions interface. Boost recently added the "noexcept" specifier
to the no-exception signature of remove_all(). When a "noexcept"
function throws an exception, it causes the program to call std::terminate()
which aborts the program. This makes the try/catch block around
remove_all() useless.

As a point fix, this switches FilesystemUtil to use the remove_all()
signature that can throw exceptions. This code already had a try/catch
block around remove_all(), so now it just uses that to get the error
code.

Newer versions of boost (1.63+) fix the underlying problem, so this
code can be removed when we upgrade boost.

Testing:
 - Ran core tests
 - Ran FilesystemUtil backend test

Change-Id: I23016f37401604fc41fc99c0a056439a31333e3f
---
M be/src/util/filesystem-util.cc
1 file changed, 13 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/40/15640/1
-- 
To view, visit http://gerrit.cloudera.org:8080/15640
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I23016f37401604fc41fc99c0a056439a31333e3f
Gerrit-Change-Number: 15640
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>

[Impala-ASF-CR] IMPALA-9571: Fix Impala crash from unexpected boost filesystem error exception

Posted by "Joe McDonnell (Code Review)" <ge...@cloudera.org>.
Joe McDonnell has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/15640 )

Change subject: IMPALA-9571: Fix Impala crash from unexpected boost filesystem_error exception
......................................................................

IMPALA-9571: Fix Impala crash from unexpected boost filesystem_error exception

The no-exception signature of boost::filesystem::remove_all() has a
longstanding bug where it can throw an exception even for the
no-exceptions interface. Boost recently added the "noexcept" specifier
to the no-exception signature of remove_all(). When a "noexcept"
function throws an exception, it causes the program to call std::terminate()
which aborts the program. This makes the try/catch block around
remove_all() useless.

As a point fix, this switches FilesystemUtil to use the remove_all()
signature that can throw exceptions. This code already had a try/catch
block around remove_all(), so now it just uses that to get the error
code.

Newer versions of boost (1.63+) fix the underlying problem, so this
code can be removed when we upgrade boost.

Testing:
 - Ran core tests
 - Ran FilesystemUtil backend test

Change-Id: I23016f37401604fc41fc99c0a056439a31333e3f
Reviewed-on: http://gerrit.cloudera.org:8080/15640
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Csaba Ringhofer <cs...@cloudera.com>
---
M be/src/util/filesystem-util.cc
1 file changed, 13 insertions(+), 6 deletions(-)

Approvals:
  Impala Public Jenkins: Verified
  Csaba Ringhofer: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/15640
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I23016f37401604fc41fc99c0a056439a31333e3f
Gerrit-Change-Number: 15640
Gerrit-PatchSet: 2
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>

[Impala-ASF-CR] IMPALA-9571: Fix Impala crash from unexpected boost filesystem error exception

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15640 )

Change subject: IMPALA-9571: Fix Impala crash from unexpected boost filesystem_error exception
......................................................................


Patch Set 1: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/15640
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I23016f37401604fc41fc99c0a056439a31333e3f
Gerrit-Change-Number: 15640
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 03 Apr 2020 07:43:49 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9571: Fix Impala crash from unexpected boost filesystem error exception

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15640 )

Change subject: IMPALA-9571: Fix Impala crash from unexpected boost filesystem_error exception
......................................................................


Patch Set 1:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/5606/ DRY_RUN=true


-- 
To view, visit http://gerrit.cloudera.org:8080/15640
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I23016f37401604fc41fc99c0a056439a31333e3f
Gerrit-Change-Number: 15640
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 03 Apr 2020 03:13:21 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9571: Fix Impala crash from unexpected boost filesystem error exception

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15640 )

Change subject: IMPALA-9571: Fix Impala crash from unexpected boost filesystem_error exception
......................................................................


Patch Set 1: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/5605/


-- 
To view, visit http://gerrit.cloudera.org:8080/15640
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I23016f37401604fc41fc99c0a056439a31333e3f
Gerrit-Change-Number: 15640
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 03 Apr 2020 03:04:26 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9571: Fix Impala crash from unexpected boost filesystem error exception

Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/15640 )

Change subject: IMPALA-9571: Fix Impala crash from unexpected boost filesystem_error exception
......................................................................


Patch Set 1: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/15640
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I23016f37401604fc41fc99c0a056439a31333e3f
Gerrit-Change-Number: 15640
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 03 Apr 2020 15:58:55 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9571: Fix Impala crash from unexpected boost filesystem error exception

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/15640 )

Change subject: IMPALA-9571: Fix Impala crash from unexpected boost filesystem_error exception
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/5697/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/15640
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I23016f37401604fc41fc99c0a056439a31333e3f
Gerrit-Change-Number: 15640
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 03 Apr 2020 02:31:48 +0000
Gerrit-HasComments: No