The 22.locale.messages test hangs SUSE LINUX Enterprise Server 9
(x86_64). I reproduced the problem in a 15D build with gcc and in
a 12D build with Sun C++ on the same machine. Based on the stack
trace it looks like the test tries to throw an exception whose
what() string is then attempted to be formatted by the library
by using a messages facet. Since all message facets share the
same mutex the library deadlocks.

I wonder if this might be the cause of the problem:
  http://svn.apache.org/viewvc?view=rev&revision=576787

In addition, the exec utility also seems to fail to kill the test
after the usual timeout and the test (and the rest of the build
process) hangs. The last change that went in to exec that looks
like a possible suspect is this:
  http://svn.apache.org/viewvc?view=rev&revision=590124

(Farid, the ChangeLog has your name on it even though the change
itself was mine. Let it be a reminder to you to give blame where
blame is due :)

Here's the backtrace:

(gdb) run
Starting program: /build/sebor/stdcxx-gcc-3.3.3_43.41-15D/tests/22.locale.messages
[Thread debugging using libthread_db enabled]
[New Thread 182903474464 (LWP 18155)]
# INFO (S1) (10 lines):
# TEXT:
# COMPILER: gcc 3.3.3, __VERSION__ = "3.3.3 (SuSE Linux)"
# ENVIRONMENT: x86_64/LP64 running linux-elf (SUSE LINUX Enterprise Server 9 (x86_64)) with glibc 2.3
# FILE: 22.locale.messages.cpp
# COMPILED: Oct 30 2007, 16:10:02
# COMMENT:
############################################################

# CLAUSE: lib.category.messages

# NOTE (S2) (5 lines):
# TEXT: executing "locale -a > /tmp/tmpfile-JsufP8"
# CLAUSE: lib.category.messages
# FILE: process.cpp
# LINE: 270

# NOTE (S2) (5 lines):
# TEXT: executing "gencat rwstdmessages.cat rwstdmessages.msg"
# CLAUSE: lib.category.messages
# FILE: process.cpp
# LINE: 270

# INFO (S1) (4 lines):
# TEXT: std::messages<char>::open() and close() in locale(#C)
# CLAUSE: lib.category.messages
# LINE: 465


Program received signal SIGINT, Interrupt.
[Switching to Thread 182903474464 (LWP 18155)]
0x0000002a95a1afdb in __lll_mutex_lock_wait () from /lib64/tls/libpthread.so.0
(gdb) where
#0  0x0000002a95a1afdb in __lll_mutex_lock_wait ()
   from /lib64/tls/libpthread.so.0
#1 0x0000002a9585f440 in __rw::__rw_manage_cat_data(int&, __rw::__rw_open_cat_data*)::catalogs ()
   from /build/sebor/stdcxx-gcc-3.3.3_43.41-15D/lib/libstd15D.so
#2  0xffffffffffffffff in ?? ()
#3 0x0000002a95a17eec in pthread_mutex_lock () from /lib64/tls/libpthread.so.0
#4  0x0000002a9555d724 in _dl_lookup_symbol_x ()
   from /lib64/ld-linux-x86-64.so.2
#5 0x0000002a956c58cd in __rw_guard (this=0x7fbfffe3f0, [EMAIL PROTECTED])
    at _mutex.h:556
#6  0x0000002a956d6c6b in __rw::__rw_cat_open ([EMAIL PROTECTED],
    [EMAIL PROTECTED]) at $TOPDIR/src/messages.cpp:215
#7  0x0000002a956eb667 in std::messages<char>::do_open (this=0x2a9587ac00,
    [EMAIL PROTECTED], [EMAIL PROTECTED]) at _messages.cc:44
#8  0x0000002a956eb69a in std::messages<char>::open (this=0x2a9587ac00,
    [EMAIL PROTECTED], [EMAIL PROTECTED]) at _messages.h:89
#9  0x0000002a956c44af in __rw_vfmtwhat (buf=0x0, bufsize=0, id=7,
    va=0x7fbfffe590) at $TOPDIR/src/exception.cpp:615
#10 0x0000002a956c5081 in __rw::__rw_throw (id=7)
    at $TOPDIR/src/exception.cpp:825
#11 0x0000002a956d6f94 in __rw::__rw_cat_close (cat=0)
    at $TOPDIR/src/messages.cpp:296
#12 0x0000002a956eb95f in std::messages<char>::do_close (this=0x2a95880440,
    __cat=0) at _messages.cc:53
#13 0x0000002a956eb988 in std::messages<char>::close (this=0x2a95880440, __c=0)
    at _messages.h:98
#14 0x0000000000408b5f in close_catalog<char> ([EMAIL PROTECTED], cat=0,
    expect_exception=true, cname=0x42543b "char", line=484)
    at $TOPDIR/tests/localization/22.locale.messages.cpp:421
#15 0x00000000004058f9 in test_open_close<char> (loc_name=0x425421 "C",
    cname=0x42543b "char")
    at $TOPDIR/tests/localization/22.locale.messages.cpp:484
#16 0x00000000004051d9 in test_messages<char> (cname=0x42543b "char",
    locname=0x539c72 "aa_DJ")
    at $TOPDIR/tests/localization/22.locale.messages.cpp:792
#17 0x0000000000405010 in run_test ()
    at $TOPDIR/tests/localization/22.locale.messages.cpp:831
#18 0x000000000040a9e0 in rw_vtest (argc=1, argv=0x7fbfffed38,
file_name=0x4254c0 "$TOPDIR/tests/localization/22.locale.messages.cpp", clause=0x4254a8 "lib.category.messages", comment=0x0,
    fun=0x404f2e <run_test>,
optstr=0x425460 "|-has_facet~ |-open_close~ |-get~ |-codecvt~ |-nlspath~ |-s
tress-test~ ", va=0x7fbfffeae0)
    at $TOPDIR/tests/src/driver.cpp:1030
#19 0x000000000040ae78 in rw_test (argc=1, argv=0x7fbfffed38,
fname=0x4254c0 "$TOPDIR/tests/localization/22.locale.messages.cpp", clause=0x4254a8 "lib.category.messages", comment=0x0,
    testfun=0x404f2e <run_test>,
optstr=0x425460 "|-has_facet~ |-open_close~ |-get~ |-codecvt~ |-nlspath~ |-stress-test~ ") at $TOPDIR/tests/src/driver.cpp:1127
#20 0x00000000004050b1 in main (argc=1, argv=0x7fbfffed38)
    at $TOPDIR/tests/localization/22.locale.messages.cpp:849

Reply via email to