Bug 771313 - [29b9b0c72809456b1ba334a40adc1ed9929eca91]: brick crashed in posix_getxattr
[29b9b0c72809456b1ba334a40adc1ed9929eca91]: brick crashed in posix_getxattr
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: unclassified (Show other bugs)
3.3-beta
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Vinayaga Raman
:
Depends On:
Blocks: 817967
  Show dependency treegraph
 
Reported: 2012-01-03 05:00 EST by Rahul C S
Modified: 2014-03-30 21:28 EDT (History)
3 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 13:27:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: 1f3a0dd4742a2fcd3215aee4a5e22125d7ea4f4d
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Rahul C S 2012-01-03 05:00:10 EST
Description of problem:
Did untar of glusterfs tarball & compiled it & removed the directory.

Core was generated by `/usr/local/sbin/glusterfsd -s localhost --volfile-id vol.dagobah.data-export5 -'.
Program terminated with signal 6, Aborted.
#0  0x00007f7e54defd05 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
	in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
#0  0x00007f7e54defd05 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007f7e54df3ab6 in abort () at abort.c:92
#2  0x00007f7e54de87c5 in __assert_fail (assertion=0x7f7e55a158cd "0", file=<value optimized out>, line=300, function=<value optimized out>) at assert.c:81
#3  0x00007f7e559ec704 in __gf_free (free_ptr=0x7f7e44078a70) at ../../../libglusterfs/src/mem-pool.c:300
#4  0x00007f7e559b5e5f in data_destroy (data=0x7f7e44077440) at ../../../libglusterfs/src/dict.c:141
#5  0x00007f7e559b6c0a in data_unref (this=0x7f7e44077440) at ../../../libglusterfs/src/dict.c:489
#6  0x00007f7e559b696a in dict_destroy (this=0x7f7e44078a00) at ../../../libglusterfs/src/dict.c:414
#7  0x00007f7e559b6ab4 in dict_unref (this=0x7f7e44078a00) at ../../../libglusterfs/src/dict.c:451
#8  0x00007f7e51b39907 in posix_getxattr (frame=0x7f7e53fb1534, this=0xf1ffb0, loc=0x7f7e53c8e258, 
    name=0x7f7e44077cd0 "trusted.glusterfs.quota.f0a65fa5-1966-4a6b-941f-808748082673.contri") at ../../../../../xlators/storage/posix/src/posix.c:2663
#9  0x00007f7e51921d1c in posix_acl_getxattr (frame=0x7f7e53fb4a48, this=0xf214a0, loc=0x7f7e53c8e258, 
    name=0x7f7e44077cd0 "trusted.glusterfs.quota.f0a65fa5-1966-4a6b-941f-808748082673.contri")
    at ../../../../../xlators/system/posix-acl/src/posix-acl.c:1778
#10 0x00007f7e559cbde4 in default_getxattr (frame=0x7f7e53fbcca0, this=0xf226a0, loc=0x7f7e53c8e258, 
    name=0x7f7e44077cd0 "trusted.glusterfs.quota.f0a65fa5-1966-4a6b-941f-808748082673.contri") at ../../../libglusterfs/src/defaults.c:1012
#11 0x00007f7e514f2214 in iot_getxattr_wrapper (frame=0x7f7e53faf040, this=0xf23880, loc=0x7f7e53c8e258, 
    name=0x7f7e44077cd0 "trusted.glusterfs.quota.f0a65fa5-1966-4a6b-941f-808748082673.contri")
    at ../../../../../xlators/performance/io-threads/src/io-threads.c:1654
#12 0x00007f7e559e097f in call_resume_wind (stub=0x7f7e53c8e220) at ../../../libglusterfs/src/call-stub.c:2269
#13 0x00007f7e559e7318 in call_resume (stub=0x7f7e53c8e220) at ../../../libglusterfs/src/call-stub.c:3853
#14 0x00007f7e514e8710 in iot_worker (data=0xf2e500) at ../../../../../xlators/performance/io-threads/src/io-threads.c:138
#15 0x00007f7e55156d8c in start_thread (arg=0x7f7e4bcbf700) at pthread_create.c:304
#16 0x00007f7e54ea204d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#17 0x0000000000000000 in ?? ()
(gdb) f 4
#4  0x00007f7e559b5e5f in data_destroy (data=0x7f7e44077440) at ../../../libglusterfs/src/dict.c:141
141	                                        GF_FREE (data->data);
(gdb) p *data
$1 = {is_static = 0 '\000', is_const = 0 '\000', is_stdalloc = 0 '\000', len = 8, vec = 0x0, data = 0x7f7e44078a70 "", refcount = 0, lock = 1}
(gdb) l
136	                if (!data->is_static) {
137	                        if (data->data) {
138	                                if (data->is_stdalloc)
139	                                        free (data->data);
140	                                else
141	                                        GF_FREE (data->data);
142	                        }
143	                        if (data->vec)
144	                                GF_FREE (data->vec);
145	                }
(gdb) f 3
#3  0x00007f7e559ec704 in __gf_free (free_ptr=0x7f7e44078a70) at ../../../libglusterfs/src/mem-pool.c:300
300	                GF_ASSERT (0);
(gdb) l
295	        type = *(uint32_t *)ptr;
296	
297	        if (GF_MEM_TRAILER_MAGIC != *(uint32_t *)
298	            ((char *)free_ptr + req_size)) {
299	                // This points to a memory overrun
300	                GF_ASSERT (0);
301	        }
302	        *(uint32_t *) ((char *)free_ptr + req_size) = 0;
303	
304	        LOCK (&xl->mem_acct.rec[type].lock);
(gdb) f 8
#8  0x00007f7e51b39907 in posix_getxattr (frame=0x7f7e53fb1534, this=0xf1ffb0, loc=0x7f7e53c8e258, 
    name=0x7f7e44077cd0 "trusted.glusterfs.quota.f0a65fa5-1966-4a6b-941f-808748082673.contri") at ../../../../../xlators/storage/posix/src/posix.c:2663
2663	                dict_unref (dict);
(gdb) p *frame->root 
$22 = {{all_frames = {next = 0xf153a0, prev = 0xf153a0}, {next_call = 0xf153a0, prev_call = 0xf153a0}}, pool = 0xf153a0, trans = 0xfd97f0, unique = 312967, 
  state = 0xf99ca0, uid = 0, gid = 0, pid = 31133, ngrps = 1, groups = {0 <repeats 16 times>}, lk_owner = 140412757649988, frames = {root = 0x7f7e53d32058, 
    parent = 0x0, next = 0x7f7e53fb7e04, prev = 0x0, local = 0x7f7e50bc404c, this = 0xf27640, ret = 0, ref_count = 1, lock = 1, cookie = 0x0, 
    complete = _gf_false, op = GF_FOP_NULL, begin = {tv_sec = 0, tv_usec = 0}, end = {tv_sec = 0, tv_usec = 0}, wind_from = 0x0, wind_to = 0x0, 
    unwind_from = 0x0, unwind_to = 0x0}, op = 8, type = 0 '\000'}
(gdb) p frame->parent->parent 
$23 = (call_frame_t *) 0x7f7e53fbcca0
(gdb) p frame->parent->parent->re
ref_count  ret        
(gdb) p frame->parent->parent->ret 
$24 = (ret_fn_t) 0x7f7e514f1ec5 <iot_getxattr_cbk>
(gdb) p frame->parent->parent->parent->ret 
$25 = (ret_fn_t) 0x7f7e512ca31d <marker_get_newpath_contribution>
(gdb) f 8
#8  0x00007f7e51b39907 in posix_getxattr (frame=0x7f7e53fb1534, this=0xf1ffb0, loc=0x7f7e53c8e258, 
    name=0x7f7e44077cd0 "trusted.glusterfs.quota.f0a65fa5-1966-4a6b-941f-808748082673.contri") at ../../../../../xlators/storage/posix/src/posix.c:2663
2663	                dict_unref (dict);
(gdb) p size
$26 = 18446744073709551615
(gdb) p (uint64_t) -1
$27 = 18446744073709551615

The crash is happening because even when size is -1, we trying to set dict

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


How reproducible:


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


Expected results:


Additional info:
Comment 1 Anand Avati 2012-01-03 12:29:16 EST
CHANGE: http://review.gluster.com/2555 (Avoid setting dict when size is -1) merged in master by Vijay Bellur (vijay@gluster.com)
Comment 2 Rahul C S 2012-04-05 07:07:16 EDT
No crashes observed.

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