Issue Details (XML | Word | Printable)

Key: STDCXX-498
Type: Bug Bug
Status: Resolved Resolved
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Travis Vitek
Reporter: Martin Sebor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

[Intel C++ 8.1/SuSE/AMD64] std::time_put thread safety problem

Created: 24/Jul/07 05:03 PM   Updated: 31/Dec/07 11:55 PM
Return to search
Component/s: 22. Localization
Affects Version/s: 4.1.3
Fix Version/s: 4.2.1

Time Tracking:
Not Specified

Environment: Intel C++ 8.1/SuSE/AMD64
Issue Links:
Reference
 

Severity: Runtime Error
Resolution Date: 31/Dec/07 11:55 PM


 Description  « Hide
Moved from Rogue Wave Bugzilla: http://bugzilla.cvo.roguewave.com/show_bug.cgi?id=1708 (note the name of the test is now 22.locale.time.put.mt.cpp).

tests/stdlib/locale/time_put_mt seems to have a thread safety issue
where a local name is corrupted and causes the test to fail.

Stack Trace using icc8.1 on sunburst (amd64)
> (gdb) r -O/dev/tty
> Starting program: /build/sebor/icc-8.1-15S/tests/22_time_put_mt
> -O/dev/tty [Thread debugging using libthread_db enabled] [New Thread
> 182894218016 (LWP 27151)] ## -------------------------------
> ## TestTag = std::time_put thread safety
> ## CompilerId = Intel C++, __INTEL_COMPILER = 810,
> _INTEL_COMPILER_BUILD_DATE = 20050406, __EDG_VERSION_ = 303 with
Rogue
> Wave C++ Standard Library, _RWSTD_VER = 0x04010000
> ## MachineId = x86_64/LP64 running linux-elf 2.4.20 with glibc 2.3
> ## Remark =
>
> /build/sebor/dev/stdlib/tests/src/test.cpp:916: executing "locale -a >
> /tmp/tmpfile-J00vyh"
> Detaching after fork from child process 27156.
>
> ## RunTag = using the following 4 locales: "aa_DJ.iso88591",
> "be_BY", "ca_ES", "da_DK"
> [New Thread 1084229984 (LWP 27158)]
> T0 [New Thread 1094719840 (LWP 27159)]
> T1 [New Thread 1105209696 (LWP 27160)]
> T2 [New Thread 1115699552 (LWP 27161)]
> T3 T2 T2 T0 T1 T2 T3 T1 T2 T0 T0 T1 T1 T2 T3 T3 T1 T0 T2 T3 T0 T3 T2
> T2
> T0 T2 T0 T1
> T2 iterated 10000 times, shared counter = 30913 (min: 1, max: 2458)
> [Thread 1105209696 (LWP 27160) exited]
> T1 T0 T3 T1 T3 /build/sebor/dev/stdlib/src/locale_body.cpp:516:
> _rw::rw_locale::_rw_locale(const char *): Assertion '!strchr (name,
> '*')' failed.
> /build/sebor/icc-8.1-15S/tests/22_time_put_mt[0x420851]
>
> Program received signal SIGABRT, Aborted.
> [Switching to Thread 1115699552 (LWP 27161)] 0x0000003c2392e4dd in
> raise () from /lib64/tls/libc.so.6
> (gdb) where
> #0 0x0000003c2392e4dd in raise () from /lib64/tls/libc.so.6 #1
> 0x0000003c2392fc8e in abort () from /lib64/tls/libc.so.6 #2
> 0x0000000000420930 in _rw::_rw_assert_fail (
> expr=0x4a6eb0 "!strchr (name, '*')",
> file=0x4a6e7c "/build/sebor/dev/stdlib/src/locale_body.cpp",
line=516,
> func=0x4a6e4c "_rw::rw_locale::_rw_locale(const char *)")
> at /build/sebor/dev/stdlib/src/assert.cpp:111
> #3 0x000000000042aaa8 in ZN4rw11_rw_localeC9EPKc (this=0x69d430,
> name=0x428014e0 "@\n\227*")
> at /build/sebor/dev/stdlib/src/locale_body.cpp:516
> #4 0x000000000042aeed in _rw::rw_locale::_rw_locale () at
> _locale.h:292
> #5 0x000000000042cedd in _rw::_rw_locale::_C_manage (plocale=0x0,
> locname=0x428014e0 "@\n\227*")
> at /build/sebor/dev/stdlib/src/locale_body.cpp:1004
> #6 0x000000000042f154 in _rw::_rw_locale::_C_get_body (one=0x0,
> other=0x0,
> locname=0x63e7ef "da_DK", cat=256, pfacet=0x0)
> at /build/sebor/dev/stdlib/src/locale_combine.cpp:589
> #7 0x000000000042e3bd in _ZNSt6localeC9EPKc (this=0x42801da0,
> locname=0x63e7ef "da_DK")
> at /build/sebor/dev/stdlib/src/locale_combine.cpp:646
> #8 0x000000000042e445 in std::locale::locale ()
> #9 0x0000000000403c8f in test_thread::_C_do_run (this=0x7fbfffeb50)
> at /build/sebor/dev/stdlib/tests/localization/22_time_put_mt.cpp:159
> #10 0x000000000040420b in _rw_run_thread (_arg=0x7fbfffeb50)
> at threadclass.h:209
> #11 0x0000003c2440613a in start_thread () from
/lib64/tls/libpthread.so.0
> #12 0x0000003c239c52b3 in clone () from /lib64/tls/libc.so.6
> #13 0x0000000000000000 in ?? ()



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor added a comment - 07/Sep/07 02:49 PM
Should look at STDCXX-456 at the same time.

Martin Sebor added a comment - 10/Dec/07 06:56 AM
Assigned to Travis and scheduled for 4.2.1.
Set Severity to Runtime Error.

Travis Vitek added a comment - 31/Dec/07 11:55 PM
I haven't been able to reproduce this failure in manual builds, and I'm not seeing it in automated testing either.