Description of problem: Invoking the command as in subject dumps core, generated by the gluster CLI. The core is due to wordcount in function cli_cmd_volume_statedump_options_parse being 3 in the case above, and this leads to option_str in the function to be a NULL string, and hence referencing the same in strstr within the same function leads to a segmentation fault. This happens always.
REVIEW: https://review.gluster.org/20867 (cli: Fix invalid access of option_str variable) posted (#1) for review on master by Shyamsundar Ranganathan
COMMIT: https://review.gluster.org/20867 committed in master by "Shyamsundar Ranganathan" <srangana> with a commit message- cli: Fix invalid access of option_str variable In function cli_cmd_volume_statedump_options_parse if the wordcount of arguments is exactly 3, then option_str would remain NULL, and hence the function will generate a segmentation fault on the strstr check in its body. This can be triggered when we run the command, `gluster volume statedump <volname>` The fix is to check if option_str is non-NULL before use and also to pass in a duplicated empty string to the dict key "options" when this is NULL. Fixes: bz#1619423 Change-Id: Ic029ab60b64890d92c7a0876a638929495d3aa59 Signed-off-by: ShyamsundarR <srangana>
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-5.0, please open a new bug report. glusterfs-5.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] https://lists.gluster.org/pipermail/announce/2018-October/000115.html [2] https://www.gluster.org/pipermail/gluster-users/