Re: [Gluster-devel] glusterfs blocked.
I add some private function in dht_create() as bellow. When current pwd is not /,everything is ok,otherwise,syncop_getxattr will be blocked(In target subvol,server3_3_getxatt did not run ). dict_t *xattr = NULL; loc_t loc = {0, }; memset (loc.gfid, 0, 16); loc.gfid[15] = 1; ret = syncop_getxattr (subvol, loc, xattr,GF_XATTR_PATHINFO_KEY); Could you post your private patch in this thread? It would be useful to discuss the specifics of why glusterfs is blocked. syncop_XXX functions should be called only from threads other than threads executing event_dispatch_epoll_handler. You could attach gdb to your hung process and confirm that the syncop_getxattr call is executing on a thread that has event_dispatch_epoll_handler early on its stack. What is the goal of your private patch? If I may guess, are you trying to create files on a brick that is on the same machine as your mount point, when possible? If so, DHT has Non-uniform file allocation policy (NUFA) analagous to NUMA in memory architectures. For more information, see https://github.com/gluster/glusterfs/blob/master/doc/admin-guide/en-US/markdown/admin_managing_volumes.md#non-uniform-file-allocation HTH, KP We want to place file on any subvol other than local ,in the contrary of NUFA。 From GDB ,syncop_getxattr is on the same backtrace of event_dispatch_epoll_handler which runing in main thread.So any response can not come in ? Great thanks! YB ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately. ___ Gluster-devel mailing list Gluster-devel@gluster.org http://www.gluster.org/mailman/listinfo/gluster-devel
Re: [Gluster-devel] glusterfs blocked.
We want to place file on any subvol other than local ,in the contrary of NUFA。 From GDB ,syncop_getxattr is on the same backtrace of event_dispatch_epoll_handler which runing in main thread.So any response can not come in ? That is the short answer. syncop_* calls need to be executed in a non-epoll thread because of how synctask_yield works. synctask_yield ensures that the syncop_* function proceeds with its execution only if the corresponding FOP call back is done. i.e, the calling thread will be blocked. If the calling thread is an 'epoll thread', it could result in a deadlock. By blocking the epoll thread, you are preventing further socket reads/writes from that socket. If this socket happens to belong to one of those servers from which you are expecting a reply then you have a deadlock. Does that make sense? NB My answers are based on current master code. Accuracy may vary with older versions ~KP ___ Gluster-devel mailing list Gluster-devel@gluster.org http://www.gluster.org/mailman/listinfo/gluster-devel
Re: [Gluster-devel] glusterfs blocked.
I add some private function in dht_create() as bellow. When current pwd is not /,everything is ok,otherwise,syncop_getxattr will be blocked(In target subvol,server3_3_getxatt did not run ). dict_t *xattr = NULL; loc_t loc = {0, }; memset (loc.gfid, 0, 16); loc.gfid[15] = 1; ret = syncop_getxattr (subvol, loc, xattr,GF_XATTR_PATHINFO_KEY); Could you post your private patch in this thread? It would be useful to discuss the specifics of why glusterfs is blocked. syncop_XXX functions should be called only from threads other than threads executing event_dispatch_epoll_handler. You could attach gdb to your hung process and confirm that the syncop_getxattr call is executing on a thread that has event_dispatch_epoll_handler early on its stack. What is the goal of your private patch? If I may guess, are you trying to create files on a brick that is on the same machine as your mount point, when possible? If so, DHT has Non-uniform file allocation policy (NUFA) analagous to NUMA in memory architectures. For more information, see https://github.com/gluster/glusterfs/blob/master/doc/admin-guide/en-US/markdown/admin_managing_volumes.md#non-uniform-file-allocation HTH, KP Best regards! ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately. ___ Gluster-devel mailing list Gluster-devel@gluster.org http://www.gluster.org/mailman/listinfo/gluster-devel ___ Gluster-devel mailing list Gluster-devel@gluster.org http://www.gluster.org/mailman/listinfo/gluster-devel