From 49782abc2f925ffcbd3148b8db851237e693d018 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Wed, 3 Sep 2014 11:03:06 +0530 Subject: glusterd: Add last successful glusterd lock backtrace Also, moved the backtrace fetching logic to a separate function. Modified the backtrace fetching logic able to work under memory pressure conditions. Change-Id: Ie38bea425a085770f41831314aeda95595177ece BUG:1145093 Signed-off-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.org/8794 Tested-by: Gluster Build System Reviewed-by: Atin Mukherjee Reviewed-by: Niels de Vos Reviewed-by: Vijay Bellur --- libglusterfs/src/glusterfs.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libglusterfs/src/glusterfs.h') diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index 3f76f2d7d9..5c22166d1b 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -209,6 +209,9 @@ #define GF_LOG_FLUSH_TIMEOUT_MIN_STR "30" #define GF_LOG_FLUSH_TIMEOUT_MAX_STR "300" +#define GF_BACKTRACE_LEN 4096 +#define GF_BACKTRACE_FRAME_COUNT 7 + /* NOTE: add members ONLY at the end (just before _MAXVALUE) */ typedef enum { @@ -520,6 +523,8 @@ struct _glusterfs_ctx { * NFS. */ mgmt_ssl_t secure_srvr; + /* Buffer to 'save' backtrace even under OOM-kill like situations*/ + char btbuf[GF_BACKTRACE_LEN]; }; typedef struct _glusterfs_ctx glusterfs_ctx_t; -- cgit