This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Mutex init failure trying to run Scribus


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian Dessent wrote:
[snip]
> You can ignore that.  Just type "continue" and things will work fine. 
> There is probably a way you instruct gdb to automatically ignore this
> but I don't know what it is off the top of my head.

Thanks!  Using continue after 2 of those SIGSEGV the program finally started.
Then many more appeared before the splash screen appears (which is the first
thing you see while running this program)... every SIGSEGV is received after
doing a pthread operation.

> The reason you get that is because of the verifyable_object business
> where a data structure is checked for a magic number before continuing,
> but in this case the thing being checked is an uninitialized pointer. 
> However this is handled by design with the "efault" mechanism which
> installs a temporary SEH handler that allows the code to specify "if
> something segfaults in the current lexical block, don't bail out but
> instead do the following", as can be seen in
> verifyable_object_isvalid():
> 
>   myfault efault;
>   if (efault.faulted ())
>     return INVALID_OBJECT;
> 
>   if ((static_ptr1 && *object == static_ptr1) ||
>       (static_ptr2 && *object == static_ptr2) ||
>       (static_ptr3 && *object == static_ptr3))
>     return VALID_STATIC_OBJECT;
>   if ((*object)->magic != magic)
>     return INVALID_OBJECT;
>   return VALID_OBJECT;
> 
> On the other hand, it would be nice to know what is calling
> pthread_key_create on a null pointer, since that sounds like a buglet,
> but due to the above it's a benign situation.

It seems to be the qt3 dll use of threads, the first looks like this:

(gdb) where
#0  0x610ad5e8 in pthread_key_create (key=0x100e25f0, destructor=0)
    at /netrel/src/cygwin-snapshot-20051207-1/winsup/cygwin/thread.cc:129
#1  0x6108d16f in _sigfe ()
    at /netrel/src/cygwin-snapshot-20051207-1/winsup/cygwin/cygserver.h:82
#2  0x59432d52 in ?? ()
#3  0x100e25f8 in ?? ()
#4  0x00000001 in ?? ()
#5  0x100e25f8 in ?? ()
#6  0x0022edb8 in ?? ()
#7  0x610ae367 in pthread::once (once_control=0x100e25f8,
    init_routine=0x22ee08)
    at /netrel/src/cygwin-snapshot-20051207-1/winsup/cygwin/thread.cc:2027
#8  0x610ae367 in pthread::once (once_control=0x100e25f8,
    init_routine=0x714b6e30
<cygqt-mt-3!_ZN11QMotifStyle18qt_static_propertyEP7QObjectiiP8QVariant+18128>)
    at /netrel/src/cygwin-snapshot-20051207-1/winsup/cygwin/thread.cc:2027
#9  0x6108d16f in _sigfe ()
    at /netrel/src/cygwin-snapshot-20051207-1/winsup/cygwin/cygserver.h:82
#10 0x0022ede8 in ?? ()
#11 0x714b6ef5 in
cygqt-mt-3!_ZN11QMotifStyle18qt_static_propertyEP7QObjectiiP8QVariant () from
/bin/cygqt-mt-3.dll
#12 0x714b6ef5 in
cygqt-mt-3!_ZN11QMotifStyle18qt_static_propertyEP7QObjectiiP8QVariant () from
/bin/cygqt-mt-3.dll
#13 0x714b4fe3 in cygqt-mt-3!_ZN11QMotifStyle18qt_static_propertyEP7QObjectiiP8Q
Variant () from /bin/cygqt-mt-3.dll
#14 0x711a990f in cygqt-mt-3!_ZN18QMetaObjectCleanUpC1EPKcPFP11QMetaObjectvE ()
   from /bin/cygqt-mt-3.dll
#15 0x714b27c2 in
cygqt-mt-3!_ZN11QMotifStyle18qt_static_propertyEP7QObjectiiP8QVariant () from
/bin/cygqt-mt-3.dll
#16 0x61010263 in per_module::run_ctors (this=0x0)
    at /netrel/src/cygwin-snapshot-20051207-1/winsup/cygwin/dll_init.cc:55
#17 0x00000001 in ?? ()
#18 0x610102b1 in dll::init (this=0x6101067c)
    at /netrel/src/cygwin-snapshot-20051207-1/winsup/cygwin/dll_init.cc:81
#19 0x716f0008 in ?? ()
#20 0x00000000 in ?? () from

Then there are several that look like:

Program received signal SIGSEGV, Segmentation fault.
pthread_mutex::init (mutex=0x100e463c, attr=0x22edec, initializer=0x0)
    at /netrel/src/cygwin-snapshot-20051207-1/winsup/cygwin/thread.cc:129
...
Program received signal SIGSEGV, Segmentation fault.
pthread_mutex::init (mutex=0x100fe44c, attr=0x22ea0c, initializer=0x0)
    at /netrel/src/cygwin-snapshot-20051207-1/winsup/cygwin/thread.cc:129
...
Program received signal SIGSEGV, Segmentation fault.
0x610ad5e8 in pthread_key_create (key=0x715e4690, destructor=0)
    at /netrel/src/cygwin-snapshot-20051207-1/winsup/cygwin/thread.cc:129
...
Program received signal SIGSEGV, Segmentation fault.
0x610ac5e5 in pthread_mutexattr_init (attr=0x22e0cc)
    at /netrel/src/cygwin-snapshot-20051207-1/winsup/cygwin/thread.cc:129
...
and so on.

On a second run it doesn't start the same, it goes into:

Program received signal SIGSEGV, Segmentation fault.
pthread_mutex::init (mutex=0x100e463c, attr=0x22edec, initializer=0x0)
    at /netrel/src/cygwin-snapshot-20051207-1/winsup/cygwin/thread.cc:129

- From what you said, the "initializer=0x0" is what casuses the SIGSEGV.

I'll take a closer look at the qt3 library.

Thanks!
- --
René Berber
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iEYEARECAAYFAkOcrC0ACgkQL3NNweKTRgxEFwCfX5p52egyM6XmRy0Iz0ovCRj3
mY4AoPXZLVpJwcxY8d27KWWDjd3H131K
=37XX
-----END PGP SIGNATURE-----


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]