Bug 762469 (GLUSTER-737) - uint32_t ia_atime crashes
Summary: uint32_t ia_atime crashes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-737
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Raghavendra G
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-18 11:20 UTC by Raghavendra Bhat
Modified: 2015-12-01 16:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Raghavendra Bhat 2010-03-18 11:20:25 UTC
The ia_atime type is uin32_t. When trace translator is used and it accesses ia_atime in strftime the client process crashes. This is the backtrace of the core obtained.

[?1034hGNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-slackware-linux"...

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /usr/local/lib/libglusterfs.so.0...done.
Loaded symbols for /usr/local/lib/libglusterfs.so.0
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libpthread.so.0...done.
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /usr/local/lib/glusterfs/3.0.0git/xlator/protocol/client.so...done.
Loaded symbols for /usr/local/lib/glusterfs/3.0.0git/xlator/protocol/client.so
Reading symbols from /usr/local/lib/glusterfs/3.0.0git/xlator/performance/write-behind.so...done.
Loaded symbols for /usr/local/lib/glusterfs/3.0.0git/xlator/performance/write-behind.so
Reading symbols from /usr/local/lib/glusterfs/3.0.0git/xlator/performance/read-ahead.so...done.
Loaded symbols for /usr/local/lib/glusterfs/3.0.0git/xlator/performance/read-ahead.so
Reading symbols from /usr/local/lib/glusterfs/3.0.0git/xlator/performance/io-cache.so...done.
Loaded symbols for /usr/local/lib/glusterfs/3.0.0git/xlator/performance/io-cache.so
Reading symbols from /usr/local/lib/glusterfs/3.0.0git/xlator/performance/quick-read.so...done.
Loaded symbols for /usr/local/lib/glusterfs/3.0.0git/xlator/performance/quick-read.so
Reading symbols from /usr/local/lib/glusterfs/3.0.0git/xlator/debug/trace.so...done.
Loaded symbols for /usr/local/lib/glusterfs/3.0.0git/xlator/debug/trace.so
Reading symbols from /usr/local/lib/glusterfs/3.0.0git/xlator/performance/stat-prefetch.so...done.
Loaded symbols for /usr/local/lib/glusterfs/3.0.0git/xlator/performance/stat-prefetch.so
Reading symbols from /usr/local/lib/glusterfs/3.0.0git/xlator/mount/fuse.so...done.
Loaded symbols for /usr/local/lib/glusterfs/3.0.0git/xlator/mount/fuse.so
Reading symbols from /usr/local/lib/glusterfs/3.0.0git/transport/socket.so...done.
Loaded symbols for /usr/local/lib/glusterfs/3.0.0git/transport/socket.so
Reading symbols from /lib64/libnss_files.so.2...done.
Loaded symbols for /lib64/libnss_files.so.2
Reading symbols from /usr/lib64/libgcc_s.so.1...done.
Loaded symbols for /usr/lib64/libgcc_s.so.1
Core was generated by `glusterfs -f client-server-tcp.vol /d/glusterfs/mnt/client1/ -l /tmp/new_client'.
Program terminated with signal 11, Segmentation fault.
[New process 15699]
[New process 15705]
[New process 15700]
#0  0x00007f27da096aa1 in __strftime_internal () from /lib64/libc.so.6
(gdb) bt
#0  0x00007f27da096aa1 in __strftime_internal () from /lib64/libc.so.6
#1  0x00007f27da098906 in strftime_l () from /lib64/libc.so.6
#2  0x00007f27d8b8585a in trace_stat_to_str (stbuf=0x7fff4e169950) at ../../../../../xlators/debug/trace/src/trace.c:71
#3  0x00007f27d8b881f4 in trace_lookup_cbk (frame=0x617e90, cookie=0x617d50, this=0x612ae0, op_ret=0, op_errno=22, 
    inode=0x6146a0, buf=0x7fff4e169950, xattr=0x617d10, postparent=0x7fff4e1698e0)
    at ../../../../../xlators/debug/trace/src/trace.c:606
#4  0x00007f27d8d98235 in qr_lookup_cbk (frame=0x617d50, cookie=0x617be0, this=0x612110, op_ret=0, op_errno=22, 
    inode=0x6146a0, buf=0x7fff4e169950, dict=0x617d10, postparent=0x7fff4e1698e0)
    at ../../../../../xlators/performance/quick-read/src/quick-read.c:243
#5  0x00007f27d8fa6787 in ioc_lookup_cbk (frame=0x617be0, cookie=0x617c40, this=0x611740, op_ret=0, op_errno=22, 
    inode=0x6146a0, stbuf=0x7fff4e169950, dict=0x617d10, postparent=0x7fff4e1698e0)
    at ../../../../../xlators/performance/io-cache/src/io-cache.c:249
#6  0x00007f27da7a3669 in default_lookup_cbk (frame=0x617c40, cookie=0x618350, this=0x610e30, op_ret=0, op_errno=22, 
    inode=0x6146a0, buf=0x7fff4e169950, dict=0x617d10, postparent=0x7fff4e1698e0)
    at ../../../libglusterfs/src/defaults.c:47
#7  0x00007f27da7a3669 in default_lookup_cbk (frame=0x618350, cookie=0x6183b0, this=0x610500, op_ret=0, op_errno=22, 
    inode=0x6146a0, buf=0x7fff4e169950, dict=0x617d10, postparent=0x7fff4e1698e0)
    at ../../../libglusterfs/src/defaults.c:47
#8  0x00007f27d95e9ff3 in client_lookup_cbk (frame=0x6183b0, hdr=0x617fe0, hdrlen=276, iobuf=0x0)
    at ../../../../../xlators/protocol/client/src/client-protocol.c:4975
#9  0x00007f27d95ee820 in protocol_client_interpret (this=0x60f840, trans=0x6157d0, hdr_p=0x617fe0 "", hdrlen=276, 
    iobuf=0x0) at ../../../../../xlators/protocol/client/src/client-protocol.c:6529
#10 0x00007f27d95ef4e6 in protocol_client_pollin (this=0x60f840, trans=0x6157d0)
    at ../../../../../xlators/protocol/client/src/client-protocol.c:6827
#11 0x00007f27d95efb5a in notify (this=0x60f840, event=2, data=0x6157d0)
    at ../../../../../xlators/protocol/client/src/client-protocol.c:6946
#12 0x00007f27da7a12ac in xlator_notify (xl=0x60f840, event=2, data=0x6157d0) at ../../../libglusterfs/src/xlator.c:924
#13 0x00007f27d7d4706f in socket_event_poll_in (this=0x6157d0) at ../../../../transport/socket/src/socket.c:731
#14 0x00007f27d7d47369 in socket_event_handler (fd=9, idx=1, data=0x6157d0, poll_in=1, poll_out=0, poll_err=0)
    at ../../../../transport/socket/src/socket.c:831
#15 0x00007f27da7c707f in event_dispatch_epoll_handler (event_pool=0x60b060, events=0x616ca0, i=0)
    at ../../../libglusterfs/src/event.c:804
#16 0x00007f27da7c724e in event_dispatch_epoll (event_pool=0x60b060) at ../../../libglusterfs/src/event.c:867
#17 0x00007f27da7c755f in event_dispatch (event_pool=0x60b060) at ../../../libglusterfs/src/event.c:975
#18 0x0000000000406310 in main (argc=6, argv=0x7fff4e16a608) at ../../../glusterfsd/src/glusterfsd.c:1417
(gdb) f 2
#2  0x00007f27d8b8585a in trace_stat_to_str (stbuf=0x7fff4e169950) at ../../../../../xlators/debug/trace/src/trace.c:71
71	        strftime (atime_buf, 256, "[%b %d %H:%M:%S]",
(gdb) q

changing ia_atime to unit64_t worked properly.

Comment 1 Vijay Bellur 2010-09-06 13:37:28 UTC
PATCH: http://patches.gluster.com/patch/4578 in master (debug/trace: use uint64_t variable while using localtime.)


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