Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/18971 )
Change subject: [macos] Add sample to PstackWatcher ...................................................................... [macos] Add sample to PstackWatcher As of now, PstackWatcher is not working on macOS. None of the utilized tools (gdb, pstack, gstack) work on macOS. ‘sample’ is an OSX specific command-line tool, which can collect call stacks of all threads in a process. [1] To get the instantaneous call stack of a process, one can call: ‘sample $PID 0’. This patch adds sample to PstackWatcher. With sample added, the PstackWatcher tests are enabled and running successfully on macOS. I tested it on my M1 MacBook Pro. The origin of this investigation has been the memory_gc-itest, which was failing on my M1 MacBook Pro, with the following error message: “Couldn't dump stacks: Service unavailable: Neither gdb, pstack, nor gstack appear to be installed.”. Using this patch the test still fails, however now I obtain a proper call stack dump, which is valuable for future investigations. [1] https://www.unix.com/man-page/osx/1/sample/ Change-Id: I59cea0e8dc99ceb00901f13805a43ec4f11d0a64 Reviewed-on: http://gerrit.cloudera.org:8080/18971 Tested-by: Kudu Jenkins Reviewed-by: Alexey Serbin <[email protected]> --- M src/kudu/util/CMakeLists.txt M src/kudu/util/pstack_watcher.cc M src/kudu/util/pstack_watcher.h 3 files changed, 35 insertions(+), 3 deletions(-) Approvals: Kudu Jenkins: Verified Alexey Serbin: Looks good to me, approved -- 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: merged Gerrit-Change-Id: I59cea0e8dc99ceb00901f13805a43ec4f11d0a64 Gerrit-Change-Number: 18971 Gerrit-PatchSet: 5 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]>
