[Bugs] [Bug 1703629] statedump is not capturing info related to glusterd

bugzilla at redhat.com bugzilla at redhat.com
Sat Apr 27 02:14:03 UTC 2019


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

Sanju <srakonde at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|bugs at gluster.org            |srakonde at redhat.com



--- Comment #1 from Sanju <srakonde at redhat.com> ---
RCA:

(gdb) b gf_proc_dump_single_xlator_info
Breakpoint 1 at 0x7f19954b7e20: file statedump.c, line 480.
(gdb) c
Continuing.
[Switching to Thread 0x7f198bb2f700 (LWP 10078)]

Thread 3 "glfs_sigwait" hit Breakpoint 1, gf_proc_dump_single_xlator_info
(trav=trav at entry=0x133ae30)
    at statedump.c:480
480     {
(gdb) n
482         char itable_key[1024] = {
(gdb) 
480     {
(gdb) 
482         char itable_key[1024] = {
(gdb) 
480     {
(gdb) 
481         glusterfs_ctx_t *ctx = trav->ctx;
(gdb) 
482         char itable_key[1024] = {
(gdb) 
486         if (trav->cleanup_starting)
(gdb) 
489         if (ctx->measure_latency)
(gdb) 
490             gf_proc_dump_latency_info(trav);
(gdb) 
492         gf_proc_dump_xlator_mem_info(trav);
(gdb) 
494         if (GF_PROC_DUMP_IS_XL_OPTION_ENABLED(inode) && (trav->itable)) {
(gdb) 
499         if (!trav->dumpops) {
(gdb) l
494         if (GF_PROC_DUMP_IS_XL_OPTION_ENABLED(inode) && (trav->itable)) {
495             snprintf(itable_key, sizeof(itable_key), "%d.%s.itable",
ctx->graph_id,
496                      trav->name);
497         }
498     
499         if (!trav->dumpops) {
500             return;
501         }
502     
503         if (trav->dumpops->priv && GF_PROC_DUMP_IS_XL_OPTION_ENABLED(priv))
(gdb) p trav->dumpops
$3 = (struct xlator_dumpops *) 0x0
(gdb) c
Continuing.

In gf_proc_dump_single_xlator_info() trav->dumpops is null and function is
returned to caller at line #500.

If we look at xlator_api in glusterd.c file, we missed giving .dumpops value
here. That's why trav->dumpops is null.
xlator_api_t xlator_api = {
    .init = init,
    .fini = fini,
    .mem_acct_init = mem_acct_init,
    .op_version = {1}, /* Present from the initial version */
    .fops = &fops,
    .cbks = &cbks,
    .options = options,
    .identifier = "glusterd",
    .category = GF_MAINTAINED,
};

We have defined dumpops as below. we should add this information in xlator api.
struct xlator_dumpops dumpops = {
    .priv = glusterd_dump_priv,
};

xlator_api_t xlator_api = {
    .init = init,
    .fini = fini,
    .mem_acct_init = mem_acct_init,
    .op_version = {1}, /* Present from the initial version */
    .dumpops = &dumpops,  //added here, now trav->dumpops won't be null for
glusterd
    .fops = &fops,
    .cbks = &cbks,
    .options = options,
    .identifier = "glusterd",
    .category = GF_MAINTAINED,
};

Thanks,
Sanju

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


More information about the Bugs mailing list