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/02/07 04:45:51 UTC

[kudu-CR] Add previous / current thread to collision warner

Hello Todd Lipcon,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/9237

to review the following change.


Change subject: Add previous / current thread to collision warner
......................................................................

Add previous / current thread to collision warner

The failure message is now more useful and looks like the following:

F0206 20:31:24.554322 30972 thread_collision_warner.cc:23] Thread Collision! Previous thread id: 30962, current thread id: 30972

I found this necessary when debugging a particular issue since by the
time the SIGABRT triggered in GDB the previous thread had already exited
the critical section (perhaps while printing the fatal log message).

Change-Id: I038bad901b5235725084bd8671ef4b02ec22c0a7
---
M src/kudu/gutil/threading/thread_collision_warner.cc
M src/kudu/gutil/threading/thread_collision_warner.h
2 files changed, 15 insertions(+), 13 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I038bad901b5235725084bd8671ef4b02ec22c0a7
Gerrit-Change-Number: 9237
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Add previous / current thread to collision warner

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

Change subject: Add previous / current thread to collision warner
......................................................................


Patch Set 1: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/9237/1/src/kudu/gutil/threading/thread_collision_warner.h
File src/kudu/gutil/threading/thread_collision_warner.h:

http://gerrit.cloudera.org:8080/#/c/9237/1/src/kudu/gutil/threading/thread_collision_warner.h@132
PS1, Line 132: // The class ThreadCollisionWarner uses an Asserter to notify the collision
             : // AsserterBase is the interfaces and DCheckAsserter is the default asserter
             : // used. During the unit tests is used another class that doesn't "DCHECK"
             : // in case of collision (check thread_collision_warner_unittests.cc)
nit: it's not the part of your change, but maybe consider updating this description because it's hard to read.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I038bad901b5235725084bd8671ef4b02ec22c0a7
Gerrit-Change-Number: 9237
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 07 Feb 2018 05:43:47 +0000
Gerrit-HasComments: Yes

[kudu-CR] Add previous / current thread to collision warner

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

Change subject: Add previous / current thread to collision warner
......................................................................

Add previous / current thread to collision warner

The failure message is now more useful and looks like the following:

F0206 20:31:24.554322 30972 thread_collision_warner.cc:23] Thread Collision! Previous thread id: 30962, current thread id: 30972

I found this necessary when debugging a particular issue since by the
time the SIGABRT triggered in GDB the previous thread had already exited
the critical section (perhaps while printing the fatal log message).

Change-Id: I038bad901b5235725084bd8671ef4b02ec22c0a7
Reviewed-on: http://gerrit.cloudera.org:8080/9237
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Tested-by: Kudu Jenkins
---
M src/kudu/gutil/threading/thread_collision_warner.cc
M src/kudu/gutil/threading/thread_collision_warner.h
2 files changed, 18 insertions(+), 15 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved
  Kudu Jenkins: Verified

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I038bad901b5235725084bd8671ef4b02ec22c0a7
Gerrit-Change-Number: 9237
Gerrit-PatchSet: 3
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Add previous / current thread to collision warner

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

Change subject: Add previous / current thread to collision warner
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/9237/1/src/kudu/gutil/threading/thread_collision_warner.h
File src/kudu/gutil/threading/thread_collision_warner.h:

http://gerrit.cloudera.org:8080/#/c/9237/1/src/kudu/gutil/threading/thread_collision_warner.h@132
PS1, Line 132: // The class ThreadCollisionWarner uses an Asserter to notify the collision
             : // AsserterBase is the interfaces and DCheckAsserter is the default asserter
             : // used. During the unit tests is used another class that doesn't "DCHECK"
             : // in case of collision (check thread_collision_warner_unittests.cc)
> nit: it's not the part of your change, but maybe consider updating this des
I'd rather not change that because it's a copy / paste import from Chromium and it would make a rebase harder. I tried to avoid non-essential changes in this patch.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I038bad901b5235725084bd8671ef4b02ec22c0a7
Gerrit-Change-Number: 9237
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 07 Feb 2018 19:59:19 +0000
Gerrit-HasComments: Yes

[kudu-CR] Add previous / current thread to collision warner

Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Hello Alexey Serbin, Kudu Jenkins, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/9237

to look at the new patch set (#2).

Change subject: Add previous / current thread to collision warner
......................................................................

Add previous / current thread to collision warner

The failure message is now more useful and looks like the following:

F0206 20:31:24.554322 30972 thread_collision_warner.cc:23] Thread Collision! Previous thread id: 30962, current thread id: 30972

I found this necessary when debugging a particular issue since by the
time the SIGABRT triggered in GDB the previous thread had already exited
the critical section (perhaps while printing the fatal log message).

Change-Id: I038bad901b5235725084bd8671ef4b02ec22c0a7
---
M src/kudu/gutil/threading/thread_collision_warner.cc
M src/kudu/gutil/threading/thread_collision_warner.h
2 files changed, 18 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/37/9237/2
-- 
To view, visit http://gerrit.cloudera.org:8080/9237
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I038bad901b5235725084bd8671ef4b02ec22c0a7
Gerrit-Change-Number: 9237
Gerrit-PatchSet: 2
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Add previous / current thread to collision warner

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

Change subject: Add previous / current thread to collision warner
......................................................................


Patch Set 2: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/9237/1/src/kudu/gutil/threading/thread_collision_warner.h
File src/kudu/gutil/threading/thread_collision_warner.h:

http://gerrit.cloudera.org:8080/#/c/9237/1/src/kudu/gutil/threading/thread_collision_warner.h@132
PS1, Line 132: 
             : // The class ThreadCollisionWarner uses an Asserter to notify the collision
             : // AsserterBase is the interfaces and DCheckAsserter is the default asserter
             : // used. During the unit tests is used another class that doesn't "D
> I'd rather not change that because it's a copy / paste import from Chromium
Ah, that makes sense.  SGTM.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I038bad901b5235725084bd8671ef4b02ec22c0a7
Gerrit-Change-Number: 9237
Gerrit-PatchSet: 2
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 07 Feb 2018 20:03:19 +0000
Gerrit-HasComments: Yes