Description of problem: rebalance crashed while kernel untarring Version-Release number of selected component (if applicable): Mainline How reproducible: Steps to Reproduce: 1. crated a distribute volume with 2 bricks 2. start kernel untar on the mount point 3. add-brick and initiated rebalance Actual results: rebalance process crashed Expected results: Additional info: Core was generated by `/usr/local/sbin/glusterfs -s localhost --volfile-id volume1 --xlator-option *dh'. Program terminated with signal 11, Segmentation fault. #0 0x00007f10a879df41 in dht_selfheal_dir_xattr_persubvol (frame=0x7f10abd1d02c, loc=0x7f10a805e7e0, layout=0x7f109c040ed0, i=1) at dht-selfheal.c:179 179 STACK_WIND (frame, dht_selfheal_dir_xattr_cbk, ============================================================ (gdb) p subvol $4 = (xlator_t *) 0x0 ============================================================ (gdb) bt #0 0x00007f10a879df41 in dht_selfheal_dir_xattr_persubvol (frame=0x7f10abd1d02c, loc=0x7f10a805e7e0, layout=0x7f109c040ed0, i=1) at dht-selfheal.c:179 #1 0x00007f10a879e0c4 in dht_fix_dir_xattr (frame=0x7f10abd1d02c, loc=0x7f10a805e7e0, layout=0x7f109c040ed0) at dht-selfheal.c:216 #2 0x00007f10a87a0183 in dht_fix_directory_layout (frame=0x7f10abd1d02c, dir_cbk=0x7f10a87b6b46 <dht_common_setxattr_cbk>, layout=0x13cf960) at dht-selfheal.c:800 #3 0x00007f10a87b8060 in dht_setxattr (frame=0x7f10abd1d02c, this=0x13b8600, loc=0x7f10a1526390, xattr=0x13805f8, flags=0) at dht-common.c:2299 #4 0x00007f10acf31da7 in syncop_setxattr (subvol=0x13b8600, loc=0x7f10a1526390, dict=0x13805f8, flags=0) at syncop.c:717 #5 0x00007f10a879cb55 in gf_defrag_fix_layout (this=0x13b8600, defrag=0x13cf5e0, loc=0x7f10a1526590, fix_layout=0x13805f8, migrate_data=0x13806a0) at dht-rebalance.c:1355 #6 0x00007f10a879cc00 in gf_defrag_fix_layout (this=0x13b8600, defrag=0x13cf5e0, loc=0x7f10a1526790, fix_layout=0x13805f8, migrate_data=0x13806a0) at dht-rebalance.c:1364 #7 0x00007f10a879cc00 in gf_defrag_fix_layout (this=0x13b8600, defrag=0x13cf5e0, loc=0x7f10a1526990, fix_layout=0x13805f8, migrate_data=0x13806a0) at dht-rebalance.c:1364 #8 0x00007f10a879cc00 in gf_defrag_fix_layout (this=0x13b8600, defrag=0x13cf5e0, loc=0x7f10a1526b90, fix_layout=0x13805f8, migrate_data=0x13806a0) at dht-rebalance.c:1364 #9 0x00007f10a879cc00 in gf_defrag_fix_layout (this=0x13b8600, defrag=0x13cf5e0, loc=0x7f10a1526d90, fix_layout=0x13805f8, migrate_data=0x13806a0) at dht-rebalance.c:1364 #10 0x00007f10a879cc00 in gf_defrag_fix_layout (this=0x13b8600, defrag=0x13cf5e0, loc=0x7f10a1526f30, fix_layout=0x13805f8, migrate_data=0x13806a0) at dht-rebalance.c:1364 #11 0x00007f10a879d0df in gf_defrag_start_crawl (data=0x13b8600) at dht-rebalance.c:1471 #12 0x00007f10acf2eec2 in synctask_wrap (old_task=0x7f109c0008e0) at syncop.c:128
CHANGE: http://review.gluster.com/2970 (cluster/dht: Prevent crash in dir xattr selfheal) merged in master by Vijay Bellur (vijay)
works fine on 3.3.0qa36