[Samba] gencache.tdb: device busy

Jeremy Allison jra at samba.org
Tue Apr 16 00:07:05 UTC 2019


On Fri, Apr 12, 2019 at 09:46:04AM +0200, Rouven WEILER via samba wrote:
> 
> 
> Hi Jeremy,
>  
> I got some info on that topic from the illumos devs:
>  
> 
> > It's a sporadic issue, you're lucky enough to not encounter it on 4.9.5.
> >
> > I confirmed in 4.10.2, it happens:
> >
> 
> > winbindd.log:  tdb(/tmw-nas-3p/samba/var/lock/gencache.tdb): tdb_open_ex: tdb_mutex_init failed for /tmw-nas-3p/samba/var/lock/gencache.tdb: Device busy
> >
> > So either apply OS fix, or apply a software fix (zeroing pthread_mutex_t before pthread_mutex_init()).
>  
> This all should be based on the following issue:
>  
> https://www.illumos.org/issues/9959
>  
> As far as I understand the issue making an software fix in samba for the OS seems more reasonable since the problem can occur sporadic and thus again...
> Could you tell me how to help to fix that bug?

This doesn't look exactly the same. In your
log below you say:

 ret = pthread_mutexattr_init(&ma); in line 570
 I got errorno 16 --> device busy.

But the bug report is about needing the value
passed to pthread_mutex_init() needing to be
zero, not the value passed to pthread_mutexattr_init().

Can you just try adding '= {0}' to all the
places where we declare:

pthread_mutexattr_t ma

(i.e. make it say)

pthread_mutexattr_t ma = {0};

and see if it makes your problem go away ?


> Gesendet: Dienstag, 02. April 2019 um 18:59 Uhr
> Von: "Jeremy Allison" <jra at samba.org>
> An: "Rouven WEILER" <Rouven_Weiler at gmx.net>
> Cc: samba at lists.samba.org
> Betreff: Re: Re: [Samba] gencache.tdb: device busy
> On Tue, Apr 02, 2019 at 01:24:19PM +0200, Rouven WEILER wrote:
> >
> >
> > I added LOG statements to mutex.c printing the strerror from the return values.
> >  
> > From
> >  
> > ret = pthread_mutexattr_init(&ma); in line 570
> >  
> > I got errorno 16 --> device busy.
> >  
> > But due the manual of pthread_mutex_attr_init() there should only be ENOMEM and EINVAL...
> >  
> > Doing gdb smbd -> run
> > Doe not reveal anything, but I never used gdb for debugging anything. I just gave it a shot...
> 
> Sorry, looks a little like the libc/pthread_mutex support
> on Solaris is broken. You might want to raise this on a
> Solaris/Illumos forum.
> 
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba



More information about the samba mailing list