This is the patch which introduced this change, seems like the author wanted it work under memory pressure. I didn't read it carefully though.
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: 1138503
Signed-off-by: Krishnan Parthasarathi <kparthas@xxxxxxxxxx>
Reviewed-on: http://review.gluster.org/8584
Tested-by: Gluster Build System <jenkins@xxxxxxxxxxxxxxxxx>
Reviewed-by: Jeff Darcy <jdarcy@xxxxxxxxxx>
Reviewed-by: Atin Mukherjee <amukherj@xxxxxxxxxx>
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: 1138503
Signed-off-by: Krishnan Parthasarathi <kparthas@xxxxxxxxxx>
Reviewed-on: http://review.gluster.org/8584
Tested-by: Gluster Build System <jenkins@xxxxxxxxxxxxxxxxx>
Reviewed-by: Jeff Darcy <jdarcy@xxxxxxxxxx>
Reviewed-by: Atin Mukherjee <amukherj@xxxxxxxxxx>
On Tue, Jun 20, 2017 at 8:38 AM, C0reFast <topchenfu@xxxxxx> wrote:
When I trying to listing /tmp in a gluster server. I found that have some bt prefix files like:[root@xxx# ll /tmp/ls: cannot access /tmp/btm1RpMm: No such file or directorytotal 116-rw------- 1 root root 129 Jan 13 17:11 bt0tJH3c-?????????? ? ? ? ? ? btm1RpMm-rw------- 1 root root 287 Jan 13 17:11 btyDGNO9drwx------. 2 root root 16384 Oct 19 09:21 lost+foundso i checked the source code. found in libglusterfs/src/common-utils.c in function gf_backtrace_fillframes:1. call frames = backtrace (array, GF_BACKTRACE_FRAME_COUNT); to get backtrace.2. save backtrace to a temp file.3. read backtrace from temp file to btbuf.so why need writing a temp file instead just doing this in memory?
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://lists.gluster.org/mailman/listinfo/gluster-devel
--
Pranith
_______________________________________________ Gluster-devel mailing list Gluster-devel@xxxxxxxxxxx http://lists.gluster.org/mailman/listinfo/gluster-devel