Re: dlopen segv in ppc libc6 pkg
On Thu, Sep 12, 2002 at 12:45:36AM -0400, Mike Furr wrote:
> [please CC, as I'm not on the list]
>
> I believe there is a problem in the dlopen function in sid's
> libc6(2.2.5-14.1) on ppc. Unfortuanately I just started playing around
> with the program on this arch, so I don't know if the bugs been around
> for a while, or arose in the recent nmu'd version of libc6.
>
> I'm working on packaging a program that dlopen's a bunch of plugins.
> The code used to call this is:
> fprintf(stderr, "dlopening: %s\n", path);
> if(!plugin_fd) plugin_fd = dlopen(path, RTLD_NOW);
> fprintf(stderr,"returned\n");
>
> but sadly the dlopen call never returns:
Well, that's not the right behavior probably. We'd need more
information.
But it looks to me from the GDB trace as if you're dlopening a library
which is linked to libpthread, and your main application is not. I can
assure you that that isn't going to work properly. If you want to
support threaded plugins the app must be threaded.
> [...]
> dlopening: /usr/lib/cinelerra/crossfade.plugin
> returned
> dlopening: /usr/lib/cinelerra/defaulttheme.plugin
> returned
> dlopening: /usr/lib/cinelerra/deinterlace.plugin
> [New Thread 1024 (LWP 11856)]
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1024 (LWP 11856)]
> 0x30011f84 in stpcpy () from /lib/ld.so.1
> (gdb) bt
> #0 0x30011f84 in stpcpy () from /lib/ld.so.1
> #1 0x3001092c in dl_reloc_overflow () from /lib/ld.so.1
> #2 0x30010c08 in __process_machine_rela () from /lib/ld.so.1
> #3 0x3000a644 in _dl_relocate_object () from /lib/ld.so.1
> #4 0x0f86bd58 in getutmpx () from /lib/libc.so.6
> #5 0x3000bf20 in _dl_catch_error () from /lib/ld.so.1
> #6 0x0f86c000 in _dl_open () from /lib/libc.so.6
> #7 0x0f9c5070 in _SDA_BASE_ () from /lib/libdl.so.2
> (gdb)
>
> The plugin is the 13th to be loaded. The first twelve seem to load fine
> and the 13th fails every time. Everything works fine when I run it on
> my i686. The ppc machine is a 800Mhz TiBook using the standard
> gcc(2.95.4).
> Let me know if I can provide any further details, or if you want me to
> open a bug report for tracking purposes.
>
> -m
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
Reply to: