public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Multithreading problems
@ 2004-12-06 15:37 Ciorecan Marius
  2004-12-06 17:26 ` David Edelsohn
  0 siblings, 1 reply; 4+ messages in thread
From: Ciorecan Marius @ 2004-12-06 15:37 UTC (permalink / raw)
  To: gcc

Hi

    I have developed a multithreaded application that starts up to 100 - 200 threads. Each thread communicates on TCP/IP with some external process.
    The application is developed on C++, and it's running on an AIX machine, and compiled with gcc version 2.9-aix51-020209.

    When I have a higher load on the application, it crashes with core. I examined the core file with gdb and I see that most of the times it crashes in a socket operation OR when i throw an exception ( i throw exception for example when the communication with the partner is down on TCP/IP). 

    The exception part is very strange: i throw an exception and i have a catch in the caller function, but the exception never arrives to that catch. Is looking like the throw/catch functions are not thread safe.

    Do you have any idea? What should I look for? 
    
Marius

p.s. I compiled the sources with these flags: -D_REENTRANT -D_THREAD_SAFE -D_LIBC_REENTRANT -fexceptions -fstack-check

    

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Multithreading problems
  2004-12-06 15:37 Multithreading problems Ciorecan Marius
@ 2004-12-06 17:26 ` David Edelsohn
  0 siblings, 0 replies; 4+ messages in thread
From: David Edelsohn @ 2004-12-06 17:26 UTC (permalink / raw)
  To: Ciorecan Marius; +Cc: gcc

	"GCC 2.9-aix" is a very old and non-standard version of GCC that
was not released or supported by the GCC Project.  Separately, there are
continuing efforts to make libstdc++ interaction with the underlying
operating system and libraries of target systems thread safe.

David

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Multithreading problems
@ 2004-12-07  1:24 Daniel Kegel
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Kegel @ 2004-12-07  1:24 UTC (permalink / raw)
  To: Ciorecan.Marius; +Cc: gcc

Ciorecan.Marius@ssi-schaefer.ro wrote:
 > is libstdc++ not thread safe?

The current versions of gcc come with versions of
libstdc++ that provide 'thread safety' as defined
in http://www.sgi.com/tech/stl/thread_safety.html, I think.
Note that this is not as 'thread safe' as Java's containers are.

It also doesn't mean you can't shoot yourself in
the foot with threads.
- Dan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Multithreading problems
@ 2004-12-06 17:30 Ciorecan Marius
  0 siblings, 0 replies; 4+ messages in thread
From: Ciorecan Marius @ 2004-12-06 17:30 UTC (permalink / raw)
  To: gcc

ok, I will try to install tomorrow some new version of gcc, i downloaded the one from http://www.bullfreeware.com/

also, is libstdc++ not thread safe?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-12-07  1:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-06 15:37 Multithreading problems Ciorecan Marius
2004-12-06 17:26 ` David Edelsohn
2004-12-06 17:30 Ciorecan Marius
2004-12-07  1:24 Daniel Kegel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).