forked from nfs-ganesha/nfs-ganesha
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently, Ganesha uses backtrace during crashes, which may not provide sufficient useful information: 07/02/2024 19:09:18: epoch 65c3d55b: xueqian-hu: nfs-ganesha-39008[main] gsh_backtrace: NFS STARTUP: MAJ: stack backtrace follows: /lib64/libganesha_nfsd.so.5.6(+0x83ba1)[0x7f64d9172ba1] /lib64/libganesha_nfsd.so.5.6(+0x5d618)[0x7f64d914c618] /lib64/libpthread.so.0(+0xf630)[0x7f64d7d1a630] /lib64/libpthread.so.0(pthread_join+0xa7)[0x7f64d7d14017] /lib64/libganesha_nfsd.so.5.6(nfs_start+0x323)[0x7f64d914eff3] ganesha.nfsd(main+0xbef)[0x4025cf] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f64d753d555] ganesha.nfsd[0x402663] This patch introduces an option to use libunwind, which can display function information: 08/02/2024 20:06:04: epoch 65c53429: xueqian-hu: nfs-ganesha-99814[main] gsh_libunwind: NFS STARTUP: MAJ: BACKTRACE: 08/02/2024 20:06:04 : epoch 65c53429 : xueqian-hu : nfs-ganesha-99814[main] gsh_libunwind :NFS STARTUP :MAJ :BACKTRACE: #0 gsh_libunwind + 0x29 [ip=0x7f90b1a10859] [sp=0x7ffd49d53c00] #1 crash_handler + 0x8 [ip=0x7f90b19e9fd8] [sp=0x7ffd49d54670] #2 _L_unlock_13 + 0x34 [ip=0x7f90b039d630] [sp=0x7ffd49d54680] #3 pthread_join + 0xa7 [ip=0x7f90b0397017] [sp=0x7ffd49d55380] #4 nfs_start + 0x323 [ip=0x7f90b19ec9b3] [sp=0x7ffd49d553e0] #5 main + 0xbef [ip=0x4025df] [sp=0x7ffd49d55480] Change-Id: I194853e25ec0c89c7f552dc4872c37a420ea8d4a Signed-off-by: Xueqian Hu <xh140312@outlook.com>
- Loading branch information
1 parent
51ad56d
commit 158f395
Showing
7 changed files
with
166 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# FindUnwind.cmake | ||
|
||
if(UNWIND_PATH_HINT) | ||
message(STATUS "Using UNWIND_PATH_HINT: ${UNWIND_PATH_HINT}") | ||
else() | ||
set(UNWIND_PATH_HINT) | ||
endif() | ||
|
||
find_path(UNWIND_INCLUDE_DIR | ||
NAMES libunwind.h | ||
PATHS ${UNWIND_PATH_HINT} | ||
PATH_SUFFIXES include | ||
DOC "The libunwind include directory") | ||
|
||
find_library(UNWIND_LIBRARY | ||
NAMES unwind | ||
PATHS ${UNWIND_PATH_HINT} | ||
PATH_SUFFIXES lib lib64 | ||
DOC "The libunwind library") | ||
|
||
set(UNWIND_LIBRARIES ${UNWIND_LIBRARY}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Unwind REQUIRED_VARS UNWIND_LIBRARY UNWIND_INCLUDE_DIR) | ||
|
||
mark_as_advanced(UNWIND_INCLUDE_DIR UNWIND_LIBRARY) | ||
|
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