[Samba] ldb errors after upgrade, cause?

Andrew Bartlett abartlet at samba.org
Tue Feb 11 21:11:23 UTC 2020


I would suggest running the samba_downgradedatabase script (which
resets a pile of stuff to assist in this process) or joining a new DC
to this domain as was past this issue.  

You do need to upgrade, there are many serious security issues in that
older version.

Andrew Bartlett

On Tue, 2020-02-11 at 20:54 +0100, Roel van Meer via samba wrote:
> Hi list,
> 
> for future reference: we haven't been able to fix it. Upgrading to
> 4.9.18  
> didn't help, so in the end we decided to downgrade to our previous
> version  
> (4.5.12) which doesn't have this problem. Hooray for tdbbackup!
> 
> Thanks Louis for thinking with us.
> 
> Best regards,
> 
> Roel
> 
> And for Google:
> 
> smbd[16461]:   ldb: Failure during ltdb_lock_read(): Locking error →
> Busy
> smbd[16461]: [2020/02/11 16:17:05.790174,  0] ../lib/ldb-
> samba/ldb_wrap.c:79(ldb_wrap_debug)
> smbd[16461]:   ldb: module samba_dsdb initialization failed :
> Operations error
> smbd[16461]: [2020/02/11 16:17:05.790213,  0] ../lib/ldb-
> samba/ldb_wrap.c:79(ldb_wrap_debug)
> smbd[16461]:   ldb: Unable to load modules for
> /var/lib/samba/private/sam.ldb: Unable to load ltdb cache records for
> backend 'ldb_tdb backend'
> smbd[16461]: [2020/02/11 17:25:00.118870,  0] ../lib/ldb-
> samba/ldb_wrap.c:79(ldb_wrap_debug)
> smbd[16461]:   ldb: Failure during ltdb_lock_read(): Locking error →
> Busy
> smbd[16461]: [2020/02/11 17:25:00.118983,  0] ../lib/ldb-
> samba/ldb_wrap.c:79(ldb_wrap_debug)
> smbd[16461]:   ldb: Failed to lock db: Failure during
> ltdb_lock_read(): Locking error → Busy / Busy for
> DC=DomainDnsZones,DC=company,DC=corp
> 
> 
> 
> 
> > Hai Roel,
> > 
> > Ah, ok, so you have hitted a bug.
> > Might be :
> > https://bugzilla.samba.org/show_bug.cgi?id=13959
> > https://bugzilla.samba.org/show_bug.cgi?id=14062
> > 
> > You have a few options, patch it yourself or report it at debian.
> > Or  Upgrade debian to bullseye.
> > 
> > Or use my repo and stay on buster.
> > Then you have the option goto 4.10.latest or 4.11.latest
> > (sorry i have not ported 4.9.latest to buster )
> > 
> > Info : http://apt.van-belle.nl
> > 
> > 
> > Greetz,
> > 
> > Louis
> > 
> > 
> > > -----Oorspronkelijk bericht-----
> > > Van: samba [mailto:samba-bounces at lists.samba.org] Namens Roel
> > > van Meer via samba
> > > Verzonden: donderdag 6 februari 2020 15:07
> > > Aan: samba at lists.samba.org
> > > Onderwerp: Re: [Samba] ldb errors after upgrade, cause?
> > > 
> > > L.P.H. van Belle via samba writes:
> > > 
> > > > Is samba-dsdb-modules installed ?
> > > 
> > > Yes, I checked again, and all packages are installed, all of
> > > them with the
> > > proper version, and no leftovers.
> > > 
> > > This server works fine for a half a day, and then these
> > > errors happen, so I
> > > think it's unlikely that it's related to the install itself.
> > > 
> > > I have already made a backup of all tdb files with tdbbackup
> > > and restored
> > > them afterwards, to try and fix any corruption if that would
> > > be the case,
> > > but unfortunately that didn't help.
> > > 
> > > This server isn't particularly large (3738 objects in the entire
> > > SAM
> > > database). I'm quite sure we're not reaching the max open
> > > files limit (16k),
> > > but that leaves me fresh out of ideas :)
> > > 
> > > Thanks a lot,
> > > 
> > > Roel
> > > 
> > > ---/---
> > > ii  libtevent0:amd64            0.9.37-1
> > > ii  libwbclient0:amd64          2:4.9.5+dfsg-5+deb10u1
> > > ii  python-ldb                  2:1.5.1+really1.4.6-3
> > > ii  python-mysqldb              1.3.10-2
> > > ii  python-samba                2:4.9.5+dfsg-5+deb10u1
> > > ii  python-talloc:amd64         2.1.14-2
> > > ii  python-tdb                  1.3.16-2+b1
> > > ii  samba                       2:4.9.5+dfsg-5+deb10u1
> > > ii  samba-common                2:4.9.5+dfsg-5+deb10u1
> > > ii  samba-common-bin            2:4.9.5+dfsg-5+deb10u1
> > > ii  samba-dsdb-modules:amd64    2:4.9.5+dfsg-5+deb10u1
> > > ii  samba-libs:amd64            2:4.9.5+dfsg-5+deb10u1
> > > ii  samba-vfs-modules:amd64     2:4.9.5+dfsg-5+deb10u1
> > > ii  tdb-tools                   1.3.16-2+b1
> > > ii  winbind                     2:4.9.5+dfsg-5+deb10u1
> > > ---/---
> > > 
> > > 
> > > 
> > > 
> > > > Run : dpkg -l | egrep "samba|winbind|ldb|tdb|tevent|talloc"
> > > > That shows it.
> > > > 
> > > > Can you try also to run : apt dist-upgrade --autoremove
> > > > Most probley there are some leftovers from the dist upgrade,
> > > > You can find these with : dpkg -l |egrep "deb[8-
> > > > 9]|jessie|stretch|
> > > > debian[8-9]"
> > > > As far i can remember your just missing a package, its
> > > 
> > > something simple but
> > > > simple overlooked.
> > > > 
> > > > 
> > > > Greetz,
> > > > 
> > > > Louis
> > > > 
> > > > 
> > > > > -----Oorspronkelijk bericht-----
> > > > > Van: samba [mailto:samba-bounces at lists.samba.org] Namens Roel
> > > > > van Meer via samba
> > > > > Verzonden: woensdag 5 februari 2020 20:03
> > > > > Aan: samba at lists.samba.org
> > > > > Onderwerp: [Samba] ldb errors after upgrade, cause?
> > > > > 
> > > > > Hi!
> > > > > 
> > > > > recently we upgraded a Debian jessie server to Debian buster,
> > > > > with Samba
> > > > > being upgraded from 4.5.12 (+dfsg-2+deb9u3) to 4.9.5
> > > > > (+dfsg-5+deb10u1).
> > > > > 
> > > > > A few hours later we saw these errors in syslog:
> > > > > 
> > > > >     smbd[26024]: [2020/02/03 11:13:13.631613,  0]
> > > > > ../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
> > > > >     smbd[26024]:   ldb: Failure during ltdb_lock_read():
> > > > > Locking error ??? Busy
> > > > >     smbd[26024]: [2020/02/03 11:13:13.631762,  0]
> > > > > ../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
> > > > >     smbd[26024]:   ldb: module samba_dsdb initialization
> > > > > failed : Operations error
> > > > >     smbd[26024]: [2020/02/03 11:13:13.631828,  0]
> > > > > ../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
> > > > >     smbd[26024]:   ldb: Unable to load modules for
> > > > > /var/lib/samba/private/sam.ldb: Unable to load ltdb cache
> > > > > records for backend 'ldb_tdb backend'
> > > > > 
> > > > > I was wondering if someone knows in which area we have to
> > > > > find a solution.
> > > > > Is this resource exhaustion? Or database corruption?
> > > 
> > > Something else?
> > > > > I did run "samba-tool dbcheck --cross-ncs" afterwards, and
> > > > > this fixed some
> > > > > errors, but I'm not sure if that can be related to the ldb
> > > > > errors.
> > > > > 
> > > > > Just wondering if this rings a bell for anyone, with maybe
> > > > > some tips on how
> > > > > to proceed from here.
> > > > > 
> > > > > Thanks!
> > > > > 
> > > > > Roel
> > > > > 
> > > > > --
> > > > > To unsubscribe from this list go to the following URL and
> > > > > read the
> > > > > instructions:  https://lists.samba.org/mailman/options/samba
> > > > > 
> > > > > 
> > > > 
> > > > 
> > > > --
> > > > To unsubscribe from this list go to the following URL and read
> > > > the
> > > > instructions:  https://lists.samba.org/mailman/options/samba
> > > 
> > > --
> > > To unsubscribe from this list go to the following URL and read
> > > the
> > > instructions:  https://lists.samba.org/mailman/options/samba
> > > 
> > > 
> > 
> > 
> > --
> > To unsubscribe from this list go to the following URL and read the
> > instructions:  https://lists.samba.org/mailman/options/samba
> 
> 
-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT - Expert Open Source
Solutions
https://catalyst.net.nz/services/samba









More information about the samba mailing list