Bug 762346 (GLUSTER-614) - GlusterFS crashes while printing error if fsetxattr call fails in posix
Summary: GlusterFS crashes while printing error if fsetxattr call fails in posix
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-614
Product: GlusterFS
Classification: Community
Component: porting
Version: mainline
Hardware: x86_64
OS: All
medium
medium
Target Milestone: ---
Assignee: Pavan Vilas Sondur
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-14 17:56 UTC by Pavan Vilas Sondur
Modified: 2010-03-01 08:47 UTC (History)
3 users (show)

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


Attachments (Terms of Use)

Description Harshavardhana 2010-02-14 15:11:10 UTC
(In reply to comment #0)
> Crashes were observed with the following backtraces:
> 
> #0  0xfedc1997 in _lwp_kill () from /lib/libc.so.1
> #1  0xfedbaa0c in thr_kill () from /lib/libc.so.1
> #2  0xfed6ab7a in raise () from /lib/libc.so.1
> #3  0xfeec26b3 in gf_print_trace (signum=11) at common-utils.c:467
> #4  0xfedbd0af in __sighndlr () from /lib/libc.so.1
> #5  0xfedb01af in call_user_handler () from /lib/libc.so.1
> #6  <signal handler called>
> #7  0xfed34790 in countbytes () from /lib/libc.so.1
> #8  0xfeed4c47 in vasprintf (result=0xfdf0cccc, 
>     format=0xfeca64e4 "setxattr failed on %s while doing xattrop: key=%s (%s)",
> args=0xfdf0ce1c "")
>     at compat.c:468
This is due to over flow due to wrong casting. I would believe fixing all the warnings printed during build should fix this issue. This error was seen earlier too where solaris server would segfault when ran with loglevel=DEBUG

> #9  0xfeeba86d in _gf_log (domain=0x8073118 "posix1", file=0xfeca53fe
> "posix.c", 
>     function=0xfeca63e9 "do_xattrop", line=3760, level=GF_LOG_ERROR, 
>     fmt=0xfeca64e4 "setxattr failed on %s while doing xattrop: key=%s (%s)") at
> logging.c:502

Comment 1 Pavan Vilas Sondur 2010-02-14 17:56:57 UTC
Crashes were observed with the following backtraces:

#0  0xfedc1997 in _lwp_kill () from /lib/libc.so.1
#1  0xfedbaa0c in thr_kill () from /lib/libc.so.1
#2  0xfed6ab7a in raise () from /lib/libc.so.1
#3  0xfeec26b3 in gf_print_trace (signum=11) at common-utils.c:467
#4  0xfedbd0af in __sighndlr () from /lib/libc.so.1
#5  0xfedb01af in call_user_handler () from /lib/libc.so.1
#6  <signal handler called>
#7  0xfed34790 in countbytes () from /lib/libc.so.1
#8  0xfeed4c47 in vasprintf (result=0xfdf0cccc, 
    format=0xfeca64e4 "setxattr failed on %s while doing xattrop: key=%s (%s)", args=0xfdf0ce1c "")
    at compat.c:468
#9  0xfeeba86d in _gf_log (domain=0x8073118 "posix1", file=0xfeca53fe "posix.c", 
    function=0xfeca63e9 "do_xattrop", line=3760, level=GF_LOG_ERROR, 
    fmt=0xfeca64e4 "setxattr failed on %s while doing xattrop: key=%s (%s)") at logging.c:502
#10 0xfeca0a53 in do_xattrop (frame=0x8146148, this=0x80b8248, loc=0x0, fd=0x8142700, 
    optype=GF_XATTROP_ADD_ARRAY, xattr=0x8139438) at posix.c:3757
#11 0xfeca0c33 in posix_fxattrop (frame=0x8146148, this=0x80b8248, fd=0x8142700, optype=GF_XATTROP_ADD_ARRAY, 
    xattr=0x8139438) at posix.c:3808
#12 0xfeebec77 in default_fxattrop (frame=0x814acf8, this=0x80b8920, fd=0x8142700, flags=GF_XATTROP_ADD_ARRAY, 
    dict=0x8139438) at defaults.c:1009
#13 0xfec3b830 in iot_fxattrop_wrapper (frame=0x813e378, this=0x80b89b8, fd=0x8142700, 
    optype=GF_XATTROP_ADD_ARRAY, xattr=0x8139438) at io-threads.c:2159
#14 0xfeed07e8 in call_resume_wind (stub=0x81499d8) at call-stub.c:2742
#15 0xfeed41b8 in call_resume (stub=0x81499d8) at call-stub.c:4304
#16 0xfec3bcc3 in iot_worker_ordered (arg=0x80bfed8) at io-threads.c:2338
#17 0xfedbcd56 in _thrp_setup () from /lib/libc.so.1
#18 0xfedbcfe0 in __csigsetjmp () from /lib/libc.so.1
#19 0x00000000 in ?? ()

Comment 2 Anand Avati 2010-02-22 08:40:07 UTC
PATCH: http://patches.gluster.com/patch/2797 in master (storage/posix: Check for path before logging it in case of an error in xattrop FOP.)

Comment 3 Anand Avati 2010-02-22 08:40:11 UTC
PATCH: http://patches.gluster.com/patch/2798 in release-3.0 (storage/posix: Check for path before logging it in case of an error in xattrop FOP.)


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