[PATCH] s3: enable mutexes for gencache_notrans.tdb

Michael Adam obnox at samba.org
Fri Jun 6 13:23:35 MDT 2014


Hi!

sn-devel-104 currently does not support robust mutexes, sorry...

The sn-devel-124 based on ubuntu 12.04 that metze is preparing
will support them. But having one test host which does support
them is a good test as this case proves.

Wouldn't the proper fix be to convert the db to us dbwrap
instead of tdb_open_log ?

Cheers - Michael

On 2014-06-06 at 11:13 -0700, Jeremy Allison wrote:
> On Thu, Jun 05, 2014 at 02:29:16PM -0700, Christof Schmitt wrote:
> > >From a44f66d5eee6512fd77b7ec670d28be5578b4542 Mon Sep 17 00:00:00 2001
> > From: Peter Somogyi <psomogyi at hu.ibm.com>
> > Date: Tue, 18 Feb 2014 13:32:24 +0100
> > Subject: [PATCH] s3: enable mutexes for gencache_notrans.tdb
> > 
> > Signed-off-by: Peter Somogyi <psomogyi at hu.ibm.com>
> > Reviewed-by: Christof Schmitt <cs at samba.org>
> > ---
> >  source3/lib/gencache.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
> > index 0fb1fd8..f1b423a 100644
> > --- a/source3/lib/gencache.c
> > +++ b/source3/lib/gencache.c
> > @@ -114,6 +114,7 @@ static bool gencache_init(void)
> >  	cache_notrans = tdb_open_log(cache_fname, 0,
> >  				     TDB_CLEAR_IF_FIRST|
> >  				     TDB_INCOMPATIBLE_HASH|
> > +				     TDB_MUTEX_LOCKING|
> >  				     TDB_SEQNUM|
> >  				     TDB_NOSYNC,
> >  				     open_flags, 0644);
> > -- 
> > 1.7.1
> 
> Unfortunately this is failing autobuild due
>  to:
> 
> tdb(/memdisk/jra/a/b943778/samba/bin/ab/client/lockdir/gencache_notrans.tdb): tdb_open_ex: invalid flags for /memdisk/jra/a/b943778/samba/bin/ab/client/lockdir/gencache_notrans.tdb - TDB_MUTEX_LOCKING requires support for robust_mutexes
> ../source3/torture/torture.c:8144: gencache_set() failed
> 
> I think something like the code in source3/lib/dbwrap/dbwrap_open.c
> 
>                 if (try_mutex && tdb_runtime_check_for_robust_mutexes()) {
>                         tdb_flags |= TDB_MUTEX_LOCKING;
>                 }
> 
> should be added here. Give me a bit to look at this..
> 
> Jeremy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140606/8f96e419/attachment.pgp>


More information about the samba-technical mailing list