Marton Greber has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18971 )

Change subject: [macos] Add sample to PstackWatcher
......................................................................


Patch Set 3:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/18971/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/18971/2//COMMIT_MSG@9
PS2, Line 9: tilized
           : tools (gdb, pstack, gstack) work on macOS. ‘sample’ is an OSX
> Wasn't that just for macOS in general, regardless of the CPU architecture?
Thinking about it more, I think you are right. Since the PstackWatcher tests 
were disabled on purpose.
src/kudu/util/CMakeLists.txt:538 -> git blame "pstack_watcher does not work 
correctly on macOS, since it's much harder
to get user thread stacks"
Removed following sentence regarding the package managers.


http://gerrit.cloudera.org:8080/#/c/18971/2//COMMIT_MSG@12
PS2, Line 12: s, one can
            : call: ‘sample $PID 0’. This patch adds sample to PstackWatcher. 
With
            : sample added, the Ps
> Did you consider using 'lldb' instead?  At least, there is quite straightfo
Before deciding on sample, I tried to make lldb work.
First I just wanted to get a thread list, by implementing the following lldb 
command:
"lldb --batch --no-lldbinit --one-line process attach -p $PID --one-line thread 
list"
I enabled the PstackWatcher tests on macOS, and tried running TestDumpStacks. 
This is the message I got:

***... BEGIN STACKS ***...
(lldb) process attach -p 2818
Process 2818 stopped
* thread #1, stop reason = signal SIGSTOP
    frame #0: 0xffffffffffffffff
Target 0: (No executable module.) stopped.
Architecture set to: .
(lldb) thread list
Process 2818 stopped
* thread #1: tid = 0xc4c1, stop reason = signal SIGSTOP
  thread #2: tid = 0xc4c5
  thread #3: tid = 0xc4c7
Hangup: 1

Maybe I'm missing something on the lldb side, if you have any suggestion, I'm 
open to explore it.


http://gerrit.cloudera.org:8080/#/c/18971/2//COMMIT_MSG@17
PS2, Line 17: stigation has been the memory_gc-
> Could you add an example of the output produced with this patch for, say, t
Absolutely! Since the dumps are big, I uploaded them externally for you to 
eyeball them. Here is the link: 
https://github.com/martongreber/osx_sample_example
pstack_watcher-test.sample.txt -> the previously mentioned TestDumpStacks, 
stack dump using sample.
kudu.sample.txt -> the sample dump from the failing memory_gc-itest


http://gerrit.cloudera.org:8080/#/c/18971/2//COMMIT_MSG@19
PS2, Line 19: : Neither gdb, pstack, nor
            : gstack appear to
> Just for your reference: that test passes on my laptop running macOS BigSur
Thanks for mentioning this, good to know!


http://gerrit.cloudera.org:8080/#/c/18971/2//COMMIT_MSG@22
PS2, Line 22: tions.
            :
> BTW, if you are interested in another workaround to get proper stacks and m
Disregarding this patch, this is a really valuable bit of info to me. Will try 
it, thanks!



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I59cea0e8dc99ceb00901f13805a43ec4f11d0a64
Gerrit-Change-Number: 18971
Gerrit-PatchSet: 3
Gerrit-Owner: Marton Greber <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>
Gerrit-Comment-Date: Fri, 16 Sep 2022 15:19:32 +0000
Gerrit-HasComments: Yes

Reply via email to