public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/15026] New: Sporadic crash when application exits on Solaris 5.9
@ 2004-04-20 13:39 harri dot pasanen at trema dot com
  2004-04-20 13:50 ` [Bug libstdc++/15026] " ebotcazou at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: harri dot pasanen at trema dot com @ 2004-04-20 13:39 UTC (permalink / raw)
  To: gcc-bugs

In testing http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15015 
with gcc 3.3.3 on Solaris 5.9, I got a different crash, maybe every 1 out of 10 runs. 
I reproduce the test application here: 
  
/*****************************************************  
 Test code to exercise iostreams under threads  
  
Compile with:  
   g++ -Wall -O2 thread-iostream.cxx -lpthread  
Execute:  
   ./a.out  
******************************************************/  
#include <pthread.h>  
#include <iostream>  
#include <sstream>  
  
const int num_threads = 200;  
  
void *runner(void * param);   /* function that the thread will execute */  
  
int main (int argc, const char **argv)  
{  
  pthread_t tid[num_threads];  
  
 for (int i = 0; i < num_threads; i ++)  
   pthread_create( &tid[i], NULL, runner, NULL);  
  
 for (int i = 0; i < num_threads; i ++)  
   pthread_join( tid[i], NULL);  // makes the main code wait for the thread   
  
 std::cout << "Exiting ok.\n";  
 return 0;  
}  
  
void * runner(void *param)  
{  
  std::stringstream fmt;  
    
  for (int i = 0; i < 10; i++)  
    fmt << "today" << 3.14157 << "is bogus\n";  
  
  pthread_exit(0);  
  return 0;  
}  
// EOF for thread-iostream.cxx  
  
It crashes sporadically at exit, always with the  
backtrace:  
  
(gdb) bt  
#0  0xff2b5900 in __deregister_frame_info_bases (begin=0xff361e04)  
    at ../../gcc-3.3.3/gcc/unwind-dw2-fde.c:183  
#1  0xff32676c in __do_global_dtors_aux ()  
   from /usr/gnu/gcc33/lib/gcc-lib/sparc-sun-solaris2.9/3.3.3/libstdc++.so.5  
#2  0xff35d0b4 in _fini ()  
   from /usr/gnu/gcc33/lib/gcc-lib/sparc-sun-solaris2.9/3.3.3/libstdc++.so.5  
  
$ /usr/gnu/gcc33/bin/g++ -v  
Reading specs from /usr/gnu/gcc33/lib/gcc-lib/sparc-sun-solaris2.9/3.3.3/specs  
Configured with: ../gcc-3.3.3/configure --prefix=/usr/gnu/gcc33 --with-gnu-as  
--with-cpu=supersparc --with-gnu-ld --with-ld=/usr/gnu/bin/ld --with-as=/usr/gnu/bin/as  
--enable-version-specific-runtime-libs --enable-long-long --enable-threads  
--enable-languages=c,c++  
Thread model: posix  
gcc version 3.3.3

-- 
           Summary: Sporadic crash when application exits on Solaris 5.9
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: harri dot pasanen at trema dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15026


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

* [Bug libstdc++/15026] Sporadic crash when application exits on Solaris 5.9
  2004-04-20 13:39 [Bug libstdc++/15026] New: Sporadic crash when application exits on Solaris 5.9 harri dot pasanen at trema dot com
@ 2004-04-20 13:50 ` ebotcazou at gcc dot gnu dot org
  2004-04-20 15:25 ` [Bug other/15026] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-04-20 13:50 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15026


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

* [Bug other/15026] Sporadic crash when application exits on Solaris 5.9
  2004-04-20 13:39 [Bug libstdc++/15026] New: Sporadic crash when application exits on Solaris 5.9 harri dot pasanen at trema dot com
  2004-04-20 13:50 ` [Bug libstdc++/15026] " ebotcazou at gcc dot gnu dot org
@ 2004-04-20 15:25 ` pinskia at gcc dot gnu dot org
  2004-07-12 17:19 ` ebotcazou at gcc dot gnu dot org
  2004-10-07  9:46 ` ebotcazou at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-20 15:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-20 14:59 -------
I wonder if this is crashing because the segments are unmapped already.
It is crashing in this loop:
static struct object *unseen_objects;

  for (p = &unseen_objects; *p ; p = &(*p)->next)
    if ((*p)->u.single == begin) 
      {
        ob = *p;
        *p = ob->next;
        goto out;
      }

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libstdc++                   |other


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15026


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

* [Bug other/15026] Sporadic crash when application exits on Solaris 5.9
  2004-04-20 13:39 [Bug libstdc++/15026] New: Sporadic crash when application exits on Solaris 5.9 harri dot pasanen at trema dot com
  2004-04-20 13:50 ` [Bug libstdc++/15026] " ebotcazou at gcc dot gnu dot org
  2004-04-20 15:25 ` [Bug other/15026] " pinskia at gcc dot gnu dot org
@ 2004-07-12 17:19 ` ebotcazou at gcc dot gnu dot org
  2004-10-07  9:46 ` ebotcazou at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-07-12 17:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-07-12 17:19 -------
I tried several times but never managed to reproduce it.  If you have some time
to kill, it could be interesting to try with GCC 3.4.x and binutils 2.14.

I also see that you configured with --with-cpu=supersparc.  This option is
really untested, almost everyone is on UltraSPARC nowadays.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15026


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

* [Bug other/15026] Sporadic crash when application exits on Solaris 5.9
  2004-04-20 13:39 [Bug libstdc++/15026] New: Sporadic crash when application exits on Solaris 5.9 harri dot pasanen at trema dot com
                   ` (2 preceding siblings ...)
  2004-07-12 17:19 ` ebotcazou at gcc dot gnu dot org
@ 2004-10-07  9:46 ` ebotcazou at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-10-07  9:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-10-07 09:45 -------
No feedback in 3 months.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15026


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

end of thread, other threads:[~2004-10-07  9:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-20 13:39 [Bug libstdc++/15026] New: Sporadic crash when application exits on Solaris 5.9 harri dot pasanen at trema dot com
2004-04-20 13:50 ` [Bug libstdc++/15026] " ebotcazou at gcc dot gnu dot org
2004-04-20 15:25 ` [Bug other/15026] " pinskia at gcc dot gnu dot org
2004-07-12 17:19 ` ebotcazou at gcc dot gnu dot org
2004-10-07  9:46 ` ebotcazou at gcc dot gnu dot org

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).