1.15.19 dlopen() dies with no dlerror()
Jim Kleckner
jek-cygwin1@kleckner.net
Wed May 24 01:16:00 GMT 2006
Jim Kleckner wrote:
> Michael McKerns wrote:
>> Yes, yes... I've not given you enough information...
>> ...
>> See:
>> http://cygwin.com/cygwin-ug-net/dll.html
>> http://cygwin.com/faq.html#faq.programming.dll-relocatable
>>
> I'm seeing a similar problem with python and 1.5.19 and also tried the
> snapshot of 22-May.
>
> CYGWIN_NT-5.1 kleckner2 1.5.20s(0.155/4/2) 20060522 00:51:23 i686 Cygwin
>
> A simple test case doesn't fail in dlopen().
>
> My code is not simple but has been working prior to the most recent
> update (which also updated python and other packages).
> A downrev of python does not make the problem go away. If I downrev
> cygwin, I get complaints about missing entry points.
>
> What do you recommend as the best way to isolate this?
I tried using "prev" with setup.exe but that didn't make the problem go
away.
A simple test case with python access to a trivial function works fine
(can supply if anyone wants).
The complex dll that used to work simply doesn't return from dlopen.
I downloaded the 20060522 snapshot with debug symbols to get a backtrace
with GDB.
GDB says there is a seg fault and somehow this is preventing any
information from reaching dlerror().
Without the dlerror() info, it is hard to figure out what needs to
change with the dll.
It appears that some constructors are having trouble.
Let me know if there is some single stepping that could be helpful.
==================== Trivial program to use dlopen on a non-trivial dll
#include <stdio.h>
#include <dlfcn.h>
int main( int argc, char **argv)
{
fprintf( stderr, "Error: %s\n", dlerror());
void *dlp = dlopen("_pycode.dll", RTLD_NOW);
fprintf( stderr, "Error: %s\n", dlerror());
return 0;
}
==================== GDB Traceback
$ gdb a.exe
GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) run
Starting program: .../Programs/a.exe
Error: (null)
Program received signal SIGSEGV, Segmentation fault.
0x610b1ff8 in pthread_key_create () from /usr/bin/cygwin1.dll
(gdb) add-symbol-file /bin/cygwin1-20060522.dbg
add symbol table from file "/bin/cygwin1-20060522.dbg" at
(y or n) y
Reading symbols from /bin/cygwin1-20060522.dbg...warning: no loadable
sections found in added symbol-file /bin/cygwin1-20060522.dbg
done.
Current language: auto; currently c++
(gdb) bt
#0 0x610b1ff8 in pthread_key_create (key=0x6622f8, destructor=0) at
/netrel/src/cygwin-snapshot-20060522-1/winsup/cygwin/thread.cc:129
#1 0x61090d68 in _sigfe () at
/netrel/src/cygwin-snapshot-20060522-1/winsup/cygwin/cygserver.h:82
#2 0x59432d52 in ?? ()
#3 0x00662300 in ?? ()
#4 0x00000001 in ?? ()
#5 0x00662300 in ?? ()
#6 0x0022c204 in ?? ()
#7 0x610b2cd7 in pthread::once (once_control=0x662300,
init_routine=0x22c264) at
/netrel/src/cygwin-snapshot-20060522-1/winsup/cygwin/thread.cc:2000
#8 0x610b2cd7 in pthread::once (once_control=0x662300,
init_routine=0x6846a760 <fc_key_init>)
at /netrel/src/cygwin-snapshot-20060522-1/winsup/cygwin/thread.cc:2000
#9 0x61090d68 in _sigfe () at
/netrel/src/cygwin-snapshot-20060522-1/winsup/cygwin/cygserver.h:82
#10 0x0022c234 in ?? ()
#11 0x6846a825 in _Unwind_SjLj_Register () from .../_pycode.dll
#12 0x6846a825 in _Unwind_SjLj_Register () from .../_pycode.dll
#13 0x6845e173 in std::ios_base::Init::Init () from .../_pycode.dll
#14 0x6845bb20 in __static_initialization_and_destruction_0
(__initialize_p=1, __priority=1627983208)
at /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/iostream:77
#15 0x61010243 in per_module::run_ctors (this=0x0) at
/netrel/src/cygwin-snapshot-20060522-1/winsup/cygwin/dll_init.cc:55
#16 0x00000001 in ?? ()
#17 0x61010290 in dll::init (this=0x61010a7e) at
/netrel/src/cygwin-snapshot-20060522-1/winsup/cygwin/dll_init.cc:81
#18 0x68550008 in ?? ()
#19 0x00000000 in ?? () from
(gdb)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20060524/9ea4b273/attachment.ksh>
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list