[Bugs] [Bug 1762438] DHT- gluster rebalance status shows wrong data size after rebalance is completed successfully
bugzilla at redhat.com
bugzilla at redhat.com
Thu Oct 17 02:51:20 UTC 2019
https://bugzilla.redhat.com/show_bug.cgi?id=1762438
--- Comment #3 from Nithya Balachandran <nbalacha at redhat.com> ---
RCA:
--- Additional comment from Sanju on 2019-10-16 15:28:22 IST ---
Looks like this is a day1 issue.
>From gdb:
glusterd_store_retrieve_node_state (volinfo=volinfo at entry=0x555555e67fc0) at
glusterd-store.c:2980
2980 volinfo->rebal.rebalance_data = atoi(value);
4: value = 0x5555557dfea0 "3145728000"
3: key = 0x5555557e41d0 "size"
2: volinfo->rebal.rebalance_data = 0
1: volinfo->volname = "test1", '\000' <repeats 250 times>
(gdb) n
3048 GF_FREE(key);
4: value = 0x5555557dfea0 "3145728000"
3: key = 0x5555557e41d0 "size"
2: volinfo->rebal.rebalance_data = 18446744072560312320
1: volinfo->volname = "test1", '\000' <repeats 250 times>
(gdb) p atoi(value)
$20 = -1149239296
(gdb) p/u atoi(value)
$21 = 3145728000
The issue here is, atoi() is returning negative value because of overflow.
Below statements from gdb proves it.
(gdb) set volinfo->rebal.rebalance_data=atoi("314572800")
(gdb) p volinfo->rebal.rebalance_data
$41 = 314572800
(gdb) set volinfo->rebal.rebalance_data=atoi("3145728000")
(gdb) p volinfo->rebal.rebalance_data
$42 = 18446744072560312320 <-- wrong value
(gdb)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Bugs
mailing list