Emmanuel Dreyfus <m...@netbsd.org> wrote:

> I am trying to figure out how the crash happens. We now local->fd is
> valid at the begining of dht_migration_complete_check_task() since it is
> dereferenced there aithout a hitch. Then it becomes NULL before the
> function exits, which leads to a crash.
> 
> That suggests a race condition. 

I was wrong: I added debug messages, and local->fd is already NULL when
entering dht_migration_complete_check_task(). It is passed to
fd_ctx_del(), but that function checks for it being NULL and just
returns -1.

The others function calls in  dht_migration_complete_check_task() takes
care of not using local->fd if local->loc.inode is not NULL. Only the
offending code fails to do so:

        if (local->loc.inode) {
                ret = syncop_open (dst_node, &local->loc,
                                   local->fd->flags, local->fd);
        }


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
m...@netbsd.org

_______________________________________________
Gluster-devel mailing list
Gluster-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/gluster-devel

Reply via email to