public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/3197
@ 2001-12-12  2:06 Ruben Diez
  0 siblings, 0 replies; only message in thread
From: Ruben Diez @ 2001-12-12  2:06 UTC (permalink / raw)
  To: bkoz; +Cc: gcc-prs

The following reply was made to PR libstdc++/3197; it has been noted by GNATS.

From: "Ruben Diez" <rdiez@activenav.com>
To: <bkoz@gcc.gnu.org>,
	<gcc-gnats@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>,
	<los@rz.uni-mannheim.de>,
	<gcc-bugs@gcc.gnu.org>
Cc:  
Subject: Re: libstdc++/3197
Date: Wed, 12 Dec 2001 10:06:18 -0000

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail%26pr=3197%26da
 tabase=gcc
 
 Hi there:
 
 I'm not familiar with the GNATS interface, from the page I'm looking at I'm
 not sure if I can add comments to the bug description, like you can with
 Bugzilla.
 
 About the problem above, a crash in basic_ios<>::widen, I've had the same
 problem, I thought it was a multithread sync issue because I can only
 reproduce it under threading stress. I've got a little program that can
 reproduce this after a few minutes, the program creates 100 threads and only
 crashes after a few runs (but not many). I've seen it under both Solaris 7
 and Linux Mandrake 8.1, GCC is version 3.0.2.
 
 Unfortunately, I can't send you all the sources, but I can send you a
 partial source and my call stack, in case it helps:
 
 Each one of the 100 threads runs the following routine. Note that, although
 the ifstream object is created, it's not used at all. File "makefile" exists
 in the current directory.
 
 extern "C" void * start_func1 ( void * arg )
 {
   // printf("Thread start.\n");
 
   // This sleep() maximises the chances all threads will collide,
   // by allowing the main thread time to create them all.
   sleep(1);
 
   // printf("Thread going.\n");
 
   //    cerr << "ourthread::run" << endl;
 
     for (int i = 0; i < 1000; ++i)
     {
       ifstream ifs1( "makefile" );
       sched_yield();
       ifstream ifs2( "makefile" );
       sched_yield();
       //        cerr << " thread i=" << i << endl << flush;
       //        assert(m_last_error == 0 && "failed to yield");
     }
 
   // printf("Thread finish.\n");
 
   return 0;
 }
 
 
 The call stack of the crash is:
 
 #0  0x40093b40 in typeinfo for std::locale::facet () from /home/rd/gcc-
 3.0.2/lib/libstdc++.so.3
 #1  0x0804ff5e in std::__ctype_abstract_base<char>::widen(char) const
 (this=0x8055898, __c=32) at /home/rd/gcc-3.0.2/include/g++-
 v3/bits/locale_facets.h:97
 #2  0x0804f8ff in std::basic_ios<char, std::char_traits<char> >::widen(char)
 const (this=0xb4dffa80, __c=32 ' ') at /home/rd/gcc-3.0.2/include/g++-
 v3/bits/basic_ios.tcc:99
 #3  0x0804f584 in std::basic_ios<char, std::char_traits<char> >::init
 (std::basic_streambuf<char, std::char_traits<char> >*) (this=0xb4dffa80,
 __sb=0x0) at /home/rd/gcc-3.0.2/include/g++-v3/bits/basic_ios.tcc:122
 #4  0x0804f40e in std::istream::istream(std::basic_streambuf<char,
 std::char_traits<char> >*) (this=0xb4dff9fc, __vtt_parm=0x8053d84, __sb=0x0)
 at /home/rd/gcc-3.0.2/include/g++-v3/bits/std_istream.h:73
 #5  0x0804f271 in std::basic_ifstream<char, std::char_traits<char>
 >::basic_ifstream(char const*, std::_Ios_Openmode) (__vtt_parm=0xb4dff9fc,
 __s=0x8052520 "makefile", __mode=8) at /home/rd/gcc-3.0.2/include/g++-
 v3/bits/std_fstream.h:258
 #6  0x0804c766 in start_func1 (arg=0x55) at thread2_t.cpp:59
 #7  0x400f39c7 in pthread_start_thread (arg=0xb4dffc00) at manager.c:274
 (gdb)
 
 I can try to help you more, but bear in mind that I'm quite a beginner in
 the Unix / GCC world, so you'll need to ask for things in a non-cryptic
 manner!
 
 Thanks,
   Ruben
 
 ---
 Ruben Diez, Software Engineer
 Active Navigation Ltd
 Delta House, Enterprise Rd, Chilworth Science Park,
 Southampton, Hants, SO16 7NS
 Direct phone: +44 (0) 23 8074 2416
 Fax: +44 (0)23 8076 7665
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-12-12 10:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-12  2:06 libstdc++/3197 Ruben Diez

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