-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NH-89406: remove debug flag for release version of apm
- Loading branch information
1 parent
bc36931
commit ed300aa
Showing
7 changed files
with
111 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,3 +65,50 @@ Some inspiring examples here: | |
<https://jvns.ca/blog/2016/06/12/a-weird-system-call-process-vm-readv/> | ||
|
||
<https://medium.com/@zanker/finding-a-ruby-bug-with-gdb-56d6b321bc86> | ||
|
||
|
||
Check failure on line 69 in ext/oboe_metal/README.md GitHub Actions / markdownlint-checkMultiple top-level headings in the same document
|
||
# Debug the c-code with core dump | ||
|
||
If the core dump is produced, it's easier to check the backtrace with it in gdb | ||
|
||
For example, `(core dumped)` indicate the crash file is dumped | ||
|
||
```console | ||
./start.sh: line 37: 65 Segmentation fault (core dumped) ... | ||
``` | ||
|
||
## Prepare | ||
|
||
1. Install solarwinds_apm with debug symbol on | ||
|
||
```console | ||
export OBOE_DEBUG=true # for debug flag when compiling | ||
export OBOE_DEV=true # optional: if you want to install the nightly build liboboe | ||
|
||
gem install solarwinds_apm | ||
``` | ||
|
||
Check failure on line 90 in ext/oboe_metal/README.md GitHub Actions / markdownlint-checkOrdered list item prefix
|
||
2. Check the core dump size is not constrained | ||
```console | ||
ulimit -c unlimited # have to set this for unlimited core dump file size without trimmed error message | ||
``` | ||
|
||
3. Check if the crash report program is configured correctly | ||
Check failure on line 96 in ext/oboe_metal/README.md GitHub Actions / markdownlint-checkOrdered list item prefix
|
||
|
||
Ubuntu use [apport](https://wiki.ubuntu.com/Apport); Debian use [kdump](https://www.cyberciti.biz/faq/how-to-on-enable-kernel-crash-dump-on-debian-linux/) | ||
|
||
In ubuntu, if disable the apport by `service apport stop`, the core dump file will be stored in the current directory and named as `core` | ||
|
||
## Debug by checking the backtrace after obtain core dump file | ||
|
||
1. Check that ruby is debuggable | ||
```console | ||
type ruby # => ruby is hashed (/root/.rbenv/shims/ruby) | ||
rbenv which ruby # => /root/.rbenv/versions/3.1.0/bin/ruby | ||
``` | ||
|
||
2. Load the core dump file in gdb | ||
```console | ||
Check failure on line 111 in ext/oboe_metal/README.md GitHub Actions / markdownlint-checkOrdered list item prefix
|
||
gdb /root/.rbenv/versions/3.1.0/bin/ruby core | ||
(gdb) bt full # backtrace full trace; investigate the issue from here | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters