Description of problem: run cmd below core dump "prove -vf ./tests/bugs/gfapi/glfs_vol_set_IO_ERR.t" Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1.modify write-behind source code, change option "trickling-writes" default value to "off", so write requests can aggregate 2.compile source code ./configure --enable-debug make -j12 make install 3.prove -vf ./tests/bugs/gfapi/glfs_vol_set_IO_ERR.t Actual results: glfs_vol_set_IO_ERR: write-behind.c:721: wb_inode_destroy: Assertion `list_empty(&wb_inode->todo)' failed. ./tests/bugs/gfapi/../../include.rc: line 342: 25924 Aborted (core dumped) ./tests/bugs/gfapi/glfs_vol_set_IO_ERR centos patchy /var/log/glusterfs/glfs_vol_set_IO_ERR.log Expected results: Additional info: (gdb) bt #0 0x00007f833b81a2c7 in raise () from /usr/lib64/libc.so.6 #1 0x00007f833b81b9b8 in abort () from /usr/lib64/libc.so.6 #2 0x00007f833b8130e6 in __assert_fail_base () from /usr/lib64/libc.so.6 #3 0x00007f833b813192 in __assert_fail () from /usr/lib64/libc.so.6 #4 0x00007f83260378c1 in wb_inode_destroy (wb_inode=0x7f82f8000b90) at write-behind.c:721 #5 0x00007f8326037931 in wb_forget (this=<optimized out>, inode=<optimized out>) at write-behind.c:2823 #6 0x00007f833aea737e in __inode_ctx_free (inode=inode@entry=0x1fe1e68) at inode.c:411 #7 0x00007f833aea8ab2 in __inode_destroy (inode=0x1fe1e68) at inode.c:432 #8 inode_table_prune (table=table@entry=0x7f83100593c0) at inode.c:1681 #9 0x00007f833aeaa7cb in inode_table_destroy (inode_table=0x7f83100593c0) at inode.c:1972 #10 0x00007f833aeaa8a1 in inode_table_destroy_all (ctx=ctx@entry=0x1f18410) at inode.c:1891 #11 0x00007f833bbbb5de in pub_glfs_fini (fs=0x1f18270) at glfs.c:1354 #12 0x000000000040103c in main (argc=4, argv=0x7fffb7e3fd88) at ./tests/bugs/gfapi/glfs_vol_set_IO_ERR.c:157
1.write-behind.c wb_inode_destroy { ...... GF_ASSERT(list_empty(&wb_inode->todo)); ...... } 2.glfs_vol_set_IO_ERR.c write_something(glfs_t *fs); { ...... glfs_write(fd, buf, WRITE_SIZE, 0); ...... } this function will left some write requests in write-behind than "glfs_fini" will call "wb_inode_destroy" so generate coredump
This bug is moved to https://github.com/gluster/glusterfs/issues/854, and will be tracked there from now on. Visit GitHub issues URL for further details