Bug 1703629
Summary: | statedump is not capturing info related to glusterd | |||
---|---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Sanju <srakonde> | |
Component: | glusterd | Assignee: | Sanju <srakonde> | |
Status: | CLOSED NEXTRELEASE | QA Contact: | ||
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | mainline | CC: | bugs | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1703759 (view as bug list) | Environment: | ||
Last Closed: | 2019-04-28 07:07:30 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1703759 |
Description
Sanju
2019-04-27 01:59:54 UTC
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@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 REVIEW: https://review.gluster.org/22640 (glusterd: add glusterd information in statedump) posted (#1) for review on master by Sanju Rakonde REVIEW: https://review.gluster.org/22640 (glusterd: define dumpops in the xlator_api of glusterd) merged (#2) on master by Sanju Rakonde |