Bug 761972 (GLUSTER-240)

Summary: segmentation fault in qr_readv
Product: [Community] GlusterFS Reporter: Raghavendra G <raghavendra>
Component: quick-readAssignee: Raghavendra G <raghavendra>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: mainline   
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 Raghavendra G 2009-09-01 18:00:43 UTC
#0  0xb7f3ca59 in qr_readv (frame=0x81d19e8, this=0x80d64e0, fd=0x81d1730, size=769, offset=0)
    at ../../../../../xlators/performance/quick-read/src/quick-read.c:759
#1  0xb7ca7034 in glusterfs_read_async (fd=0x81d1730, nbytes=769, offset=0, 
    readv_cbk=0xb7cb1075 <libgf_client_sendfile_read_cbk>, cbk_data=0xbff993f8)
    at ../../../libglusterfsclient/src/libglusterfsclient.c:4129
#2  0xb7cb12aa in glusterfs_sendfile (out_fd=15, in_fd=0x81d1730, offset=0xbff994f0, count=769)
    at ../../../libglusterfsclient/src/libglusterfsclient.c:7166
#3  0xb7f4dc6a in sendfile64 (out_fd=15, in_fd=16, offset=0xbff994f0, count=769)
    at ../../../booster/src/booster.c:2088
#4  0xb7eb5581 in apr_socket_sendfile (sock=0x81c9478, file=0x81ced40, hdtr=0xbff996c0, offset=0xbff99548, 
    len=0xbff99550, flags=0) at network_io/unix/sendrecv.c:329
#5  0x08078013 in sendfile_it_all (c=0x81c9a90, fd=0x81ced40, hdtr=0xbff996c0, file_offset=0, 
    file_bytes_left=769, total_bytes_left=1022, bytes_sent=0xbff996bc, flags=1) at core_filters.c:383
#6  0x08078c2b in ap_core_output_filter (f=0x81c9ab8, b=0x81d40f0) at core_filters.c:841
#7  0x08084955 in ap_pass_brigade (next=0x81c9ab8, bb=0x81cee70) at util_filter.c:526
#8  0x08098c7a in ap_http_outerror_filter (f=0x81ce230, b=0x81cee70) at http_filters.c:1643
#9  0x08084955 in ap_pass_brigade (next=0x81ce230, bb=0x81cee70) at util_filter.c:526
#10 0x08098569 in ap_http_header_filter (f=0x81ce218, b=0x81cee70) at http_filters.c:1306
#11 0x08084955 in ap_pass_brigade (next=0x81ce218, bb=0x81cee70) at util_filter.c:526
#12 0x0806c4eb in ap_content_length_filter (f=0x81ce200, b=0x81cee70) at protocol.c:1338
#13 0x08084955 in ap_pass_brigade (next=0x81ce200, bb=0x81cee70) at util_filter.c:526
#14 0x08099398 in ap_byterange_filter (f=0x81ce1e8, bb=0x81cee70) at byterange_filter.c:177
#15 0x08084955 in ap_pass_brigade (next=0x81ce1e8, bb=0x81cee70) at util_filter.c:526
#16 0x080733f4 in default_handler (r=0x81cd488) at core.c:3740
#17 0x080795b2 in ap_run_handler (r=0x81cd488) at config.c:157
#18 0x08079ce0 in ap_invoke_handler (r=0x81cd488) at config.c:372
#19 0x080955a7 in ap_process_request (r=0x81cd488) at http_request.c:282
#20 0x080927e6 in ap_process_http_connection (c=0x81c9610) at http_core.c:190
#21 0x08080d07 in ap_run_process_connection (c=0x81c9610) at connection.c:43
#22 0x0808110a in ap_process_connection (c=0x81c9610, csd=0x81c9478) at connection.c:178
#23 0x080abf7b in child_main (child_num_arg=0) at prefork.c:650
#24 0x080ac066 in make_child (s=0x811cdd8, slot=0) at prefork.c:690
#25 0x080ac550 in ap_mpm_run (_pconf=0x81181a0, plog=0x8156298, s=0x811cdd8) at prefork.c:966
(gdb) f 0
#0  0xb7f3ca59 in qr_readv (frame=0x81d19e8, this=0x80d64e0, fd=0x81d1730, size=769, offset=0)
    at ../../../../../xlators/performance/quick-read/src/quick-read.c:759
759                                             count = (op_ret / ctx->page_size) + 1; 
(gdb) l
754                                                             end =  offset + size;
755                                                     }
756                                             }
757
758                                             ctx = glusterfs_ctx_get ();
759                                             count = (op_ret / ctx->page_size) + 1; 
760                                             vector = CALLOC (count,
761                                                              sizeof (*vector));
762                                             if (vector == NULL) {
763                                                     op_ret = -1;
(gdb) p ctx
$3 = (glusterfs_ctx_t *) 0x0
(gdb) p glusterfs_ctx
$4 = (glusterfs_ctx_t *) 0x0

global glusterfs_ctx pointer is not set by libglusterfsclient.

Comment 1 Anand Avati 2009-09-08 07:23:07 UTC
PATCH: http://patches.gluster.com/patch/1209 in master (libglusterfsclient: set global glusterfs_ctx pointer during glusterfs_init)

Comment 2 Anand Avati 2009-09-17 05:28:28 UTC
PATCH: http://patches.gluster.com/patch/1317 in master (performance/quick-read: access glusterfs_ctx from xlator instead of using glusterfs_get_ctx)

Comment 3 Anand Avati 2009-09-17 05:28:32 UTC
PATCH: http://patches.gluster.com/patch/1318 in release-2.0 (performance/quick-read: access glusterfs_ctx from xlator instead of using glusterfs_get_ctx)