Marton Greber has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/18971


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

[macos] Add sample to PstackWatcher

PstackWatcher is not working on Apple Silicon (M series Macs). None of
the utilized tools (gdb, pstack, gstack) work on Apple Silicon. As of
now there is no easy way to get GDB working on Apple silicon. None of
the popular package managers have it on their list. [1] [2] ‘sample’ is
an OSX specific command-line tool, which can collect call stacks of all
threads in a process. [3] To get the instantaneous call stack of a
process, on can call: ‘sample $PID 0’. This patch adds sample to
PstackWatcher. With sample added, the PstackWatcher tests are 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 Mac, 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 enables future work.

[1] https://formulae.brew.sh/formula/gdb#default
[2] https://ports.macports.org/port/gdb/details/
[3] https://www.unix.com/man-page/osx/1/sample/

Change-Id: I59cea0e8dc99ceb00901f13805a43ec4f11d0a64
---
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(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/71/18971/1
--
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: newchange
Gerrit-Change-Id: I59cea0e8dc99ceb00901f13805a43ec4f11d0a64
Gerrit-Change-Number: 18971
Gerrit-PatchSet: 1
Gerrit-Owner: Marton Greber <[email protected]>

Reply via email to