Bug 599051

Summary: nss_winbind causing DB2 crashes
Product: Red Hat Enterprise Linux 5 Reporter: Dmitri Pal <dpal>
Component: samba3xAssignee: Guenther Deschner <gdeschner>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: low    
Version: 5.4CC: azelinka, bottchen, gdeschner, jpayne, rprice, ssorce, syeghiay, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 595468 Environment:
Last Closed: 2010-12-09 19:10:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 595468    
Bug Blocks:    

Description Dmitri Pal 2010-06-02 15:16:51 UTC
+++ This bug was initially created as a clone of Bug #595468 +++

Description of problem:

DB2 is crashing intermittently on the machine.  This problem only happens if DB2 is configured to use Window's authetication via winbind.  If Window's authentication is disabled, the problem does not occur.

How reproducible:
Intermittently, random, multiple times per day.

Steps to Reproduce:
Customer is running DB2 9.5 on a RHEL 5.4 machine.  They have it configured to use winbind for Windows authentication.  During group lookups, DB2 will crash intermittently.  

Actual results:
DB2 crashes, indicating that it was in the pthread library called from the winbind library.

Expected results:
DB2 should not crash.

Additional info:  Our DB2 support team got a stack trace at the time of the failure:

Signal #7 (SIGBUS): si_addr is 0x0000000000000000, si_code is 0x00000080 

(SI_KERNEL:Send by kernel.)                                              
                                                                        
timestamp: 2010-03-31-00.47.59.674828                                    
                                                                        
<StackTrace>                                                             
---FUNC-ADDR---- ------FUNCTION + OFFSET------                           
00002B7B3EADAF7F ossDumpStackTraceEx + 0x01f7                            
 (/opt/IBM/db2/V9.5/lib64/libdb2osse.so.1)                              
00002B7B3EAD6ABA _ZN11OSSTrapFile6dumpExEmiP7siginfoPvm + 0x00b4         
 (/opt/IBM/db2/V9.5/lib64/libdb2osse.so.1)                              
00002B7B3EAD6B81 _ZN11OSSTrapFile4dumpEmiP7siginfoPv + 0x0009            
 (/opt/IBM/db2/V9.5/lib64/libdb2osse.so.1)                              
00002B7B3B04D103 sqlo_trce + 0x03f3                                      
 (/opt/IBM/db2/V9.5/lib64/libdb2e.so.1)                                 
00002B7B3B08CFC5 sqloEDUCodeTrapHandler + 0x0101                         
 (/opt/IBM/db2/V9.5/lib64/libdb2e.so.1)                                 
0000003303E0E930 address: 0x0000003303E0E930 ; dladdress:                
0x0000003303E00000 ; offset in lib: 0x000000000000E930 ;                 
 (/lib64/libpthread.so.0)                                               
00002B7B5C1426B0 address: 0x00002B7B5C1426B0 ; dladdress:                
0x00002B7B5C141000 ; offset in lib: 0x00000000000016B0 ;                 
 (/lib64/libnss_winbind.so.2)                                           
00002B7B5C14276D read_reply + 0x003d                                     
 (/lib64/libnss_winbind.so.2)                                           
00002B7B5C142803 winbindd_get_response + 0x0033                          
 (/lib64/libnss_winbind.so.2)                                           
00002B7B5C142E70 winbindd_request_response + 0x0040                      
 (/lib64/libnss_winbind.so.2)                                           
00002B7B5C143E65 _nss_winbind_getpwnam_r + 0x00a5                        
 (/lib64/libnss_winbind.so.2)                                           
0000003303299215 getpwnam_r + 0x00a5                                     
 (/lib64/libc.so.6)                                                     
00002B7B39DC6C9E sqloGetUserAttribByName + 0x00ec                        
 (/opt/IBM/db2/V9.5/lib64/libdb2e.so.1)                                 
00002B7B3A5C2750                                                         
_Z30sqloGetUserAttribByNameWrapperPcP21SQLO_USER_ATTRIB_DATA + 0x0006    
 (/opt/IBM/db2/V9.5/lib64/libdb2e.so.1)                                 

It appears that SIGBUS is getting returned after going into the pthread library.  This led to concerns that the nss_winbind library is not thread safe (DB2 is multithreaded).  Hits on the Samba mailing list seem to indicate that it may not be:

http://www.mail-archive.com/samba@lists.samba.org/msg100541.html

This problem is impacting the customer greatly as they are forced to restart DB2 numerous times during the day.


Version-Release number of selected component (if applicable):

samba-3.0.33-3.15.el5_4.1-x86_64
samba-client-3.0.33-3.15.el5_4.1-x86_64
samba-common-3.0.33-3.15.el5_4.1-x86_64

--- Additional comment from ssorce on 2010-05-26 12:09:23 EDT ---

Can you please test with the samba3x packages?
In samba3x we have thread safety patches for nss_winbindd.