Crash is happening in 'posix-locks' component: One thread: Thread 27: #8 0x00007fb210053987 in pl_update_refkeeper (this=this@entry=0x7fb20c015550, inode=0x7fb20c40d9d0) at common.c:380 Thread 25 #8 0x00007fb210053987 in pl_update_refkeeper (this=this@entry=0x7fb20c015550, inode=0x7fb20c40d9d0) at common.c:380 Thread10: #3 0x00007fb21f5222db in fd_ref (fd=0x7fb20cb44f60) at fd.c:456 Thread15: #3 0x00007fb21f5224ce in gf_fd_fdptr_get (fdtable=0x7fb1c417d630, fd=fd@entry=1015) at fd.c:423
Krutika, pl_update_refkeeper() code doesn't seem to be safe for ref/unref? In the case where we set need_ref = 1; Even before a ref happens an unref can happen on the inode in some other thread. This may not be the RC for this particular crash, but the code has that possibility. void pl_update_refkeeper (xlator_t *this, inode_t *inode) { pl_inode_t *pl_inode = NULL; int is_empty = 0; int need_unref = 0; int need_ref = 0; pl_inode = pl_inode_get (this, inode); pthread_mutex_lock (&pl_inode->mutex); { is_empty = __pl_inode_is_empty (pl_inode); if (is_empty && pl_inode->refkeeper) { need_unref = 1; pl_inode->refkeeper = NULL; } if (!is_empty && !pl_inode->refkeeper) { need_ref = 1; pl_inode->refkeeper = inode; } } pthread_mutex_unlock (&pl_inode->mutex); if (need_unref) inode_unref (inode); if (need_ref) inode_ref (inode); }
> If engg things there is something to be fixed, we can do that. Else I happy to get this closed. Bipin, we believe with our focus on stability, these issues would have been fixed. Happy to work on it if there is any further observation. Till then, will CLOSE it as UPSTREAM (to identify the focus on stability).