_dl_catch_error problems

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

_dl_catch_error problems

Geoff Elgey
_dl_catch_error problems

G'day,

I've just spent quite a few hours trying to get the engine_pkcs11.so and openssl libraries to happily co-exist. Specifically, I got _dl_catch_error failures when the engine control "LOAD" was added during the initialization phase:

## Adding attribute SO_PATH with value /usr/local/lib/opensc/engine_open.so to engine ... ok
## Adding attribute ID with value opensc to engine ... ok
## Adding attribute LIST_ADD with value 1 to engine ... ok
## Adding attribute LOAD with value (null) to engine ... failed: error:25066067:DSO support routines:func(102):reason(103)

Control passes to dlfcn_open, and then something goes wrong and _dl_catch_error is called, and control goes back up the stack and returns a 103

Now, however, after some reconfiguring and reinstalling,  the opensc and libcrypto.so libraries are happily co-existing. However I didn't note the exact combination of settings that generates this state, and I'm worried that any change (such as a bug fix) may resut in the _dl_catch_error situation again.

Question: why was I getting _dl_catch_error problems in the first place? Are there dependencies between opensc and openssl and dynamic loading that can easily be broken (such as, nested dlopen calls? or should libcrypto be statically linked to engine_pkcs11.so? etc).

Any help appreciated so that I can prevent this from happening again.

-- Geoff



_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

_dl_catch_error problems

Geoff Elgey
_dl_catch_error problems

G'day,

I've just spent quite a few hours trying to get the engine_pkcs11.so and openssl libraries to happily co-exist. Specifically, I got _dl_catch_error failures when the engine control "LOAD" was added during the initialization phase:

## Adding attribute SO_PATH with value /usr/local/lib/opensc/engine_open.so to engine ... ok
## Adding attribute ID with value opensc to engine ... ok
## Adding attribute LIST_ADD with value 1 to engine ... ok
## Adding attribute LOAD with value (null) to engine ... failed: error:25066067:DSO support routines:func(102):reason(103)

Control passes to dlfcn_open, and then something goes wrong and _dl_catch_error is called, and control goes back up the stack and returns a 103

Now, however, after some reconfiguring and reinstalling,  the opensc and libcrypto.so libraries are happily co-existing. However I didn't note the exact combination of settings that generates this state, and I'm worried that any change (such as a bug fix) may resut in the _dl_catch_error situation again.

Question: why was I getting _dl_catch_error problems in the first place? Are there dependencies between opensc and openssl and dynamic loading that can easily be broken (such as, nested dlopen calls? or should libcrypto be statically linked to engine_pkcs11.so? etc).

Any help appreciated so that I can prevent this from happening again.

-- Geoff


_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: _dl_catch_error problems [u]

Andreas Jellinghaus-2
Hi Geoff,

sorry, I don't know either. Please share a few details with us:
windows, linux, mac os X, *bsd, solaris - which operating system
are you using?

openssl: which version do you use?

There are some issues with openssl 0.9.6 (might have no engine),
and 0.9.7 .. 0.9.7c (needs special flags to compile the engine).
and 0.9.8 isn't well tested I guess - too new. so which version
do you use? and the opensc configure script outputs a summary
at the end : could you post that/the three openssl related lines?

maybe we find a hint that way what went wrong.
but I'm no expert on that area, I'm not sure if anyone
is, so if you want to track downt the issue and help us
improving opensc, that would be very welcome.

Regards, Andreas
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

RE: _dl_catch_error problems [u]

Geoff Elgey
In reply to this post by Geoff Elgey
RE: [opensc-devel] _dl_catch_error problems [u]

G'day,

> sorry, I don't know either. Please share a few details with us:
> windows, linux, mac os X, *bsd, solaris - which operating system
> are you using?

Suse 9.2

> openssl: which version do you use?

0.9.7d and 0.9.7g

> There are some issues with openssl 0.9.6 (might have no engine),
> and 0.9.7 .. 0.9.7c (needs special flags to compile the engine).
> and 0.9.8 isn't well tested I guess - too new. so which version
> do you use? and the opensc configure script outputs a summary
> at the end : could you post that/the three openssl related lines?

I'd been using the opensc-20050530 snapshot and openssl 0.9.7g without problems for about 4 weeks, but whataver change I made recently introduced the dl error. I cannot recall what that change was.

I've now got opensc and openssl working together, so the config summary is not  of much use. I blew away my opensc and reinstalled it a few times before I finally got it working.

On reflection, it may be that I originally configured and installed opensc using an older version of openssl (and the configure script may have retained the CFLAGS used by that openssl install to build opensc). Then I built andi installed a new openssl using different CFLAGS (for example, threaded vs non-threaded) which may have caused problems. This would require rebuilding opensc again using the new openssl settings.

Although now, on Sparc Solaris 8, I get the following:

## Adding attribute ID with value pkcs11 to engine ... ok
## Adding attribute LIST_ADD with value 1 to engine ... ok
## Adding attribute SO_PATH with value /usr/local/lib/opensc-pkcs11.so to engine ... ok
## Adding attribute LOAD with value <null> to engine ... failed: error:2506406A:DSO support routines:func(100):reason(106)

Sigh.

-- Geoff
-- Geoff


_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: _dl_catch_error problems

Peter Stuge
In reply to this post by Geoff Elgey
Hi,

On Tue, Jul 12, 2005 at 08:37:26PM +1000, Geoff Elgey wrote:
> ## Adding attribute SO_PATH with value
> /usr/local/lib/opensc/engine_open.so to engine ... ok
                                  ^^^

> ## Adding attribute ID with value opensc to engine ... ok
> ## Adding attribute LIST_ADD with value 1 to engine ... ok
> ## Adding attribute LOAD with value (null) to engine ... failed:
> error:25066067:DSO support routines:func(102):reason(103)

$ openssl errstr 25066067
error:25066067:DSO support routines:DLFCN_LOAD:could not load the
shared library

[..]

> Question: why was I getting _dl_catch_error problems in the first
> place?

I think you just missed the two characters sc in the filename.


On Wed, Jul 13, 2005 at 07:51:33AM +1000, Geoff Elgey wrote:
[..]
> now, on Sparc Solaris 8, I get the following:
>
> ## Adding attribute ID with value pkcs11 to engine ... ok
> ## Adding attribute LIST_ADD with value 1 to engine ... ok
> ## Adding attribute SO_PATH with value
> /usr/local/lib/opensc-pkcs11.so to engine ... ok
> ## Adding attribute LOAD with value <null> to engine ... failed:
> error:2506406A:DSO support routines:func(100):reason(106)

$ openssl errstr 2506406A
error:2506406A:DSO support routines:DLFCN_BIND_FUNC:could not bind to
the requested symbol name

This I don't know about. Seems like openssl doesn't find what it
expects inside the pkcs11 shared object..


//Peter
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel