Bug 851951 - gsyncd process crashes due to stack overflow
gsyncd process crashes due to stack overflow
Status: CLOSED DUPLICATE of bug 846569
Product: GlusterFS
Classification: Community
Component: geo-replication (Show other bugs)
mainline
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Csaba Henk
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-27 02:48 EDT by Raghavendra Bhat
Modified: 2012-08-27 10:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-27 10:20:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Raghavendra Bhat 2012-08-27 02:48:45 EDT
Description of problem:

gsyncd process crashes due to stack overflow. In gsyncd process the thread key this_xlator_key is not created. Hence while calling GF_CALLOC etc which uses THIS (i.e __glusterfs_this_location) pthread_setspecific is called with non created key as the argument. It fails and tries to log using gf_log which again calls THIS (thus __glusterfs_this_location) and hence causes recursive function calls and crash.

This the backtrace...

Core was generated by `/usr/local/libexec/glusterfs/gsyncd --session-owner 986eae38-2200-4d78-be76-fef'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000003a99c7ce3b in _int_malloc () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.15-37.fc17.x86_64 openssl-1.0.0j-1.fc17.x86_64 zlib-1.2.5-6.fc17.x86_64
(gdb) bt
#0  0x0000003a99c7ce3b in _int_malloc () from /lib64/libc.so.6
#1  0x0000003a99c810d8 in calloc () from /lib64/libc.so.6
#2  0x00007f111dac0d8c in __gf_default_calloc (cnt=1, size=8) at ../../../libglusterfs/src/mem-pool.h:75
#3  0x00007f111dac0ef8 in __glusterfs_this_location () at ../../../libglusterfs/src/globals.c:118
#4  0x00007f111da8e6d2 in _gf_log (domain=0x7f111dae9265 "", 
    file=0x7f111dae93f8 "../../../libglusterfs/src/globals.c", 
    function=0x7f111dae9540 "__glusterfs_this_location", line=124, level=GF_LOG_WARNING, 
    fmt=0x7f111dae942d "pthread setspecific failed") at ../../../libglusterfs/src/logging.c:442
#5  0x00007f111dac0f51 in __glusterfs_this_location () at ../../../libglusterfs/src/globals.c:124
#6  0x00007f111da8e6d2 in _gf_log (domain=0x7f111dae9265 "", 
    file=0x7f111dae93f8 "../../../libglusterfs/src/globals.c", 
    function=0x7f111dae9540 "__glusterfs_this_location", line=124, level=GF_LOG_WARNING, 
    fmt=0x7f111dae942d "pthread setspecific failed") at ../../../libglusterfs/src/logging.c:442
#7  0x00007f111dac0f51 in __glusterfs_this_location () at ../../../libglusterfs/src/globals.c:124
#8  0x00007f111da8e6d2 in _gf_log (domain=0x7f111dae9265 "", 
    file=0x7f111dae93f8 "../../../libglusterfs/src/globals.c", 
    function=0x7f111dae9540 "__glusterfs_this_location", line=124, level=GF_LOG_WARNING, 
    fmt=0x7f111dae942d "pthread setspecific failed") at ../../../libglusterfs/src/logging.c:442
#9  0x00007f111dac0f51 in __glusterfs_this_location () at ../../../libglusterfs/src/globals.c:124
#10 0x00007f111da8e6d2 in _gf_log (domain=0x7f111dae9265 "", 
    file=0x7f111dae93f8 "../../../libglusterfs/src/globals.c", 
    function=0x7f111dae9540 "__glusterfs_this_location", line=124, level=GF_LOG_WARNING, 
    fmt=0x7f111dae942d "pthread setspecific failed") at ../../../libglusterfs/src/logging.c:442
#11 0x00007f111dac0f51 in __glusterfs_this_location () at ../../../libglusterfs/src/globals.c:124
#12 0x00007f111da8e6d2 in _gf_log (domain=0x7f111dae9265 "", 
    file=0x7f111dae93f8 "../../../libglusterfs/src/globals.c", 
    function=0x7f111dae9540 "__glusterfs_this_location", line=124, level=GF_LOG_WARNING, 
    fmt=0x7f111dae942d "pthread setspecific failed") at ../../../libglusterfs/src/logging.c:442
#13 0x00007f111dac0f51 in __glusterfs_this_location () at ../../../libglusterfs/src/globals.c:124
#14 0x00007f111da8e6d2 in _gf_log (domain=0x7f111dae9265 "", 
    file=0x7f111dae93f8 "../../../libglusterfs/src/globals.c", 
    function=0x7f111dae9540 "__glusterfs_this_location", line=124, level=GF_LOG_WARNING, 
    fmt=0x7f111dae942d "pthread setspecific failed") at ../../../libglusterfs/src/logging.c:442
f 7
#7  0x00007f111dac0f51 in __glusterfs_this_location () at ../../../libglusterfs/src/globals.c:124
124	                        gf_log ("", GF_LOG_WARNING, "pthread setspecific failed");
(gdb) l
119	                if (!this_location)
120	                        goto out;
121	
122	                ret = pthread_setspecific (this_xlator_key, this_location);
123	                if (ret != 0) {
124	                        gf_log ("", GF_LOG_WARNING, "pthread setspecific failed");
125	
126	                        FREE (this_location);
127	                        this_location = NULL;
128	                        goto out;
(gdb) p ret
$1 = 22
f 24355
#24355 0x00007f111dad6592 in runinit (runner=0x7fffe0f92260) at ../../../libglusterfs/src/run.c:54
54	        runner->argv = GF_CALLOC (runner->argvlen,
(gdb) f 24356
#24356 0x0000000000401830 in invoke_gsyncd (argc=8, argv=0x7fffe0f933b8)
    at ../../../../../../xlators/features/marker/utils/src/gsyncd.c:114
114	                runinit (&runner);
(gdb) f 24357
#24357 0x0000003a99c21735 in __libc_start_main () from /lib64/libc.so.6
(gdb) f 24358
#24358 0x00000000004016c1 in _start ()
(gdb) f 24359
#0  0x0000000000000000 in ?? ()
(gdb) f 24350
#24350 0x00007f111da8e6d2 in _gf_log (domain=0x7f111dae9265 "", 
    file=0x7f111dae93f8 "../../../libglusterfs/src/globals.c", 
    function=0x7f111dae9540 "__glusterfs_this_location", line=124, level=GF_LOG_WARNING, 
    fmt=0x7f111dae942d "pthread setspecific failed") at ../../../libglusterfs/src/logging.c:442
442	        this = THIS;
(gdb) f 24351
#24351 0x00007f111dac0f51 in __glusterfs_this_location () at ../../../libglusterfs/src/globals.c:124
124	                        gf_log ("", GF_LOG_WARNING, "pthread setspecific failed");
(gdb) f 24352
#24352 0x00007f111da8e6d2 in _gf_log (domain=0x7f111dae9265 "", 
    file=0x7f111dae93f8 "../../../libglusterfs/src/globals.c", 
    function=0x7f111dae9540 "__glusterfs_this_location", line=124, level=GF_LOG_WARNING, 
    fmt=0x7f111dae942d "pthread setspecific failed") at ../../../libglusterfs/src/logging.c:442
442	        this = THIS;
(gdb) f 24353
#24353 0x00007f111dac0f51 in __glusterfs_this_location () at ../../../libglusterfs/src/globals.c:124
124	                        gf_log ("", GF_LOG_WARNING, "pthread setspecific failed");
(gdb) 


Version-Release number of selected component (if applicable):


How reproducible:
Created a volume and enabled geo-replcation to a local directory and quota.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Csaba Henk 2012-08-27 10:20:26 EDT
Seems to be the same issue as 846569, Venky is working on that.

*** This bug has been marked as a duplicate of bug 846569 ***

Note You need to log in before you can comment on or make changes to this bug.