* [Bug c++/11644] Hang in throw when unloading a library
2003-07-23 12:12 [Bug c++/11644] New: Hang in throw when unloading a library peter dot rost at freenet dot de
@ 2003-07-23 12:17 ` peter dot rost at freenet dot de
2003-07-23 18:45 ` pinskia at physics dot uc dot edu
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: peter dot rost at freenet dot de @ 2003-07-23 12:17 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
------- Additional Comments From peter dot rost at freenet dot de 2003-07-23 12:17 -------
Created an attachment (id=4466)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4466&action=view)
Sample source code which will hang using g++-3.3 but not using 2.95
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11644] Hang in throw when unloading a library
2003-07-23 12:12 [Bug c++/11644] New: Hang in throw when unloading a library peter dot rost at freenet dot de
2003-07-23 12:17 ` [Bug c++/11644] " peter dot rost at freenet dot de
@ 2003-07-23 18:45 ` pinskia at physics dot uc dot edu
2003-07-23 19:24 ` peter dot rost at freenet dot de
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-23 18:45 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-23 18:45 -------
I think unloading a c++ library is not supported.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11644] Hang in throw when unloading a library
2003-07-23 12:12 [Bug c++/11644] New: Hang in throw when unloading a library peter dot rost at freenet dot de
2003-07-23 12:17 ` [Bug c++/11644] " peter dot rost at freenet dot de
2003-07-23 18:45 ` pinskia at physics dot uc dot edu
@ 2003-07-23 19:24 ` peter dot rost at freenet dot de
2003-08-11 12:42 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: peter dot rost at freenet dot de @ 2003-07-23 19:24 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
------- Additional Comments From peter dot rost at freenet dot de 2003-07-23 19:24 -------
Subject: Re: Hang in throw when unloading a library
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
but how could it be, that the throw-statement isn't supported anymore
after the unload of the library has began!?
On Wed, 23 Jul 2003, pinskia at physics dot uc dot edu wrote:
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
>
>
>
> ------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-23 18:45 -------
> I think unloading a c++ library is not supported.
>
>
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/HuDBoX1lKJAtNVgRApSuAJ9j0PH8hNQxDcL+kBPLtcTjZU/yZwCgoZ50
kywuWNtN52Ti/67pmpe8GjU=
=gTHv
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11644] Hang in throw when unloading a library
2003-07-23 12:12 [Bug c++/11644] New: Hang in throw when unloading a library peter dot rost at freenet dot de
` (2 preceding siblings ...)
2003-07-23 19:24 ` peter dot rost at freenet dot de
@ 2003-08-11 12:42 ` pinskia at gcc dot gnu dot org
2003-08-19 15:15 ` lerdsuwa at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-11 12:42 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4 |---
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11644] Hang in throw when unloading a library
2003-07-23 12:12 [Bug c++/11644] New: Hang in throw when unloading a library peter dot rost at freenet dot de
` (3 preceding siblings ...)
2003-08-11 12:42 ` pinskia at gcc dot gnu dot org
@ 2003-08-19 15:15 ` lerdsuwa at gcc dot gnu dot org
2003-08-19 15:32 ` peter dot rost at freenet dot de
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-08-19 15:15 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-08-19 15:15 -------
Two possible problems that make your code not working:
1 You need g++ and libstdc++ that are thread-enabled.
See this link for more info
http://gcc.gnu.org/bugs.html#nonbugs_cxx
2 The exception is thrown inside __fini_lib through the
function call chain:
main -> unloadLib -> dlclose -> __fini_Lib
If the dlclose in your C library is not built with
exception unwinding, thrown exception cannot propagate
back to main.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11644] Hang in throw when unloading a library
2003-07-23 12:12 [Bug c++/11644] New: Hang in throw when unloading a library peter dot rost at freenet dot de
` (4 preceding siblings ...)
2003-08-19 15:15 ` lerdsuwa at gcc dot gnu dot org
@ 2003-08-19 15:32 ` peter dot rost at freenet dot de
2003-08-24 9:42 ` lerdsuwa at users dot sourceforge dot net
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: peter dot rost at freenet dot de @ 2003-08-19 15:32 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
------- Additional Comments From peter dot rost at freenet dot de 2003-08-19 15:32 -------
Subject: Re: Hang in throw when unloading a library
well, it sounds good, but
1. how can i determine if my dlclose is built with/without exception
unwinding?
2. for me it's very mysterious, that the debian-compiled-version of gcc 2.95
doesnot have any problems with but gcc 3.x has them!? so, are there some more
changes at dlclose which can produce the behaviour?
thanks a lot for your help, peter.
On Tuesday 19 August 2003 17:15, you wrote:
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
>
>
>
> ------- Additional Comments From lerdsuwa at gcc dot gnu dot org
> 2003-08-19 15:15 ------- Two possible problems that make your code not
> working:
>
> 1 You need g++ and libstdc++ that are thread-enabled.
> See this link for more info
> http://gcc.gnu.org/bugs.html#nonbugs_cxx
>
> 2 The exception is thrown inside __fini_lib through the
> function call chain:
> main -> unloadLib -> dlclose -> __fini_Lib
> If the dlclose in your C library is not built with
> exception unwinding, thrown exception cannot propagate
> back to main.
>
>
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11644] Hang in throw when unloading a library
2003-07-23 12:12 [Bug c++/11644] New: Hang in throw when unloading a library peter dot rost at freenet dot de
` (5 preceding siblings ...)
2003-08-19 15:32 ` peter dot rost at freenet dot de
@ 2003-08-24 9:42 ` lerdsuwa at users dot sourceforge dot net
2003-08-24 14:36 ` lerdsuwa at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: lerdsuwa at users dot sourceforge dot net @ 2003-08-24 9:42 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
------- Additional Comments From lerdsuwa at users dot sourceforge dot net 2003-08-24 09:42 -------
Subject: Re: Hang in throw when unloading a library
You can use GCC option -fexceptions during compilation of
C code to make it support exception unwinding. But after
looking at the glibc dlcose source code, I think throwing
exception through this function could leave some glibc
internal data structure messed up. You should catch all
exceptions in your library __fini_Lib instead.
--Kriang
Peter Rost wrote:
>well, it sounds good, but
>
>
>1. how can i determine if my dlclose is built with/without exception
>unwinding?
>2. for me it's very mysterious, that the debian-compiled-version of gcc 2.95
>doesnot have any problems with but gcc 3.x has them!? so, are there some more
>changes at dlclose which can produce the behaviour?
>
>thanks a lot for your help, peter.
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11644] Hang in throw when unloading a library
2003-07-23 12:12 [Bug c++/11644] New: Hang in throw when unloading a library peter dot rost at freenet dot de
` (6 preceding siblings ...)
2003-08-24 9:42 ` lerdsuwa at users dot sourceforge dot net
@ 2003-08-24 14:36 ` lerdsuwa at gcc dot gnu dot org
2003-09-19 16:00 ` lerdsuwa at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-08-24 14:36 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
lerdsuwa at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-08-24 14:36:22
date| |
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-08-24 14:36 -------
We have a deadlock between glibc functions 'dlclose' and
'dl_iterate_phdr' both rely on the spinlock '_dl_load_lock'.
And glibc doesn't have a recursive lock implementation yet.
This interferes with stack unwinding code in GCC. When
compiled for glibc it currently uses 'dl_iterate_phdr' to
unwind the stack. So user cannon throw exception anywhere
inside library clean up function (called during 'dlclose').
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11644] Hang in throw when unloading a library
2003-07-23 12:12 [Bug c++/11644] New: Hang in throw when unloading a library peter dot rost at freenet dot de
` (7 preceding siblings ...)
2003-08-24 14:36 ` lerdsuwa at gcc dot gnu dot org
@ 2003-09-19 16:00 ` lerdsuwa at gcc dot gnu dot org
2003-10-04 10:53 ` peter dot rost at freenet dot de
2003-12-06 8:31 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-09-19 16:00 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-09-19 15:14 -------
I checked glibc 2.3.2 source code and it uses recursive locks now.
So this issue should be fixed with a glibc upgrade. I am keeping
this around until someone with a new glibc installed can confirm
and this bug report.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11644] Hang in throw when unloading a library
2003-07-23 12:12 [Bug c++/11644] New: Hang in throw when unloading a library peter dot rost at freenet dot de
` (8 preceding siblings ...)
2003-09-19 16:00 ` lerdsuwa at gcc dot gnu dot org
@ 2003-10-04 10:53 ` peter dot rost at freenet dot de
2003-12-06 8:31 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: peter dot rost at freenet dot de @ 2003-10-04 10:53 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
------- Additional Comments From peter dot rost at freenet dot de 2003-10-04 10:53 -------
Subject: Re: Hang in throw when unloading a library
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hello, thanks for bug-fix;) but because i'm using debian linux i'm not
so aware of "how to install your fixed glibc-2.3.2"? can you probably
help me with a little bit assistance. thanks a lot, peter.
On Fri, 19 Sep 2003, lerdsuwa at gcc dot gnu dot org wrote:
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
>
>
>
> ------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-09-19 15:14 -------
> I checked glibc 2.3.2 source code and it uses recursive locks now.
> So this issue should be fixed with a glibc upgrade. I am keeping
> this around until someone with a new glibc installed can confirm
> and this bug report.
>
>
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/fqadoX1lKJAtNVgRAqfRAJ9OzKWcnHrioBFj7FEMJp7Y6ClPBQCgrJ6y
OXH9jszwvoijtp2ISKguzEY=
=sOQz
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11644] Hang in throw when unloading a library
2003-07-23 12:12 [Bug c++/11644] New: Hang in throw when unloading a library peter dot rost at freenet dot de
` (9 preceding siblings ...)
2003-10-04 10:53 ` peter dot rost at freenet dot de
@ 2003-12-06 8:31 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-06 8:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-06 08:31 -------
I know that for a fact Carlo Wood have a library that does dlclose that works (at least for non recent
3.4 but that is a different bug and is already filed and is about to be fixed:) ).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11644
^ permalink raw reply [flat|nested] 12+ messages in thread