Re: status of thread safety tests

2007-07-02 Thread Martin Sebor

Eric Lemings wrote:

Could you add a brief note on how the tests were built and executed?
Specifically, were they built and executed with gcc using binary
instrumentation or with icc using dynamic instrumentation?


Good suggestion! I used icc with the -tcheck option to compile
and link the tests and ran the executables through the tcheck_cl
driver (silly name, btw.) I would expect the results to be the
same when I use gcc. I've tried using it but didn't actually
compare the results. It might be an interesting project. Let
me put the info on the page the next time I update it.

Martin



Thanks.
 


-Original Message-
From: Martin Sebor [mailto:[EMAIL PROTECTED] On Behalf Of Martin Sebor
Sent: Monday, June 18, 2007 9:20 PM
To: stdcxx-dev@incubator.apache.org
Subject: status of thread safety tests

I've been working on a document listing the thread safety tests
in stdcxx/trunk and their current status:

   http://people.apache.org/~sebor/thread_safety_tests.html

The goal is to have a full understanding of all the problems
and address them (or at least the most important ones) in the
final 4.2.0 release.

The document is still a work in progress, as is the test suite.
Not all tests have been migrated from the Rogue Wave test suite
in Perforce over to ASF Subversion. For those tests the links
that point to the Perforce source repository won't work.





RE: status of thread safety tests

2007-07-02 Thread Eric Lemings

Could you add a brief note on how the tests were built and executed?
Specifically, were they built and executed with gcc using binary
instrumentation or with icc using dynamic instrumentation?

Thanks.
 

> -Original Message-
> From: Martin Sebor [mailto:[EMAIL PROTECTED] On Behalf Of Martin Sebor
> Sent: Monday, June 18, 2007 9:20 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: status of thread safety tests
> 
> I've been working on a document listing the thread safety tests
> in stdcxx/trunk and their current status:
> 
>http://people.apache.org/~sebor/thread_safety_tests.html
> 
> The goal is to have a full understanding of all the problems
> and address them (or at least the most important ones) in the
> final 4.2.0 release.
> 
> The document is still a work in progress, as is the test suite.
> Not all tests have been migrated from the Rogue Wave test suite
> in Perforce over to ASF Subversion. For those tests the links
> that point to the Perforce source repository won't work.
> 


RE: status of thread safety tests

2007-06-27 Thread Farid Zaripov
> -Original Message-
> From: Martin Sebor [mailto:[EMAIL PROTECTED] On Behalf Of Martin Sebor
> Sent: Wednesday, June 27, 2007 6:22 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: status of thread safety tests
> 

[...]

> >   I'm not sure if this patch resolves the STDCXX-450 issue.
> 
> We'll know more after we've run it through the thread 
> checker. Btw., it seems like it could be a useful tool. You 
> might want to download it and experiment with it.

  I have started downloading the Windows evaluation version
(30 days evaluation period).

Farid.


Re: status of thread safety tests

2007-06-27 Thread Martin Sebor

Farid Zaripov wrote:

-Original Message-
From: Mark Brown [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 26, 2007 5:06 PM

To: stdcxx-dev@incubator.apache.org
Subject: RE: status of thread safety tests

22.locale.num.put.mt gets a SIGSEGV on my system (Fedora 6) 
even with a single thread. Here's the output of gdb:


  The same trouble on MSVC. And I found the problem.

struct Ios: std::ios {
} io;

  Here should be defined ctor invoking ios_base::init() according to
27.4.2.7 p1: Ios () { this->init (0); }


Good catch! I'll need to look into why it didn't fail before (it should
so we don't miss it in the future).



  The same bug present in 22.locale.money.put.mt and
22.locale.time.put.mt tests.

  Fixed thus: http://svn.apache.org/viewvc?view=rev&rev=550833


Thanks!



  I'm not sure if this patch resolves the STDCXX-450 issue.


We'll know more after we've run it through the thread checker. Btw.,
it seems like it could be a useful tool. You might want to download
it and experiment with it.

Martin


RE: status of thread safety tests

2007-06-27 Thread Mark Brown
> -Original Message-
> From: [EMAIL PROTECTED]
> Sent: Tue, 26 Jun 2007 18:57:44 +0300
> To: stdcxx-dev@incubator.apache.org
> Subject: RE: status of thread safety tests
> 
>> -Original Message-
>> From: Mark Brown [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, June 26, 2007 5:06 PM
>> To: stdcxx-dev@incubator.apache.org
>> Subject: RE: status of thread safety tests
>> 
>> 22.locale.num.put.mt gets a SIGSEGV on my system (Fedora 6)
>> even with a single thread. Here's the output of gdb:
> 
>   The same trouble on MSVC. And I found the problem.
> 
> struct Ios: std::ios {
> } io;
> 
>   Here should be defined ctor invoking ios_base::init() according to
> 27.4.2.7 p1: Ios () { this->init (0); }
> 
>   The same bug present in 22.locale.money.put.mt and
> 22.locale.time.put.mt tests.
> 
>   Fixed thus: http://svn.apache.org/viewvc?view=rev&rev=550833

Hi Farid,

This change appears to have cleared up the original issue. However, with 
multiple threads the test now sometimes crashes with the following error:

terminate called after throwing an instance of 'std::runtime_error'
  what():  /home/mbrown/stdcxx/src/setlocale.cpp:130: 
__rw::__rw_setlocale::__rw_setlocale(const char*, int, int): bad locale name: 
"PY"

The name of the locale varies and is sometimes garbage so it might be caused by 
some memory corruption.

-- Mark

> 
>   I'm not sure if this patch resolves the STDCXX-450 issue.
> 
> Farid.


GET FREE 5GB ONLINE STORAGE - Safely store your documents, photos and music 
online!
Visit http://www.inbox.com/storage to find out more!


RE: status of thread safety tests

2007-06-26 Thread Farid Zaripov
> -Original Message-
> From: Mark Brown [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 26, 2007 5:06 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: RE: status of thread safety tests
> 
> 22.locale.num.put.mt gets a SIGSEGV on my system (Fedora 6) 
> even with a single thread. Here's the output of gdb:

  The same trouble on MSVC. And I found the problem.

struct Ios: std::ios {
} io;

  Here should be defined ctor invoking ios_base::init() according to
27.4.2.7 p1: Ios () { this->init (0); }

  The same bug present in 22.locale.money.put.mt and
22.locale.time.put.mt tests.

  Fixed thus: http://svn.apache.org/viewvc?view=rev&rev=550833

  I'm not sure if this patch resolves the STDCXX-450 issue.

Farid.


crash in 22.locale.num.put.mt (was RE: status of thread safety tests)

2007-06-26 Thread Mark Brown
r--p 00014000 08:02 17006792   
/lib64/libpthread-2.5.so
39fb015000-39fb016000 rw-p 00015000 08:02 17006792   
/lib64/libpthread-2.5.so
39fb016000-39fb01a000 rw-p 39fb016000 00:00 0 
3a0500-3a0500d000 r-xp  08:02 17006751   
/lib64/libgcc_s-4.1.1-20070105.so.1
3a0500d000-3a0520c000 ---p d000 08:02 17006751   
/lib64/libgcc_s-4.1.1-20070105.so.1
3a0520c000-3a0520d000 rw-p c000 08:02 17006751   
/lib64/libgcc_s-4.1.1-20070105.so.1
2aaab000-2aaad000 rw-p 2aaab000 00:00 0 
2aaad000-2abbb000 r-xp  08:02 22086136   
/home/mbrown/stdcxx-gcc-4.1.1-15D/lib/libstd15D.so.4.2.0
2abbb000-2adbb000 ---p 0010e000 08:02 22086136   
/home/mbrown/stdcxx-gcc-4.1.1-15D/lib/libstd15D.so.4.2.0
2adbb000-2adc5000 rw-p 0010e000 08:02 22086136   
/home/mbrown/stdcxx-gcc-4.1.1-15D/lib/libstd15D.so.4.2.0
2adc5000-2addd000 rw-p 2adc5000 00:00 0 
2adf7000-2adfb000 rw-p 2adf7000 00:00 0 
2adfb000-2e2ef000 r--p  08:02 25982014   
/usr/lib/locale/locale-archive
2aaab000-2aaab0021000 rw-p 2aaab000 00:00 0 
2aaab0021000-2aaab400 ---p 2aaab0021000 00:00 0 
7fff6529c000-7fff652b rwxp 7fff6529c000 00:00 0  [stack]
7fff652b-7fff652b1000 rw-p 7fff652b 00:00 0 
ff60-ffe0 ---p  00:00 0  [vdso]

Program received signal SIGABRT, Aborted.
[Switching to Thread 1084229952 (LWP 23447)]
0x0039f82301b5 in raise () from /lib64/libc.so.6
(gdb) where
#0  0x0039f82301b5 in raise () from /lib64/libc.so.6
#1  0x0039f8231b20 in abort () from /lib64/libc.so.6
#2  0x0039f826766b in __libc_message () from /lib64/libc.so.6
#3  0x0039f826ea30 in _int_free () from /lib64/libc.so.6
#4  0x0039f827214c in free () from /lib64/libc.so.6
#5  0x2ab18a9e in __rw::__rw_deallocate (p=0x649720)
at /home/mbrown/stdcxx/src/memory.cpp:81
#6  0x2ab29626 in std::allocator::deallocate (this=0x409feb30, 
__p=0x649720 "", __n=58)
at /home/mbrown/stdcxx/include/rw/_allocator.h:157
#7  0x2ab296de in std::string::_C_unlink (this=0x409feb30, __ptr=0x0)
at /home/mbrown/stdcxx/include/string:916
#8  0x2ab2ec86 in ~basic_string (this=0x409feb30)
at /home/mbrown/stdcxx/include/string:199
#9  0x2ab35448 in std::num_put > >::_C_put (this=0x2adca740, __it=
  {> = {}, _C_sb = 0x409fed60}, [EMAIL PROTECTED], __fill=32 ' ', 
__type=2309, __pval=0xffef)
at /home/mbrown/stdcxx/include/loc/_num_put.cc:205
#10 0x2ab3564b in std::num_put > >::do_put (this=0x2adca740, __it=
  {> = {}, _C_sb = 0x409fed60}, [EMAIL PROTECTED], __fill=32 ' ', __val=-17)
at /home/mbrown/stdcxx/include/loc/_num_put.h:140
#11 0x2ab26c07 in std::num_put > >::put (this=0x2adca740, __it=
  {> = {}, _C_sb = 0x409fed60}, [EMAIL PROTECTED], __fill=32 ' ', __val=-17)
at /home/mbrown/stdcxx/include/loc/_num_put.h:75
#12 0x00405091 in thread_func ()
    at /home/mbrown/stdcxx/tests/localization/22.locale.num.put.mt.cpp:177
#13 0x0039fae06305 in start_thread () from /lib64/libpthread.so.0
#14 0x0039f82cd50d in clone () from /lib64/libc.so.6
#15 0x in ?? ()


-- Mark


> -Original Message-
> From: [EMAIL PROTECTED]
> Sent: Tue, 26 Jun 2007 06:05:57 -0800
> To: stdcxx-dev@incubator.apache.org
> Subject: RE: status of thread safety tests
> 
> 22.locale.num.put.mt gets a SIGSEGV on my system (Fedora 6) even with a
> single thread. Here's the output of gdb:
> 
> $ gdb ./22.locale.num.put.mt
> GNU gdb Red Hat Linux (6.5-15.fc6rh)
> Copyright (C) 2006 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "x86_64-redhat-linux-gnu"...
> (no debugging symbols found)
> Using host libthread_db library "/lib64/libthread_db.so.1".
> 
> (gdb) run --nthreads=1
> Starting program:
> /home/mbrown/stdcxx-gcc-4.1.1-12D/tests/22.locale.num.put.mt -
> -nthreads=1
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> [Thread debugging using libthread_db enabled]
> [New Thread 46912499232352 (LWP 32189)]
> (no debugging symbols found)
> # INFO (S1) (10 lines):
> # TEXT:
> # COMPILER: gcc 4.1.1, __VERSION__ = "

RE: status of thread safety tests

2007-06-26 Thread Mark Brown
22.locale.num.put.mt gets a SIGSEGV on my system (Fedora 6) even with a single 
thread. Here's the output of gdb:

$ gdb ./22.locale.num.put.mt
GNU gdb Red Hat Linux (6.5-15.fc6rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib64/libthread_db.so.1".

(gdb) run --nthreads=1
Starting program: /home/mbrown/stdcxx-gcc-4.1.1-12D/tests/22.locale.num.put.mt -
-nthreads=1
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 46912499232352 (LWP 32189)]
(no debugging symbols found)
# INFO (S1) (10 lines):
# TEXT: 
# COMPILER: gcc 4.1.1, __VERSION__ = "4.1.1 20070105 (Red Hat 4.1.1-51)"
# ENVIRONMENT: amd64/LP64 running linux-elf (unknown release) with glibc 2.5
# FILE: 22.locale.num.put.mt.cpp
# COMPILED: Jun 26 2007, 07:52:50
# COMMENT: thread safety


# CLAUSE: lib.locale.num.put

# NOTE (S2) (5 lines):
# TEXT: executing "locale -a > /tmp/tmpfile-st2gNr"
# CLAUSE: lib.locale.num.put
# FILE: process.cpp
# LINE: 274

# INFO (S1) (3 lines):
# TEXT: testing std::num_put with 1 thread, 20 iterations each, in lo
cales { "aa_DJ" "aa_DJ.iso88591" "aa_DJ.utf8" "aa_ER" "[EMAIL PROTECTED]" 
"aa_ER.utf8"
 "[EMAIL PROTECTED]" "aa_ET" "aa_ET.utf8" "af_ZA" "af_ZA.iso88591" "af_ZA.utf8" 
"
am_ET" "am_ET.utf8" "an_ES" "an_ES.iso885915" "an_ES.utf8" "ar_AE" "ar_AE.iso885
96" "ar_AE.utf8" "ar_BH" "ar_BH.iso88596" "ar_BH.utf8" "ar_DZ" "ar_DZ.iso88596" 
"ar_DZ.utf8" "ar_EG" "ar_EG.iso88596" "ar_EG.utf8" "ar_IN" "ar_IN.utf8" "ar_IQ" 
}
# CLAUSE: lib.locale.num.put

# INFO (S1) (3 lines):
# TEXT: exercising std::num_put
# CLAUSE: lib.locale.num.put

[New Thread 1084229952 (LWP 32194)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1084229952 (LWP 32194)]
0x2aafb027 in std::locale::locale ()
   from /home/mbrown/stdcxx-gcc-4.1.1-12D/lib/libstd12D.so
(gdb) where
#0  0x2aafb027 in std::locale::locale ()
   from /home/mbrown/stdcxx-gcc-4.1.1-12D/lib/libstd12D.so
#1  0x00403eea in thread_func ()
#2  0x0039fae06305 in start_thread () from /lib64/libpthread.so.0
#3  0x0039f82cd50d in clone () from /lib64/libc.so.6
#4  0x in ?? ()


-- Mark


> -Original Message-
> From: [EMAIL PROTECTED]
> Sent: Mon, 18 Jun 2007 21:20:27 -0600
> To: stdcxx-dev@incubator.apache.org
> Subject: status of thread safety tests
> 
> I've been working on a document listing the thread safety tests
> in stdcxx/trunk and their current status:
> 
>http://people.apache.org/~sebor/thread_safety_tests.html
> 
> The goal is to have a full understanding of all the problems
> and address them (or at least the most important ones) in the
> final 4.2.0 release.
> 
> The document is still a work in progress, as is the test suite.
> Not all tests have been migrated from the Rogue Wave test suite
> in Perforce over to ASF Subversion. For those tests the links
> that point to the Perforce source repository won't work.