Bug 761836 (GLUSTER-104)

Summary: touch segfaults glusterfs 2.0.3-rc1
Product: [Community] GlusterFS Reporter: Pavan Vilas Sondur <pavan>
Component: write-behindAssignee: Basavanagowda Kanur <gowda>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: urgent    
Version: mainlineCC: amarts, gluster-bugs, shehjart
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Shehjar Tikoo 2009-07-02 06:30:10 UTC
This crash is present in mainline also, not just 2.0.3rc1.

I confirm that the patch below fixes it.

http://patches.gluster.com/patch/667/

I am investigating if this particular crash is related to a recent io-threads crash reported at: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=102

-Shehjar

Comment 1 Pavan Vilas Sondur 2009-07-02 07:21:00 UTC
creating a file on the mount point is segfaulting glusterfs. open and create will lead to segfault. Identified as a bug in write-behind.

(gdb) bt
#0  0x0000003b8c874c7b in free () from /lib64/libc.so.6
#1  0x00002ab000c8cc88 in FRAME_DESTROY (frame=0x12399e10) at ../../../../../libglusterfs/src/stack.h:108
#2  0x00002ab000c8cba0 in STACK_DESTROY (stack=0x12399f80) at ../../../../../libglusterfs/src/stack.h:130
#3  0x00002ab000c918b9 in fuse_create_cbk (frame=0x12399fc0, cookie=0x12399e10, this=0x12383bc0, op_ret=0, op_errno=0, fd=0x12397350, inode=0x1239c8f0, buf=0x1239d770)
    at ../../../../../xlators/mount/fuse/src/fuse-bridge.c:1370
#4  0x00002ab000a83b27 in wb_create_cbk (frame=0x12399e10, cookie=0x1239b790, this=0x1238b6e0, op_ret=0, op_errno=0, fd=0x12397350, inode=0x1239c8f0, buf=0x1239d770)
    at ../../../../../xlators/performance/write-behind/src/write-behind.c:981
#5  0x00002ab00087521d in dht_create_cbk (frame=0x1239b790, cookie=0x12399510, this=0x1238adb0, op_ret=0, op_errno=0, fd=0x12397350, inode=0x1239c8f0, stbuf=0x1239d770)
    at ../../../../../xlators/cluster/dht/src/dht-common.c:2722
#6  0x00002ab00062bcfb in afr_create_unwind (frame=0x12398fa0, this=0x1238ab60) at ../../../../../xlators/cluster/afr/src/afr-dir-write.c:94
#7  0x00002ab00062bf5a in afr_create_wind_cbk (frame=0x12398fa0, cookie=0x1, this=0x1238ab60, op_ret=0, op_errno=0, fd=0x12397350, inode=0x1239c8f0, buf=0x7fffab17df50)
    at ../../../../../xlators/cluster/afr/src/afr-dir-write.c:179
#8  0x00002ab00040d243 in client_create_cbk (frame=0x12397060, hdr=0x12397a50, hdrlen=116, iobuf=0x0) at ../../../../../xlators/protocol/client/src/client-protocol.c:3867
#9  0x00002ab000412004 in protocol_client_interpret (this=0x12389bc0, trans=0x12393660, hdr_p=0x12397a50 "", hdrlen=116, iobuf=0x0)
    at ../../../../../xlators/protocol/client/src/client-protocol.c:5878
#10 0x00002ab000412c7c in protocol_client_pollin (this=0x12389bc0, trans=0x12393660) at ../../../../../xlators/protocol/client/src/client-protocol.c:6169
#11 0x00002ab000412e10 in notify (this=0x12389bc0, event=2, data=0x12393660) at ../../../../../xlators/protocol/client/src/client-protocol.c:6213
#12 0x00002aaaaaaaeba4 in socket_event_poll_in (this=0x12393660) at ../../../../transport/socket/src/socket.c:714
#13 0x00002aaaaaaaeea2 in socket_event_handler (fd=18, idx=11, data=0x12393660, poll_in=1, poll_out=0, poll_err=0) at ../../../../transport/socket/src/socket.c:814
#14 0x00002aafff95df7d in event_dispatch_epoll_handler (event_pool=0x12383680, events=0x12395b90, i=0) at ../../../libglusterfs/src/event.c:804
#15 0x00002aafff95e152 in event_dispatch_epoll (event_pool=0x12383680) at ../../../libglusterfs/src/event.c:867
#16 0x00002aafff95e468 in event_dispatch (event_pool=0x12383680) at ../../../libglusterfs/src/event.c:975
#17 0x0000000000405349 in main (argc=6, argv=0x7fffab17eb08) at ../../../glusterfsd/src/glusterfsd.c:1224
(gdb) f 4
#4  0x00002ab000a83b27 in wb_create_cbk (frame=0x12399e10, cookie=0x1239b790, this=0x1238b6e0, op_ret=0, op_errno=0, fd=0x12397350, inode=0x1239c8f0, buf=0x1239d770)
    at ../../../../../xlators/performance/write-behind/src/write-behind.c:981
981             STACK_UNWIND (frame, op_ret, op_errno, fd, inode, buf);
(gdb) l
976                     }
977
978                     LOCK_INIT (&file->lock);
979             }
980
981             STACK_UNWIND (frame, op_ret, op_errno, fd, inode, buf);
982             return 0;
983     }
984
985

gdb) l wb_create
984
985
986     int32_t
987     wb_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
988                mode_t mode, fd_t *fd)
989     {
990             frame->local = (void *)(long)flags;  <<<<<
991
992             STACK_WIND (frame,
993                         wb_create_cbk,


Same case in wb_open as well.

Comment 2 Amar Tumballi 2009-07-02 12:29:29 UTC
(In reply to comment #1)
> I am investigating if this particular crash is related to a recent io-threads
> crash reported at:
> http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=102
> 
> -Shehjar

Shehjar,
 This bug got in from patch http://patches.gluster.com/patch/658/ which got in just yesterday. Hence I doubt that it fixes or causes the crash reported in gluster-devel mailing list.

Regards,

Comment 3 Shehjar Tikoo 2009-07-04 05:47:24 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > I am investigating if this particular crash is related to a recent io-threads
> > crash reported at:
> > http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=102
> > 
> > -Shehjar
> 
> Shehjar,
>  This bug got in from patch http://patches.gluster.com/patch/658/ which got in
> just yesterday. Hence I doubt that it fixes or causes the crash reported in
> gluster-devel mailing list.
> 
> Regards,

Oh ok. Thanks for that.

-Shehjar

Comment 4 Basavanagowda Kanur 2009-07-04 12:30:23 UTC
fixed by http://patches.gluster.com/patch/667/

--
Gowda