Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 657954 - sys-auth/sssd with =sys-libs/ldb-1.4.0-r1 - Failed to unlock db: ../ldb_tdb/ldb_tdb.c:147: Reusing ldb opend by pid 3340 in process 3341 / Protocol error
Summary: sys-auth/sssd with =sys-libs/ldb-1.4.0-r1 - Failed to unlock db: ../ldb_tdb/l...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major with 1 vote (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-12 08:49 UTC by Michael Mair-Keimberger (iamnr3)
Modified: 2020-08-16 02:23 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Mair-Keimberger (iamnr3) 2018-06-12 08:49:25 UTC
Hi,

after emerging ldb-1.4.0 + sssd i was not able to login via ldap, as sssd didn't started anymore.

from the sssd logs:
Failed to unlock db: ../ldb_tdb/ldb_tdb.c:147: Reusing ldb opend by pid 3340 in process 3341 / Protocol error

emerge already forced a re-emerge but i recompiled sys-auth/sssd and sys-libs/ldb another two times, which didn't help.
I've also deleted the database at /var/lib/sss/*, which also didn't help.

Downgrading to sys-libs/ldb-1.3.3 helped.



emerge --info:
Portage 2.3.40 (python 3.5.5-final-0, default/linux/amd64/17.0, gcc-7.3.0, glibc-2.27-r3, 4.15.7-gentoo-r1 x86_64)
=================================================================
System uname: Linux-4.15.7-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7-6700_CPU_@_3.40GHz-with-gentoo-2.6
KiB Mem:     4034004 total,   3337116 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Mon, 11 Jun 2018 22:30:01 +0000
Head commit of repository gentoo: 2e0c6889ba76db45b12f663c7132dad38aa998bb
sh bash 4.4_p23
ld GNU ld (Gentoo 2.30 p2) 2.30.0
app-shells/bash:          4.4_p23::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.14-r2::gentoo, 3.5.5-r1::gentoo
dev-util/cmake:           3.11.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6::gentoo
sys-apps/openrc:          0.36::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r2::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.16-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://192.168.2.61/gentoo-portage
    masters: gentoo
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=broadwell"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=broadwell"
DISTDIR="/mnt/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=3 -g --binpkg-changed-deps=y --binpkg-respect-use=y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/mnt/packages"
PORTAGE_BINHOST="http://10.0.2.20:8080/vs3"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 ldap libtirpc modules multilib ncurses nls nptl openmp pam pcre python readline seccomp ssl tcpd threads unicode vim-syntax xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 popcnt sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput evdev" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="qxl virgl" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Michael Mair-Keimberger (iamnr3) 2018-06-13 09:23:19 UTC
Also doesn't work with sys-libs/ldb-1.4.0-r1
Comment 2 Jerzy Kołosowski 2018-06-17 20:50:51 UTC
Also break samba-4.7.7:

cze 17 22:01:08 hell samba[9436]: samba version 4.7.7 started.
cze 17 22:01:08 hell samba[9436]: Copyright Andrew Tridgell and the Samba Team 1992-2017
cze 17 22:01:09 hell samba[9436]: samba: using 'standard' process model
cze 17 22:01:09 hell samba[9436]: samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.
cze 17 22:01:09 hell samba[9436]: samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.
cze 17 22:01:09 hell samba[9436]: samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.
cze 17 22:01:09 hell samba[9436]: ldb: Failed to lock db: ../ldb_tdb/ldb_tdb.c:147: Reusing ldb opend by pid 9436 in process 9496
cze 17 22:01:09 hell samba[9436]:  / Success for CN=Schema,CN=Configuration,DC=example,DC=org
cze 17 22:01:09 hell samba[9436]: ldb: Failed to lock db: ../ldb_tdb/ldb_tdb.c:147: Reusing ldb opend by pid 9436 in process 9496
cze 17 22:01:09 hell samba[9436]:  / Protocol error for CN=Configuration,DC=example,DC=org
cze 17 22:01:09 hell samba[9436]: ldb: Failed to lock db: ../ldb_tdb/ldb_tdb.c:147: Reusing ldb opend by pid 9436 in process 9496
cze 17 22:01:09 hell samba[9436]:  / Protocol error for DC=DomainDnsZones,DC=example,DC=org
cze 17 22:01:09 hell samba[9436]: ldb: Failed to lock db: ../ldb_tdb/ldb_tdb.c:147: Reusing ldb opend by pid 9436 in process 9496
cze 17 22:01:09 hell samba[9436]:  / Protocol error for DC=ForestDnsZones,DC=example,DC=org
cze 17 22:01:09 hell samba[9436]: ldb: Failed to lock db: ../ldb_tdb/ldb_tdb.c:147: Reusing ldb opend by pid 9436 in process 9496
cze 17 22:01:09 hell samba[9436]:  / Protocol error for DC=example,DC=org
cze 17 22:01:09 hell samba[9436]: ldb: Failed to unlock db: ../ldb_tdb/ldb_tdb.c:147: Reusing ldb opend by pid 9436 in process 9496
cze 17 22:01:09 hell samba[9436]:  / Protocol error for metadata partition
cze 17 22:01:09 hell samba[9436]: ldb: Failed to unlock db: Failed to unlock db: ../ldb_tdb/ldb_tdb.c:147: Reusing ldb opend by pid 9436 in process 9496
cze 17 22:01:09 hell samba[9436]:  / Protocol error for metadata partition / Protocol error
cze 17 22:01:09 hell samba[9436]: Failed to find object DC=example,DC=org for attribute fsmoRoleOwner - Cannot find DN DC=example,DC=org to get attribute fsmoRoleOwner for reference dn: Failed to unlock db: ../ldb_tdb/ldb_tdb.c:147: Reusing ldb opend by pid 9436 in>
cze 17 22:01:09 hell samba[9436]:  / Protocol error for metadata partition

Downgrading to sys-libs/ldb-1.3.3 fixed problem.
Comment 3 Jernej Simoncic 2018-06-29 09:13:49 UTC
This should be hardmasked, ldb-1.4.0 also breaks samba (at least in ADDC mode). Internal DNS doesn't work at all (never starts listening on port 53), authentications fail with "samba session setup failed: NT_STATUS_INVALID_SID", samba logs are full of "Protocol error". Reverting to ldb-1.3.4 fixes the problems.