Bug 1011662

Summary: threads created by gluster should block signals which are not used by gluster itself
Product: [Community] GlusterFS Reporter: Anand Avati <aavati>
Component: coreAssignee: Ric Wheeler <rwheeler>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: mainlineCC: acathrow, areis, barumuga, bsarathy, chayang, chrisw, flang, gluster-bugs, juzhang, mazhang, mkenneth, pbonzini, qzhang, vbellur, virt-maint, xigao
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.5.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 998832 Environment:
Last Closed: 2014-04-17 11:48:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 998832    
Bug Blocks: 1010337    

Comment 1 Anand Avati 2013-09-24 18:31:16 UTC
REVIEW: http://review.gluster.org/5995 (core: block unused signals in created threads) posted (#1) for review on master by Anand Avati (avati)

Comment 2 Anand Avati 2013-09-24 23:19:37 UTC
REVIEW: http://review.gluster.org/5995 (core: block unused signals in created threads) posted (#2) for review on master by Anand Avati (avati)

Comment 3 Anand Avati 2013-09-25 08:34:02 UTC
COMMIT: http://review.gluster.org/5995 committed in master by Vijay Bellur (vbellur) 
------
commit 84fa8af38d2eab0f72349abb8136811bd3e96570
Author: Anand Avati <avati>
Date:   Tue Sep 24 09:45:08 2013 -0700

    core: block unused signals in created threads
    
    Block all signal except those which are set for explicit handling
    in glusterfs_signals_setup(). Since thread spawning code in
    libglusterfs and xlators can get called from application threads
    when used through libgfapi, it is necessary to do this blocking.
    
    Change-Id: Ia320f80521a83d2edcda50b9ad414583a0175281
    BUG: 1011662
    Signed-off-by: Anand Avati <avati>
    Reviewed-on: http://review.gluster.org/5995
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Amar Tumballi <amarts>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 4 Paolo Bonzini 2013-09-26 10:25:16 UTC
Thanks for fixing this quickly Anand!

The patch looks good, but why trap SIGABRT?  In general, when using libgfapi the application handler for SIGABRT should be used.

Comment 5 Anand Avati 2013-09-27 03:59:41 UTC
A caller of assert() would need the SIGABRT to be caught in the same thread for things like printing a meaningful backtrace, and hence left it unblocked (in case the application has already setup a handler). It wasn't with the intention that libgfapi would handle SIGABRT with its handler.

Comment 6 Paolo Bonzini 2013-09-27 10:03:13 UTC
That makes sense, thanks!

Comment 7 Amar Tumballi 2013-10-07 08:47:41 UTC
with 3.4.1 release of glusterfs

Comment 10 Niels de Vos 2014-04-17 11:48:33 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.5.0, please reopen this bug report.

glusterfs-3.5.0 has been announced on the Gluster Developers mailinglist [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user