Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 333341 - app-crypt/heimdal-1.3.3-r1: kdc crashes pointing to sys-libs/db mis-installation?
Summary: app-crypt/heimdal-1.3.3-r1: kdc crashes pointing to sys-libs/db mis-installat...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kerberos Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-18 19:03 UTC by Martin Mokrejš
Modified: 2011-02-18 20:14 UTC (History)
0 users

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


Attachments
build.log (build.log,34.74 KB, text/plain)
2010-08-18 19:10 UTC, Martin Mokrejš
Details
config.log (config.log,1.34 MB, text/plain)
2010-08-18 19:10 UTC, Martin Mokrejš
Details
kdc-stacktrace.txt (kdc-crash.txt,10.20 KB, text/plain)
2010-08-18 19:16 UTC, Martin Mokrejš
Details
heimdal-1.3.3-r2.ebuild (heimdal-1.3.3-r2.ebuild,3.83 KB, text/plain)
2010-08-31 12:46 UTC, Eray Aslan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2010-08-18 19:03:58 UTC
I wonder whether this is a mis-installation issue on my Gentoo laptop. I see the library
currently in play is libdb-4.8 while the debug points to db3.h. Is there a way to check
which major library version is available during runtime?

# ldd /usr/sbin/kdc
        linux-gate.so.1 =>  (0xb7702000)
        libkdc.so.2 => /usr/lib/libkdc.so.2 (0xb76b4000)
        libhdb.so.9 => /usr/lib/libhdb.so.9 (0xb769b000)
        libkrb5.so.26 => /usr/lib/libkrb5.so.26 (0xb763c000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7623000)
        libroken.so.18 => /usr/lib/libroken.so.18 (0xb760f000)
        libc.so.6 => /lib/libc.so.6 (0xb74c9000)
        libheimntlm.so.0 => /usr/lib/libheimntlm.so.0 (0xb74c3000)
        libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb743c000)
        libicui18n.so.44 => /usr/lib/libicui18n.so.44 (0xb7277000)
        libicuuc.so.44 => /usr/lib/libicuuc.so.44 (0xb714a000)
        libwind.so.0 => /usr/lib/libwind.so.0 (0xb7121000)
        libdl.so.2 => /lib/libdl.so.2 (0xb711d000)
        libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0xb6fc5000)
        libasn1.so.8 => /usr/lib/libasn1.so.8 (0xb6f42000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0xb6f3e000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb6f0b000)
        libdb-4.8.so => /usr/lib/libdb-4.8.so (0xb6db1000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xb6d9c000)
        /lib/ld-linux.so.2 (0xb7703000)
        libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/libstdc++.so.6 (0xb6caf000)
        libm.so.6 => /lib/libm.so.6 (0xb6c89000)
        libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/libgcc_s.so.1 (0xb6c6c000)
        libicudata.so.44 => /usr/lib/libicudata.so.44 (0xb5e2e000)
        libz.so.1 => /lib/libz.so.1 (0xb5e19000)
#

# emerge --unmerge sys-libs/db
 * This action can remove important packages! In order to be safer, use
 * `emerge -pv --depclean <atom>` to check for reverse dependencies before
 * removing packages.

 sys-libs/db
    selected: 1.85-r3 3.2.9_p2 4.2.52_p5-r1 4.3.29_p1-r1 4.5.20_p2-r1 4.6.21_p4 4.7.25_p4 4.8.30 
   protected: none 
     omitted: none 

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in:  5 4 ^C

Exiting on signal 2
#

From configure's output I would like to emphasize:

checking db4/db.h usability... no
checking db4/db.h presence... no
checking for db4/db.h... no
checking db3/db.h usability... yes
checking db3/db.h presence... yes
checking for db3/db.h... yes
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking db_185.h usability... yes
checking db_185.h presence... yes
checking for db_185.h... yes
checking for db_create... yes, in -ldb
checking for dbm_firstkey... yes, in -ldb


# emerge -pv heimdal

        [ebuild   R   ] app-crypt/heimdal-1.3.3-r1  USE="X berkdb ssl threads -afs -hdb-ldap -ipv6 -otp -pkinit -test" 0 kB
Comment 1 Martin Mokrejš 2010-08-18 19:10:11 UTC
Forgot to say that the crash happens in the backrgound during

$ su -
Password:
$

# ldd /bin/su
        linux-gate.so.1 =>  (0xb7895000)
        libpam.so.0 => /lib/libpam.so.0 (0xb7857000)
        libpam_misc.so.0 => /lib/libpam_misc.so.0 (0xb7853000)
        libc.so.6 => /lib/libc.so.6 (0xb770d000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7709000)
        /lib/ld-linux.so.2 (0xb7896000)
#

The kdc is contacted due to PAM support in su. 

# equery belongs su
 * Searching for su ... 
app-crypt/kth-krb-1.3_rc1 (/usr/athena/bin/su)
sys-apps/shadow-4.1.4.2-r5 (/etc/pam.d/su)
sys-apps/shadow-4.1.4.2-r5 (/bin/su)
#

BTW, where is su(1) from heimdal distribution?
Comment 2 Martin Mokrejš 2010-08-18 19:10:33 UTC
Created attachment 243483 [details]
build.log
Comment 3 Martin Mokrejš 2010-08-18 19:10:48 UTC
Created attachment 243485 [details]
config.log
Comment 4 Martin Mokrejš 2010-08-18 19:14:40 UTC
(In reply to comment #1)
> Forgot to say that the crash happens in the backrgound during
> 
> $ su -
> Password:
> $

I hand-typed this. Importantly, I should have written `#' at the end instead of the `$' sign as I really do get root-shell as expected. My aim was to show there is no message returned to the user. The crash itself is logged through syslog in my case but that is not important:

kdc[2306]: segfault at 0 ip (null) sp bfdb195c error 4 in kdc[8048000+6000]


Comment 5 Martin Mokrejš 2010-08-18 19:16:21 UTC
Created attachment 243487 [details]
kdc-stacktrace.txt
Comment 6 Martin Mokrejš 2010-08-18 19:33:58 UTC
I get same output configure regarding the berkeley db version tests, so I can exclude that the db5 compatibility patch from bug #322709 is at fault.
Comment 7 Eray Aslan gentoo-dev 2010-08-18 20:36:34 UTC
Looks like linux version of dll hell.  depclean/prune sys-libs/db and build heimdal again.  You might want to revdep-rebuild for other applications as well.  Reopen if problem still persists.

Also, please attach full build logs, not just snippets.
Comment 8 Martin Mokrejš 2010-08-18 22:37:46 UTC
# emerge --prune --verbose sys-libs/db 

Calculating dependencies... done!
  sys-libs/db-4.5.20_p2-r1 pulled in by:
    dev-lang/python-2.5.4-r4

  sys-libs/db-4.7.25_p4 pulled in by:
    dev-lang/python-2.6.5-r3

  sys-libs/db-4.8.30 pulled in by:
    app-arch/rpm-4.4.6-r7
    app-crypt/heimdal-1.3.3-r1
    app-office/openoffice-3.2.1
    dev-lang/perl-5.12.1-r1
    dev-lang/php-5.3.3-r1
    dev-lang/ruby-1.8.7_p299
    dev-libs/apr-util-0.9.12
    dev-libs/apr-util-1.3.9-r1
    dev-libs/cyrus-sasl-2.1.23-r1
    dev-libs/redland-1.0.10-r2
    dev-python/bsddb3-5.0.0
    dev-vcs/subversion-1.6.12
    gnome-extra/evolution-data-server-2.30.2
    net-analyzer/dsniff-2.4_beta1-r4
    net-proxy/squid-3.1.6-r1
    perl-core/DB_File-1.820
    sys-apps/iproute2-2.6.35-r1
    sys-cluster/pvfs2-2.7.1
    sys-libs/gdbm-1.8.3-r4
    sys-libs/pam-1.1.1-r2


 sys-libs/db
    selected: 4.3.29_p1-r1 
   protected: none 
     omitted: 4.5.20_p2-r1 4.7.25_p4 4.8.30 

 sys-libs/db
    selected: 4.6.21_p4 
   protected: none 
     omitted: 4.5.20_p2-r1 4.7.25_p4 4.8.30 

 sys-libs/db
    selected: 4.2.52_p5-r1 
   protected: none 
     omitted: 4.5.20_p2-r1 4.7.25_p4 4.8.30 

 sys-libs/db
    selected: 3.2.9_p2 
   protected: none 
     omitted: 4.5.20_p2-r1 4.7.25_p4 4.8.30 

 sys-libs/db
    selected: 1.85-r3 
   protected: none 
     omitted: 4.5.20_p2-r1 4.7.25_p4 4.8.30 

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in:  5 4 ^Z
[1]+  Stopped                 emerge --prune --verbose sys-libs/db

Before I do this I will re-attach the complete build.log. I thought that the configure output is enough, sorry.
Comment 9 Martin Mokrejš 2010-08-19 07:26:56 UTC
(In reply to comment #7)
> Also, please attach full build logs, not just snippets.

Complete build.log from the broken install host is at http://195.113.57.32/~mmokrejs/tmp/build.log

Comment 10 Eray Aslan gentoo-dev 2010-08-19 13:43:18 UTC
If you cannot attach logs (bacause of size limit for example), it is better to compress and attach rather than hosting them elsewhere.

Just as a FYI for the future.
Comment 11 Martin Mokrejš 2010-08-23 20:32:09 UTC
# emerge --prune --verbose sys-libs/db

Calculating dependencies... done!
  sys-libs/db-4.5.20_p2-r1 pulled in by:
    dev-lang/python-2.5.4-r4

  sys-libs/db-4.7.25_p4 pulled in by:
    dev-lang/python-2.6.5-r3

  sys-libs/db-4.8.30 pulled in by:
    app-arch/rpm-4.4.6-r7
    app-crypt/heimdal-1.3.3-r1
    app-office/openoffice-3.2.1
    dev-lang/perl-5.12.1-r1
    dev-lang/php-5.3.3-r1
    dev-lang/ruby-1.8.7_p299
    dev-libs/apr-util-0.9.12
    dev-libs/apr-util-1.3.9-r1
    dev-libs/cyrus-sasl-2.1.23-r1
    dev-libs/redland-1.0.10-r2
    dev-python/bsddb3-5.0.0
    dev-vcs/subversion-1.6.12
    gnome-extra/evolution-data-server-2.30.2
    net-analyzer/dsniff-2.4_beta1-r4
    net-proxy/squid-3.1.6-r1
    perl-core/DB_File-1.820
    sys-apps/iproute2-2.6.35-r1
    sys-cluster/pvfs2-2.7.1
    sys-libs/gdbm-1.8.3-r4
    sys-libs/pam-1.1.1-r2


 sys-libs/db
    selected: 4.3.29_p1-r1 
   protected: none 
     omitted: 4.5.20_p2-r1 4.7.25_p4 4.8.30 

 sys-libs/db
    selected: 4.6.21_p4 
   protected: none 
     omitted: 4.5.20_p2-r1 4.7.25_p4 4.8.30 

 sys-libs/db
    selected: 4.2.52_p5-r1 
   protected: none 
     omitted: 4.5.20_p2-r1 4.7.25_p4 4.8.30 

 sys-libs/db
    selected: 3.2.9_p2 
   protected: none 
     omitted: 4.5.20_p2-r1 4.7.25_p4 4.8.30 

 sys-libs/db
    selected: 1.85-r3 
   protected: none 
     omitted: 4.5.20_p2-r1 4.7.25_p4 4.8.30 

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in:  5 4 3 2 1 
>>> Unmerging sys-libs/db-4.3.29_p1-r1...
No package files given... Grabbing a set.
<<<          obj /usr/share/db-4.3/package.env
<<<          obj /usr/share/db-4.3/lib/db-4.3.jar
<<<          obj /usr/sbin/berkeley_db43_svc
<<<          obj /usr/lib/libdb_tcl-4.3.so
<<<          obj /usr/lib/libdb_tcl-4.3.la
<<<          obj /usr/lib/libdb_tcl-4.3.a
<<<          obj /usr/lib/libdb_java-4.3.so
<<<          obj /usr/lib/libdb_java-4.3.la
<<<          obj /usr/lib/libdb_java-4.3.a
<<<          obj /usr/lib/libdb_cxx-4.3.so
<<<          obj /usr/lib/libdb_cxx-4.3.la
<<<          obj /usr/lib/libdb_cxx-4.3.a
<<<          obj /usr/lib/libdb-4.3.so
<<<          obj /usr/lib/libdb-4.3.la
<<<          obj /usr/lib/libdb-4.3.a
<<<          obj /usr/include/db4.3/db_cxx.h
<<<          obj /usr/include/db4.3/db_185.h
<<<          obj /usr/include/db4.3/db.h
<<<          obj /usr/bin/db4.3_verify
<<<          obj /usr/bin/db4.3_upgrade
<<<          obj /usr/bin/db4.3_stat
<<<          obj /usr/bin/db4.3_recover
<<<          obj /usr/bin/db4.3_printlog
<<<          obj /usr/bin/db4.3_load
<<<          obj /usr/bin/db4.3_dump
<<<          obj /usr/bin/db4.3_deadlock
<<<          obj /usr/bin/db4.3_checkpoint
<<<          obj /usr/bin/db4.3_archive
<<<          dir /usr/share/db-4.3/lib
<<<          dir /usr/share/db-4.3
--- !empty   dir /usr/share
--- !empty   dir /usr/sbin
--- !empty   dir /usr/lib
<<<          dir /usr/include/db4.3
--- !empty   dir /usr/include
--- !empty   dir /usr/bin
--- !empty   dir /usr
 * Creating db.h symlinks to db4.8
>>> Regenerating /etc/ld.so.cache...
>>> Unmerging sys-libs/db-4.6.21_p4...
No package files given... Grabbing a set.
<<<          obj /usr/share/db-4.6/package.env
<<<          obj /usr/share/db-4.6/lib/db-4.6.jar
<<<          obj /usr/sbin/berkeley_db46_svc
<<<          obj /usr/lib/libdb_tcl-4.6.so
<<<          obj /usr/lib/libdb_tcl-4.6.la
<<<          obj /usr/lib/libdb_tcl-4.6.a
<<<          obj /usr/lib/libdb_java-4.6.so
<<<          obj /usr/lib/libdb_java-4.6.la
<<<          obj /usr/lib/libdb_java-4.6.a
<<<          obj /usr/lib/libdb_cxx-4.6.so
<<<          obj /usr/lib/libdb_cxx-4.6.la
<<<          obj /usr/lib/libdb_cxx-4.6.a
<<<          obj /usr/lib/libdb-4.6.so
<<<          obj /usr/lib/libdb-4.6.la
<<<          obj /usr/lib/libdb-4.6.a
<<<          obj /usr/include/db4.6/db_cxx.h
<<<          obj /usr/include/db4.6/db_185.h
<<<          obj /usr/include/db4.6/db.h
<<<          obj /usr/bin/db4.6_verify
<<<          obj /usr/bin/db4.6_upgrade
<<<          obj /usr/bin/db4.6_stat
<<<          obj /usr/bin/db4.6_recover
<<<          obj /usr/bin/db4.6_printlog
<<<          obj /usr/bin/db4.6_load
<<<          obj /usr/bin/db4.6_hotbackup
<<<          obj /usr/bin/db4.6_dump
<<<          obj /usr/bin/db4.6_deadlock
<<<          obj /usr/bin/db4.6_codegen
<<<          obj /usr/bin/db4.6_checkpoint
<<<          obj /usr/bin/db4.6_archive
<<<          dir /usr/share/db-4.6/lib
<<<          dir /usr/share/db-4.6
--- !empty   dir /usr/share
--- !empty   dir /usr/sbin
--- !empty   dir /usr/lib
<<<          dir /usr/include/db4.6
--- !empty   dir /usr/include
--- !empty   dir /usr/bin
--- !empty   dir /usr
 * Creating db.h symlinks to db4.8
>>> Regenerating /etc/ld.so.cache...
>>> Unmerging sys-libs/db-4.2.52_p5-r1...
No package files given... Grabbing a set.
<<<          obj /usr/share/db-4.2/package.env
<<<          obj /usr/share/db-4.2/lib/db-4.2.jar
<<<          obj /usr/sbin/berkeley_db42_svc
<<<          obj /usr/lib/libdb_tcl-4.2.so
<<<          obj /usr/lib/libdb_tcl-4.2.la
<<<          obj /usr/lib/libdb_tcl-4.2.a
<<<          obj /usr/lib/libdb_java-4.2.so
<<<          obj /usr/lib/libdb_java-4.2.la
<<<          obj /usr/lib/libdb_java-4.2.a
<<<          obj /usr/lib/libdb_cxx-4.2.so
<<<          obj /usr/lib/libdb_cxx-4.2.la
<<<          obj /usr/lib/libdb_cxx-4.2.a
<<<          obj /usr/lib/libdb-4.2.so
<<<          obj /usr/lib/libdb-4.2.la
<<<          obj /usr/lib/libdb-4.2.a
<<<          obj /usr/include/db4.2/db_cxx.h
<<<          obj /usr/include/db4.2/db_185.h
<<<          obj /usr/include/db4.2/db.h
<<<          obj /usr/bin/db4.2_verify
<<<          obj /usr/bin/db4.2_upgrade
<<<          obj /usr/bin/db4.2_stat
<<<          obj /usr/bin/db4.2_recover
<<<          obj /usr/bin/db4.2_printlog
<<<          obj /usr/bin/db4.2_load
<<<          obj /usr/bin/db4.2_dump
<<<          obj /usr/bin/db4.2_deadlock
<<<          obj /usr/bin/db4.2_checkpoint
<<<          obj /usr/bin/db4.2_archive
<<<          dir /usr/share/db-4.2/lib
<<<          dir /usr/share/db-4.2
--- !empty   dir /usr/share
--- !empty   dir /usr/sbin
--- !empty   dir /usr/lib
<<<          dir /usr/include/db4.2
--- !empty   dir /usr/include
--- !empty   dir /usr/bin
--- !empty   dir /usr
 * Creating db.h symlinks to db4.8
>>> Regenerating /etc/ld.so.cache...
>>> Unmerging sys-libs/db-3.2.9_p2...
No package files given... Grabbing a set.
<<<          obj /usr/share/doc/db-3.2.9_p2/README.bz2
<<<          obj /usr/lib/libdb_cxx-3.2.so
<<<          obj /usr/lib/libdb_cxx-3.2.la
<<<          obj /usr/lib/libdb_cxx-3.2.a
<<<          obj /usr/lib/libdb-3.2.so
<<<          obj /usr/lib/libdb-3.2.la
<<<          obj /usr/lib/libdb-3.2.a
<<<          obj /usr/include/db3/db_cxx.h
<<<          obj /usr/include/db3/db_185.h
<<<          obj /usr/include/db3/db.h
<<<          obj /usr/bin/db3_verify
<<<          obj /usr/bin/db3_upgrade
<<<          obj /usr/bin/db3_stat
<<<          obj /usr/bin/db3_recover
<<<          obj /usr/bin/db3_printlog
<<<          obj /usr/bin/db3_load
<<<          obj /usr/bin/db3_dump185
<<<          obj /usr/bin/db3_dump
<<<          obj /usr/bin/db3_deadlock
<<<          obj /usr/bin/db3_checkpoint
<<<          obj /usr/bin/db3_archive
<<<          dir /usr/share/doc/db-3.2.9_p2
--- !empty   dir /usr/share/doc
--- !empty   dir /usr/share
--- !empty   dir /usr/lib
<<<          dir /usr/include/db3
--- !empty   dir /usr/include
--- !empty   dir /usr/bin
--- !empty   dir /usr
 * Creating db.h symlinks to db4.8
>>> Regenerating /etc/ld.so.cache...
>>> Unmerging sys-libs/db-1.85-r3...
No package files given... Grabbing a set.
<<<          obj /usr/share/doc/db-1.85-r3/ps/recno.3.ps.bz2
<<<          obj /usr/share/doc/db-1.85-r3/ps/mpool.3.ps.bz2
<<<          obj /usr/share/doc/db-1.85-r3/ps/libtp.usenix.ps.bz2
<<<          obj /usr/share/doc/db-1.85-r3/ps/hash.usenix.ps.bz2
<<<          obj /usr/share/doc/db-1.85-r3/ps/hash.3.ps.bz2
<<<          obj /usr/share/doc/db-1.85-r3/ps/dbopen.3.ps.bz2
<<<          obj /usr/share/doc/db-1.85-r3/ps/btree.3.ps.bz2
<<<          obj /usr/share/doc/db-1.85-r3/changelog.bz2
<<<          obj /usr/share/doc/db-1.85-r3/README.hash.bz2
<<<          obj /usr/share/doc/db-1.85-r3/README.bz2
<<<          sym /usr/lib/libndbm.so
<<<          sym /usr/lib/libndbm.a
<<<          obj /usr/lib/libdb1.so.2
<<<          sym /usr/lib/libdb1.so
<<<          obj /usr/lib/libdb1.a
<<<          sym /usr/lib/libdb.so.2
<<<          sym /usr/include/ndbm.h
<<<          obj /usr/include/db1/ndbm.h
<<<          obj /usr/include/db1/mpool.h
<<<          obj /usr/include/db1/db.h
<<<          obj /usr/bin/db1_dump185
<<<          dir /usr/share/doc/db-1.85-r3/ps
<<<          dir /usr/share/doc/db-1.85-r3
--- !empty   dir /usr/share/doc
--- !empty   dir /usr/share
--- !empty   dir /usr/lib
<<<          dir /usr/include/db1
--- !empty   dir /usr/include
--- !empty   dir /usr/bin
--- !empty   dir /usr
>>> Regenerating /etc/ld.so.cache...

Comment 12 Martin Mokrejš 2010-08-24 19:34:47 UTC
After unmerging all sys-libs/db except 4.5.20_p2-r1, 4.7.25_p4, 4.8.30 I re-compiled heimdal and now kdc does not crash anymore. What I do not understand why is that if ldd claimed in original report that the same db library 4.8 was being used (as is showing now as well, see below).



checking db4/db.h usability... no
checking db4/db.h presence... no
checking for db4/db.h... no
checking db3/db.h usability... no
checking db3/db.h presence... no
checking for db3/db.h... no
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking db_185.h usability... yes
checking db_185.h presence... yes
checking for db_185.h... yes
checking for db_create... yes, in -ldb
checking for dbm_firstkey... yes, in -ldb


Another puzzling fact is this out from configure - showing that db-4.8 is not used during compilation and it falls back to an old, 1.85 which had different database drivers (some were removed I think in version 2 and also in 3). I think the 2.85 are coming from those newer db version but are isntalled as the fallback support as additional stuff.

# equery files sys-libs/db-4.8.30 
 * Searching for db4.8.30 in sys-libs ...
 * Contents of sys-libs/db-4.8.30:
[cut]
/usr/include/db4.8/db.h
/usr/include/db4.8/db_185.h
/usr/include/db4.8/db_cxx.h
[cut]
/usr/lib/libdb-4.8.a
/usr/lib/libdb-4.8.la
/usr/lib/libdb-4.8.so
[cut]

In brief, heimdal requires 1.85 support enabled through USE=db185^H^H^H^H^H^H.
It seems luckily --enable-compat185 is hardwired in db-4.5.20_p2-r1 and db-4.8.30 ebuilds (I haven't bothered to check others). I think there used to be a USE flags for that in the very past.

I will try to break my system again by installation of some of the db-3.* series.
Comment 13 Eray Aslan gentoo-dev 2010-08-24 20:30:26 UTC
(In reply to comment #12)
> After unmerging all sys-libs/db except 4.5.20_p2-r1, 4.7.25_p4, 4.8.30 I
> re-compiled heimdal and now kdc does not crash anymore.

Good.

> I will try to break my system again by installation of some of the db-3.*
> series.

In general, you should avoid the temptation to mess with your db files.  If you do and break your system, you get to keep the pieces.

Dont forget to run revdep-rebuild.  Closing.
Comment 14 Martin Mokrejš 2010-08-25 07:02:43 UTC
I installed db-3 along the 4.x series, restarted existing kdc binary which albeit claiming by ldd to be linked against libdb-4.8.so was actually compiled against the db1.85 compat header (see comment #12). Then I tried su(1) to a root shell, and kdc did not crash.

Then I recompiled heimdal and let it's configure be fooled by Gentoo FHS locations of the db files. After restarting kdc is crashes again. I suspect configure does not cope properly with Gentoo layout of the db files. See the original build.log and config.log for details.

Below are the files installed by the db-3 package:

# ls -lat /usr/lib/libdb*
lrwxrwxrwx 1 root root       11 Aug 24 21:48 /usr/lib/libdb-1.so -> libdb1.so.2
lrwxrwxrwx 1 root root       12 Aug 24 21:48 /usr/lib/libdb-3.so -> libdb-3.2.so
lrwxrwxrwx 1 root root       11 Aug 24 21:48 /usr/lib/libdb.a -> libdb-4.8.a
lrwxrwxrwx 1 root root       12 Aug 24 21:48 /usr/lib/libdb.so -> libdb-4.8.so
lrwxrwxrwx 1 root root       11 Aug 24 21:48 /usr/lib/libdb.so.2 -> libdb1.so.2
lrwxrwxrwx 1 root root       12 Aug 24 21:48 /usr/lib/libdb.so.3 -> libdb-3.2.so
lrwxrwxrwx 1 root root       11 Aug 24 21:48 /usr/lib/libdb1.so -> libdb1.so.2
lrwxrwxrwx 1 root root       16 Aug 24 21:48 /usr/lib/libdb_cxx-3.so -> libdb_cxx-3.2.so
lrwxrwxrwx 1 root root       15 Aug 24 21:48 /usr/lib/libdb_cxx.a -> libdb_cxx-4.8.a
lrwxrwxrwx 1 root root       16 Aug 24 21:48 /usr/lib/libdb_cxx.so -> libdb_cxx-4.8.so
lrwxrwxrwx 1 root root       16 Aug 24 21:48 /usr/lib/libdb_cxx.so.3 -> libdb_cxx-3.2.so
lrwxrwxrwx 1 root root       16 Aug 24 21:48 /usr/lib/libdb_java.a -> libdb_java-4.8.a
lrwxrwxrwx 1 root root       17 Aug 24 21:48 /usr/lib/libdb_java.so -> libdb_java-4.8.so
lrwxrwxrwx 1 root root       15 Aug 24 21:48 /usr/lib/libdb_stl.a -> libdb_stl-4.8.a
lrwxrwxrwx 1 root root       16 Aug 24 21:48 /usr/lib/libdb_stl.so -> libdb_stl-4.8.so
lrwxrwxrwx 1 root root       15 Aug 24 21:48 /usr/lib/libdb_tcl.a -> libdb_tcl-4.8.a
lrwxrwxrwx 1 root root       16 Aug 24 21:48 /usr/lib/libdb_tcl.so -> libdb_tcl-4.8.so

I wonder why all the symlinks were re-created or their time was modified by db-3 ebuild.

# ls -lat /usr/include/db3/
total 124
drwxr-xr-x 423 root root 36864 Aug 25 01:32 ..
drwxr-xr-x   2 root root  4096 Aug 24 21:48 .
-r--r--r--   1 root root 51043 Aug 24 21:40 db.h
-r--r--r--   1 root root  5657 Aug 24 21:40 db_185.h
-r--r--r--   1 root root 19381 Aug 24 21:39 db_cxx.h
# ls -lat /usr/include/db4.8
total 652
drwxr-xr-x 423 root root  36864 Aug 25 01:32 ..
drwxr-xr-x   2 root root   4096 Aug 18 00:31 .
-r--r--r--   1 root root 107756 Aug 18 00:18 db.h
-r--r--r--   1 root root   5960 Aug 18 00:18 db_185.h
-r--r--r--   1 root root  18695 Aug 18 00:18 dbstl_common.h
-r--r--r--   1 root root  44005 Aug 18 00:18 db_cxx.h
-r--r--r--   1 root root  16156 Apr 12 22:25 dbstl_base_iterator.h
-r--r--r--   1 root root  18699 Apr 12 22:25 dbstl_container.h
-r--r--r--   1 root root  34627 Apr 12 22:25 dbstl_dbc.h
-r--r--r--   1 root root  18206 Apr 12 22:25 dbstl_dbt.h
-r--r--r--   1 root root  23473 Apr 12 22:25 dbstl_element_ref.h
-r--r--r--   1 root root   6613 Apr 12 22:25 dbstl_exception.h
-r--r--r--   1 root root   1934 Apr 12 22:25 dbstl_inner_utility.h
-r--r--r--   1 root root 106690 Apr 12 22:25 dbstl_map.h
-r--r--r--   1 root root  12814 Apr 12 22:25 dbstl_resource_manager.h
-r--r--r--   1 root root  49254 Apr 12 22:25 dbstl_set.h
-r--r--r--   1 root root  15452 Apr 12 22:25 dbstl_utility.h
-r--r--r--   1 root root  96868 Apr 12 22:25 dbstl_vector.h
# ls -lat /usr/include/db_185.h 
lrwxrwxrwx 1 root root 14 Aug 24 21:48 /usr/include/db_185.h -> db4.8/db_185.h
# ls -lat /usr/include/db.h 
lrwxrwxrwx 1 root root 10 Aug 24 21:48 /usr/include/db.h -> db4.8/db.h
#

As you could see above, the header symlinks pointing to 4.8 were touched by 3.x ebuild as well. I do not say this is a bug but still wonder why is that happening at all.

To recapitulate, on the "broken" host I have installed and if db-4.x are not to be installed on the same host then they should block each other:
1.85-r3 3.2.9_p2 4.5.20_p2-r1 4.7.25_p4 4.8.30
Comment 15 Eray Aslan gentoo-dev 2010-08-26 12:03:41 UTC
Please do

# cd /usr/include
# ln -s db4 db4.8
# USE=berkdb emerge =heimdal-1.3.3-r1

and see if it still segfaults.  Thanks.
Comment 16 Martin Mokrejš 2010-08-27 11:43:49 UTC
(In reply to comment #15)
> Please do
> 
> # cd /usr/include
> # ln -s db4 db4.8

I did "ln -s db4.8 db4" instead.

> # USE=berkdb emerge =heimdal-1.3.3-r1

checking db4/db.h usability... yes
checking db4/db.h presence... yes
checking for db4/db.h... yes
checking db3/db.h usability... yes
checking db3/db.h presence... yes
checking for db3/db.h... yes
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking db_185.h usability... yes
checking db_185.h presence... yes
checking for db_185.h... yes
checking for db_create... yes, in -ldb
checking for dbm_firstkey... yes, in -ldb


Yes, kdc does not crash after restart and su(1) anymore.
Comment 17 Eray Aslan gentoo-dev 2010-08-31 12:46:15 UTC
Created attachment 245473 [details]
heimdal-1.3.3-r2.ebuild

Please check if this version works for you wrt db files.
Comment 18 Martin Mokrejš 2010-09-03 01:12:22 UTC
(In reply to comment #17)
> Created an attachment (id=245473) [details]
> heimdal-1.3.3-r2.ebuild
> 
> Please check if this version works for you wrt db files.
> 

I did not delete the symlink I created manually on your request in /usr/include:

lrwxrwxrwx   1 root root       5 Aug 27 11:57 db4 -> db4.8



checking db4.8/db.h usability... yes
checking db4.8/db.h presence... yes
checking for db4.8/db.h... yes
checking db3/db.h usability... yes
checking db3/db.h presence... yes
checking for db3/db.h... yes
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking db_185.h usability... yes
checking db_185.h presence... yes
checking for db_185.h... yes
checking for db_create... yes, in -ldb
checking for dbm_firstkey... yes, in -ldb

I re-started kdc and it does not die when user uses su(1).



I then removed the manually introduced symlink, recompiled, restarted kdc:

[cut]
 * Applying heimdal_db5.patch ...                                                                                                                                                    [ ok ]
 * Applying heimdal_testsuite.patch ...                                                                                                                                              [ ok ]
 * Applying heimdal_testsuite_extra.patch ...                                                                                                                                        [ ok ]
 * Applying heimdal_disable-check-iprop.patch ...                                                                                                                                    [ ok ]
 * Applying heimdal_openssl-1.patch ...                                                                                                                                              [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-crypt/heimdal-1.3.3-r2/work/heimdal-1.3.3 ...
 * econf: updating heimdal-1.3.3/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating heimdal-1.3.3/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-kcm --disable-osfc2 --enable-shared --with-libintl=/usr --with-readline=/usr --with-sqlite3=/usr --libexecdir=/usr/sbin --disable-afs-support --enable-berkeley-db --disable-otp --disable-kx509 --disable-pk-init --enable-pthread-support --without-openldap --without-ipv6 --with-openssl=/usr --with-x
[cut]
checking db4.8/db.h usability... yes
checking db4.8/db.h presence... yes
checking for db4.8/db.h... yes
checking db3/db.h usability... yes
checking db3/db.h presence... yes
checking for db3/db.h... yes
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking db_185.h usability... yes
checking db_185.h presence... yes
checking for db_185.h... yes
checking for db_create... yes, in -ldb
checking for dbm_firstkey... yes, in -ldb

kdc works as well. Thanks for your efforts.
Comment 19 Eray Aslan gentoo-dev 2010-09-05 11:30:06 UTC
Thank you for testing.  I will submit a proper patch upstream and revize the ebuild with the next bump.
Comment 20 Martin Mokrejš 2010-10-10 19:12:09 UTC
(In reply to comment #19)
> Thank you for testing.  I will submit a proper patch upstream and revize the
> ebuild with the next bump.
> 

Would you mind providing us with 2.4 ebuild? ;-) Thanks!
Comment 21 Martin Mokrejš 2010-10-10 19:12:48 UTC
(In reply to comment #20)
> (In reply to comment #19)
> > Thank you for testing.  I will submit a proper patch upstream and revize the
> > ebuild with the next bump.
> > 
> 
> Would you mind providing us with 2.4 ebuild? ;-) Thanks!


1.4 of course. ;)

Comment 22 Eray Aslan gentoo-dev 2010-10-10 20:06:49 UTC
1.4 is a problematic release.  1.4.1 will be out soon and will be added to the tree.

For the record, this bug has been properly fixed by the following commit:
http://github.com/heimdal/heimdal/commit/a1c14b231996ebd72de69df1de472f08e82c2288
Comment 23 Martin Mokrejš 2011-02-09 21:46:13 UTC
(In reply to comment #22)
> 1.4 is a problematic release.  1.4.1 will be out soon and will be added to the
> tree.
> 
> For the record, this bug has been properly fixed by the following commit:
> http://github.com/heimdal/heimdal/commit/a1c14b231996ebd72de69df1de472f08e82c2288
> 

Eray, would you mind committing the 1.3.3-r2 ebuild fixing the issue? How long is this bug open?
Comment 24 Eray Aslan gentoo-dev 2011-02-15 06:12:15 UTC
(In reply to comment #23)
> Eray, would you mind committing the 1.3.3-r2 ebuild fixing the issue? How long
> is this bug open?

No.  I am not planning to rev bump because of this bug.  I will see what I can do for a 1.4.1_pre release.
Comment 25 Eray Aslan gentoo-dev 2011-02-16 22:21:01 UTC
*heimdal-1.4.1_pre20110216 (16 Feb 2011)

  16 Feb 2011; Eray Aslan <eras@gentoo.org>
  +heimdal-1.4.1_pre20110216.ebuild, +files/heimdal-kadmind.confd,
  +files/heimdal-kadmind.initd-r1, +files/heimdal-kcm.confd,
  +files/heimdal-kcm.initd-r1, +files/heimdal-kdc.confd,
  +files/heimdal-kdc.initd-r1, +files/heimdal-kpasswdd.confd,
  +files/heimdal-kpasswdd.initd-r1, +files/heimdal_link_order.patch:
  Version bump. Dropped m68k bug #324097. Dropped s390 and sh bug #355253.
  Double blocker to mit-krb5 bug #296610. Better support for sys-libs/db bug
  #333341. Added confd options bug #339340.
Comment 26 Martin Mokrejš 2011-02-18 20:14:57 UTC
Thanks, works for me.