Bug 762205 (GLUSTER-473) - Trace misreporting pre/post attributes for setattr.
Summary: Trace misreporting pre/post attributes for setattr.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-473
Product: GlusterFS
Classification: Community
Component: trace
Version: 3.0.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Shehjar Tikoo
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-15 15:31 UTC by Jeff Darcy
Modified: 2010-03-04 11:12 UTC (History)
2 users (show)

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


Attachments (Terms of Use)

Description Jeff Darcy 2009-12-15 15:31:48 UTC
This looks like just a typo, but it causes the pre-attribute string to get overwritten by the post-attribute string and the post-attribute string to remain null.  This can cause a bit of confusion while trying to debug other problems.  ;)  Here's the one-line patch.

git diff -w xlators/debug/trace/src/trace.c
--- a/xlators/debug/trace/src/trace.c
+++ b/xlators/debug/trace/src/trace.c
@@ -505,7 +505,7 @@ trace_unlink_cbk (call_frame_t *frame,
        if (trace_fop_names[GF_FOP_UNLINK].enabled) {
                if (op_ret >= 0) {
                         preparentstr = trace_stat_to_str (preparent);
-                        preparentstr = trace_stat_to_str (postparent);
+                        postparentstr = trace_stat_to_str (postparent);
 
                        gf_log (this->name, GF_LOG_NORMAL,
                                "%"PRId64": (op_ret=%d, *preparent = {%s}, "

Comment 1 Shehjar Tikoo 2009-12-18 12:54:24 UTC
Thats correct. I have this and a bunch of other fixes to trace already in my private tree. I'll be sending them along with NFS patches in a couple of weeks.

Thanks for reporting.

Comment 2 Anand Avati 2010-01-23 19:30:55 UTC
PATCH: http://patches.gluster.com/patch/2687 in master (trace: multiple fixes)

Comment 3 Anand Avati 2010-03-04 08:12:40 UTC
PATCH: http://patches.gluster.com/patch/2826 in master (trace: Do not clobber own itable)

Comment 4 Anand Avati 2010-03-04 08:12:44 UTC
PATCH: http://patches.gluster.com/patch/2828 in master (trace: Print correct variable in lookup_cbk)

Comment 5 Anand Avati 2010-03-04 08:12:51 UTC
PATCH: http://patches.gluster.com/patch/2838 in master (trace: Print st_dev for struct stat)

Comment 6 Anand Avati 2010-03-04 08:12:54 UTC
PATCH: http://patches.gluster.com/patch/2829 in master (trace: Do not print results on failed readlink)

Comment 7 Anand Avati 2010-03-04 08:12:57 UTC
PATCH: http://patches.gluster.com/patch/2845 in master (trace: Display op_errno even on successful readv)


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