[Bugs] [Bug 1717757] BItrot: Segmentation Fault if bitrot stub do signature

bugzilla at redhat.com bugzilla at redhat.com
Thu Jun 6 06:57:25 UTC 2019


https://bugzilla.redhat.com/show_bug.cgi?id=1717757

Amar Tumballi <atumball at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |atumball at redhat.com



--- Comment #1 from Amar Tumballi <atumball at redhat.com> ---
Not sure why this happened, because, for bitrot, a fsetxattr() call shouldn't
come at all if fd is NULL. It should have been prevented at higher level
itself.


I found the reason after digging a bit. Ideally, in case of failure (here,
worm_create_cbk() received -1, which means fd is NULL), one shouldn't consume
fd and call fsetxattr(). If there is a need to do a xattr op in failure, then
one should call setxattr with 'loc' passed in create() call. (you can store it
in local).

----
#0  br_stub_fsetxattr (frame=0x7f89b846a6e8, this=0x7f89ec015c00, fd=0x0,
dict=0x7f89b84e9ad8, flags=0, xdata=0x0) at bit-rot-stub.c:1328
        ret = 0
        val = 0
        sign = 0x0
        priv = 0x7f89ec07ed60
        op_errno = 22
        __FUNCTION__ = "br_stub_fsetxattr"
#1  0x00007f89faaf9f8e in default_fsetxattr () from
/usr/lib64/libglusterfs.so.0
No symbol table info available.
#2  0x00007f89f1e68636 in pl_fsetxattr (frame=0x7f89b825ab48,
this=0x7f89ec0194a0, fd=0x0, dict=0x7f89b84e9ad8, flags=0, xdata=0x0) at
posix.c:1566
        _new = 0x7f89b846a6e8
        old_THIS = 0x7f89ec0194a0
        next_xl_fn = 0x7f89faaf9ec0 <default_fsetxattr>
        tmp_cbk = 0x7f89f1e56680 <pl_fsetxattr_cbk>
        op_ret = <optimized out>
        op_errno = 0
        lockinfo_buf = 0x0
        len = 0
        __FUNCTION__ = "pl_fsetxattr"
#3  0x00007f89faaf9f8e in default_fsetxattr () from
/usr/lib64/libglusterfs.so.0
No symbol table info available.
#4  0x00007f89faab319b in syncop_fsetxattr () from /usr/lib64/libglusterfs.so.0
No symbol table info available.
#5  0x00007f89f1c3d901 in worm_create_cbk (frame=frame at entry=0x7f89b8302fe8,
cookie=<optimized out>, this=<optimized out>, op_ret=op_ret at entry=-1,
op_errno=op_errno at entry=13, 
    fd=fd at entry=0x0, inode=0x0, buf=0x0, preparent=0x0, postparent=0x0,
xdata=0x0) at worm.c:492
        ret = 0
        priv = 0x7f89ec074b38
        dict = 0x7f89b84e9ad8
        __FUNCTION__ = "worm_create_cbk"
----

Hopefully this helps.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are the Docs Contact for the bug.


More information about the Bugs mailing list