[Bugs] [Bug 1236032] Tiering: unlink failed with error "Invaid argument"

bugzilla at redhat.com bugzilla at redhat.com
Mon Jul 6 07:35:47 UTC 2015


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

Joseph Elwin Fernandes <josferna at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|josferna at redhat.com         |dlambrig at redhat.com



--- Comment #2 from Joseph Elwin Fernandes <josferna at redhat.com> ---
This issue is due to the NULL cached_subvolume in hot-dht xlator after tiering
translator. Had a discussion with Dan on this he said he has a fix for this as
he has dealt with this issue for other FOPS. This issue also happens for
getxattr "trusted.distribute.linkinfo". 


BT when break point at : dht_unlink_linkfile_cbk

(gdb) bt
#0  dht_unlink_linkfile_cbk (frame=0x7fddb40086dc, cookie=0x7fddb400796c,
this=0x7fddbc0162d0, op_ret=-1, 
    op_errno=22, preparent=0x0, postparent=0x0, xdata=0x0) at dht-common.c:2403
#1  0x00007fddc9598b5a in dht_unlink (frame=0x7fddb400796c,
this=0x7fddbc015510, loc=0x7fddb400625c, xflag=0, 
    xdata=0x0) at dht-common.c:5208
#2  0x00007fddc9598798 in dht_unlink (frame=0x7fddb40086dc,
this=0x7fddbc0162d0, loc=0x7fddb400625c, xflag=0, 
    xdata=0x0) at dht-common.c:5196
#3  0x00007fddd6af96c9 in default_unlink (frame=0x7fddb40086dc,
this=0x7fddbc017b70, loc=0x7fddb400625c, xflag=0, 
    xdata=0x0) at defaults.c:1910
#4  0x00007fddd6af96c9 in default_unlink (frame=0x7fddb40086dc,
this=0x7fddbc0189b0, loc=0x7fddb400625c, xflag=0, 
    xdata=0x0) at defaults.c:1910
#5  0x00007fddd6af96c9 in default_unlink (frame=0x7fddb40086dc,
this=0x7fddbc019720, loc=0x7fddb400625c, xflag=0, 
    xdata=0x0) at defaults.c:1910
#6  0x00007fddd6af5364 in default_unlink_resume (frame=0x7fddb40058ec,
this=0x7fddbc01a550, loc=0x7fddb400625c, 
    xflag=0, xdata=0x0) at defaults.c:1469
#7  0x00007fddd6b16817 in call_resume_wind (stub=0x7fddb400621c) at
call-stub.c:2083
#8  0x00007fddd6b1ef1e in call_resume (stub=0x7fddb400621c) at call-stub.c:2571
#9  0x00007fddc8d21a58 in open_and_resume (this=0x7fddbc01a550, fd=0x0,
stub=0x7fddb400621c) at open-behind.c:242
#10 0x00007fddc8d2468f in ob_unlink (frame=0x7fddb40058ec, this=0x7fddbc01a550,
loc=0x7fddb40016e0, xflags=0, 
    xdata=0x0) at open-behind.c:768
#11 0x00007fddc8b12c6b in mdc_unlink (frame=0x7fddb40056fc,
this=0x7fddbc01b310, loc=0x7fddb40016e0, xflag=0, 
    xdata=0x0) at md-cache.c:1205
#12 0x00007fddc88fda67 in io_stats_unlink (frame=0x7fddb40055fc,
this=0x7fddbc01c0d0, loc=0x7fddb40016e0, xflag=0, 
    xdata=0x0) at io-stats.c:2002
#13 0x00007fddd6af96c9 in default_unlink (frame=0x7fddb40055fc,
this=0x7fddbc01d170, loc=0x7fddb40016e0, xflag=0, 
    xdata=0x0) at defaults.c:1910
#14 0x00007fddcdef230b in fuse_unlink_resume (state=0x7fddb40016c0) at
fuse-bridge.c:1568
#15 0x00007fddcdeebe47 in fuse_fop_resume (state=0x7fddb40016c0) at
fuse-bridge.c:536
#16 0x00007fddcdee9b49 in fuse_resolve_done (state=0x7fddb40016c0) at
fuse-resolve.c:637
#17 0x00007fddcdee9c1f in fuse_resolve_all (state=0x7fddb40016c0) at
fuse-resolve.c:664
#18 0x00007fddcdee9b2a in fuse_resolve (state=0x7fddb40016c0) at
fuse-resolve.c:628
#19 0x00007fddcdee9bf6 in fuse_resolve_all (state=0x7fddb40016c0) at
fuse-resolve.c:660
#20 0x00007fddcdee9c7d in fuse_resolve_continue (state=0x7fddb40016c0) at
fuse-resolve.c:680
#21 0x00007fddcdee9041 in fuse_resolve_parent (state=0x7fddb40016c0) at
fuse-resolve.c:290
#22 0x00007fddcdee9afa in fuse_resolve (state=0x7fddb40016c0) at
fuse-resolve.c:621
#23 0x00007fddcdee9ba1 in fuse_resolve_all (state=0x7fddb40016c0) at
fuse-resolve.c:653
#24 0x00007fddcdee9cbb in fuse_resolve_and_resume (state=0x7fddb40016c0,
fn=0x7fddcdef1e94 <fuse_unlink_resume>)
    at fuse-resolve.c:692
#25 0x00007fddcdef240c in fuse_unlink (this=0x20a0be0, finh=0x7fddb4008d30,
msg=0x7fddb4008d58)
    at fuse-bridge.c:1582
#26 0x00007fddcdf02087 in fuse_thread_proc (data=0x20a0be0) at
fuse-bridge.c:4879
#27 0x00007fddd593652a in start_thread () from /lib64/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#28 0x00007fddd528522d in clone () from /lib64/libc.so.6


Point to be noted here is cached_subvol is NULL and hence op_errno is set to
EINVAL

#1  0x00007fddc9598b5a in dht_unlink (frame=0x7fddb400796c,
this=0x7fddbc015510, loc=0x7fddb400625c, xflag=0, 
    xdata=0x0) at dht-common.c:5208
5208            DHT_STACK_UNWIND (unlink, frame, -1, op_errno, NULL, NULL,
NULL);
(gdb) p hashed_subvol
$8 = (xlator_t *) 0x7fddbc012f70

(gdb) p cached_subvol
$3 = (xlator_t *) 0x0

(gdb) p op_errno
$4 = 22

(gdb) p local
$6 = (dht_local_t *) 0x7fddb4008e5c

(gdb) p local->cached_subvol
$7 = (xlator_t *) 0x0
(gdb)

(gdb) p this->name
$9 = 0x7fddbc00c6a0 "test-hot-dht"
(gdb) 



dht_local_init (frame, loc, NULL, GF_FOP_UNLINK); in line 5170 of dht-common.c
has failed to populate cached_subvol.  dht_subvol_get_cached() seems to be
broken for hot-dht xaltor.

when looked into 
dht_subvol_get_cached (this=0x7fddbc015510, inode=0x7fddbc03b70c) at
dht-helper.c:626
626            dht_layout_t *layout = NULL;
(gdb) bt
#0  dht_subvol_get_cached (this=0x7fddbc015510, inode=0x7fddbc03b70c) at
dht-helper.c:626
#1  0x00007fddc955ae7d in dht_local_init (frame=0x7fddb400751c,
loc=0x7fddb400654c, fd=0x0, fop=GF_FOP_UNLINK)
    at dht-helper.c:498
#2  0x00007fddc95984b3 in dht_unlink (frame=0x7fddb400751c,
this=0x7fddbc015510, loc=0x7fddb400654c, xflag=0, 
    xdata=0x0) at dht-common.c:5170
#3  0x00007fddc9598798 in dht_unlink (frame=0x7fddb400741c,
this=0x7fddbc0162d0, loc=0x7fddb400654c, xflag=0, 
    xdata=0x0) at dht-common.c:5196
#4  0x00007fddd6af96c9 in default_unlink (frame=0x7fddb400741c,
this=0x7fddbc017b70, loc=0x7fddb400654c, xflag=0, 
    xdata=0x0) at defaults.c:1910
#5  0x00007fddd6af96c9 in default_unlink (frame=0x7fddb400741c,
this=0x7fddbc0189b0, loc=0x7fddb400654c, xflag=0, 
    xdata=0x0) at defaults.c:1910
#6  0x00007fddd6af96c9 in default_unlink (frame=0x7fddb400741c,
this=0x7fddbc019720, loc=0x7fddb400654c, xflag=0, 
    xdata=0x0) at defaults.c:1910
#7  0x00007fddd6af5364 in default_unlink_resume (frame=0x7fddb400640c,
this=0x7fddbc01a550, loc=0x7fddb400654c

627            xlator_t     *subvol = NULL;
(gdb) 
629            GF_VALIDATE_OR_GOTO (this->name, this, out);
(gdb) 
630            GF_VALIDATE_OR_GOTO (this->name, inode, out);
(gdb) 
632            layout = dht_layout_get (this, inode);
(gdb) n
634            if (!layout) {
(gdb) p layout
$18 = (dht_layout_t *) 0x0
(gdb) p this->name
$19 = 0x7fddbc00c6a0 "test-hot-dht"
(gdb)

dht_layout_get return NULL. As a result dht_subvol_get_cached also return NULL.

When looked deeper we see dht_inode_ctx_t is NULL!

Breakpoint 1, dht_subvol_get_cached (this=0x7fddbc015510, inode=0x7fddbc03b70c)
at dht-helper.c:626
626            dht_layout_t *layout = NULL;
(gdb) n
627            xlator_t     *subvol = NULL;
(gdb) n
629            GF_VALIDATE_OR_GOTO (this->name, this, out);
(gdb) n
630            GF_VALIDATE_OR_GOTO (this->name, inode, out);
(gdb) n
632            layout = dht_layout_get (this, inode);
(gdb) s
dht_layout_get (this=0x7fddbc015510, inode=0x7fddbc03b70c) at dht-layout.c:65
65            dht_conf_t   *conf = NULL;
(gdb) n
66            dht_layout_t *layout = NULL;
(gdb) n
67            int           ret = 0;
(gdb) n
69            conf = this->private;
(gdb) n
70            if (!conf)
(gdb) n
73            LOCK (&conf->layout_lock);
(gdb) n
75                    ret = dht_inode_ctx_layout_get (inode, this, &layout);
(gdb) s
dht_inode_ctx_layout_get (inode=0x7fddbc03b70c, this=0x7fddbc015510,
layout=0x7fddc37fd678) at dht-common.c:6981
6981            dht_inode_ctx_t         *ctx            = NULL;
(gdb) n
6982            int                      ret            = -1;
(gdb) n
6984            ret = dht_inode_ctx_get (inode, this, &ctx);
(gdb) n
6986            if (!ret && ctx) {
(gdb) p ctx
$10 = (dht_inode_ctx_t *) 0x0
(gdb)

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


More information about the Bugs mailing list