You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Mike Percy (Code Review)" <ge...@cloudera.org> on 2018/05/22 01:35:34 UTC

[kudu-CR] WIP: KUDU-2450. Retry on EAGAIN on create / destroy mutex

Mike Percy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/10473


Change subject: WIP: KUDU-2450. Retry on EAGAIN on create / destroy mutex
......................................................................

WIP: KUDU-2450. Retry on EAGAIN on create / destroy mutex

This patch adds a hot retry loop when EAGAIN is returned from the
pthread_mutex_init() and pthread_mutex_destroy() calls.

This patch is marked WIP because I am not sure if a hot loop is
appropriate or not, or in what cases a caller can get such an error
code.

Change-Id: Idb865c2e31d83eb7897f44ac414c23baaa7cbed5
---
M src/kudu/util/mutex.cc
1 file changed, 12 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/73/10473/1
-- 
To view, visit http://gerrit.cloudera.org:8080/10473
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb865c2e31d83eb7897f44ac414c23baaa7cbed5
Gerrit-Change-Number: 10473
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Percy <mp...@apache.org>

[kudu-CR] WIP: KUDU-2450. Retry on EAGAIN on create / destroy mutex

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

Change subject: WIP: KUDU-2450. Retry on EAGAIN on create / destroy mutex
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/10473/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10473/1//COMMIT_MSG@7
PS1, Line 7: WIP: KUDU-2450. Retry on EAGAIN on create / destroy mutex
> KUDU-2450 shows EBUSY, not EAGAIN. The actual error code was 16 (Device or 
Not sure why I thought it was EAGAIN, thanks for pointing that out. This patch might be technically correct, but since we haven't seen the need for it I'm going to abandon it for now.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idb865c2e31d83eb7897f44ac414c23baaa7cbed5
Gerrit-Change-Number: 10473
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Comment-Date: Tue, 22 May 2018 02:21:07 +0000
Gerrit-HasComments: Yes

[kudu-CR] WIP: KUDU-2450. Retry on EAGAIN on create / destroy mutex

Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has abandoned this change. ( http://gerrit.cloudera.org:8080/10473 )

Change subject: WIP: KUDU-2450. Retry on EAGAIN on create / destroy mutex
......................................................................


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Idb865c2e31d83eb7897f44ac414c23baaa7cbed5
Gerrit-Change-Number: 10473
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>

[kudu-CR] WIP: KUDU-2450. Retry on EAGAIN on create / destroy mutex

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

Change subject: WIP: KUDU-2450. Retry on EAGAIN on create / destroy mutex
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/10473/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10473/1//COMMIT_MSG@7
PS1, Line 7: WIP: KUDU-2450. Retry on EAGAIN on create / destroy mutex
KUDU-2450 shows EBUSY, not EAGAIN. The actual error code was 16 (Device or resource busy). From /usr/include/asm-generic/errno-base.h:

  #define EBUSY           16      /* Device or resource busy */

As for why it's happening, the manpage for pthread_mutex_destroy says:

       The pthread_mutex_destroy function returns the following error code on error:

              EBUSY  the mutex is currently locked.

So it sounds like ThreadMgr had the mutex locked at the time that it was destroyed?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idb865c2e31d83eb7897f44ac414c23baaa7cbed5
Gerrit-Change-Number: 10473
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Comment-Date: Tue, 22 May 2018 01:41:40 +0000
Gerrit-HasComments: Yes