Subject: kern/17852: Shared library selection bug in -current
To: None <>
From: None <>
List: netbsd-bugs
Date: 08/06/2002 09:12:55
>Number:         17852
>Category:       kern
>Synopsis:       "Teeny" versions of .so. are preferred over later minors
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 06 00:13:00 PDT 2002
>Originator:     Tom Ivar Helbekkmo
>Release:        NetBSD 1.6D
System: NetBSD 1.6D NetBSD 1.6D (ARGUS) #1: Thu Jul 11 09:29:39 CEST 2002 i386
Architecture: i386
Machine: i386

I've recently had occasion to figure out a weird problem with the way
shared libraries are selected for use under -current.  An application
(AOLserver) started dumping core after I updated to a new -current a
couple of weeks ago, and after a bit of digging I suddenly noticed
that the core dumps indicated it was loaded with an old  The
full name of the library gave me pause: "".  Three
numbers after the ".so."?

Here's what I had in /usr/lib:

/usr/lib/ ->
/usr/lib/ ->

Restarting the application, rebuilding it and restarting, rebooting
the whole computer -- nothing helped.  The only way I could get a
later version of the library than 12.62.1 to be used, was to remove
that version from /usr/lib.  Upon doing that, AOLserver immediately
worked properly again.

This explains the sporadic AOLserver crashes I've had since updating
to the -current that had, in fact: after removing the
12.62.1 file, the application is once more completely stable.


Set up a comparable configuration.  Observe the run-time loader pick
the wrong library.


A workaround is to remove or rename libraries with "teeny" versions.