Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.2.1
    • Fix Version/s: 4.2.2
    • Component/s: Tests
    • Labels:
      None
    • Environment:

      Intel C++ 10.0
      Red Hat Enterprise Linux Server release 5 (Tikanga)

    • Regression:
      Regression
    • Severity:
      Inefficiency

      Description

      During nightly builds the test 22.locale.numpunct.mt.cpp times out on many platforms, including some build types with gcc 4.1 and all build types with Intel C++ 10/Linux, or with XLC++ 9.0 on AIX. The output below shows that it takes nearly 8 minutes to run to completion, which is in contrast to most other .mt tests which typically complete in less than 2 minutes. Since most of the locale thread safety tests follow the same pattern there must be some inefficiency either in the implementation of the std::numpunct facet or in specifics of the test itself (or both).

      Since this test is new in 4.2.1, its failure is a regression.

      $ time ./22.locale.numpunct.mt
      # INFO (S1) (10 lines):
      # TEXT: 
      # COMPILER: Intel C++, __INTEL_COMPILER = 1000, __INTEL_COMPILER_BUILD_DATE = 20070613, __EDG_VERSION__ = 308
      # ENVIRONMENT: x86_64/LP64 running linux-elf (Red Hat Enterprise Linux Server release 5 (Tikanga)) with glibc 2.5
      # FILE: 22.locale.numpunct.mt.cpp
      # COMPILED: Apr  8 2008, 14:00:18
      # COMMENT: thread safety
      ############################################################
      
      # CLAUSE: lib.locale.numpunct
      
      # NOTE (S2) (5 lines):
      # TEXT: executing "locale -a > /tmp/tmpfile-6kp9dU"
      # CLAUSE: lib.locale.numpunct
      # FILE: process.cpp
      # LINE: 279
      
      # INFO (S1) (3 lines):
      # TEXT: testing std::numpunct<charT> with 4 threads, 200000 iterations each, in 32 locales { "C" "aa_DJ" "aa_DJ.iso88591" "aa_DJ.utf8" "aa_ER" "aa_ER@saaho" "aa_ER.utf8" "aa_ER.utf8@saaho" "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.iso88596" "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" }
      # CLAUSE: lib.locale.numpunct
      
      # INFO (S1) (3 lines):
      # TEXT: exercising std::numpunct<char>
      # CLAUSE: lib.locale.numpunct
      
      # INFO (S1) (3 lines):
      # TEXT: exercising std::numpunct<wchar_t>
      # CLAUSE: lib.locale.numpunct
      
      # INFO (S1) (3 lines):
      # TEXT: exercising both std::numpunct<char> and std::numpunct<wchar_t>
      # CLAUSE: lib.locale.numpunct
      
      # +-----------------------+----------+----------+----------+
      # | DIAGNOSTIC            |  ACTIVE  |   TOTAL  | INACTIVE |
      # +-----------------------+----------+----------+----------+
      # | (S1) INFO             |        5 |        5 |       0% |
      # | (S2) NOTE             |        1 |        1 |       0% |
      # | (S8) ERROR            |        0 |        3 |     100% |
      # | (S9) FATAL            |        0 |        1 |     100% |
      # +-----------------------+----------+----------+----------+
      
      real    7m52.542s
      user    6m17.488s
      sys     1m15.817s
      

        Issue Links

          Activity

          Hide
          Martin Sebor added a comment - - edited

          Another set of timings, this one on an otherwise idle quad Intel(R) Xeon(R) CPU 5160 @ 3.00GHz running SUSE Linux Enterprise Server 10 with GNU C Library development release version 2.4 (20060616):

          # 32 locales
          real    15m38.512s
          user    15m25.882s
          sys     0m45.327s
          
          # 2 locales ("C" and "aa_DJ")
          real    4m4.509s
          user    4m1.395s
          sys     0m10.605s
          
          # 1 locale ("en_US.UTF-8")
          real    0m48.781s
          user    0m43.355s
          sys     0m13.721s
          
          # 1 locale ("C")
          real    0m3.510s
          user    0m5.768s
          sys     0m7.068s
          

          Interestingly, on similar hardware (4CPU AMD64 box) running Solaris 10 the test completes in under a minute:

          real    1m6.558s
          user    1m43.690s
          sys     0m26.743s
          
          Show
          Martin Sebor added a comment - - edited Another set of timings, this one on an otherwise idle quad Intel(R) Xeon(R) CPU 5160 @ 3.00GHz running SUSE Linux Enterprise Server 10 with GNU C Library development release version 2.4 (20060616): # 32 locales real 15m38.512s user 15m25.882s sys 0m45.327s # 2 locales ("C" and "aa_DJ") real 4m4.509s user 4m1.395s sys 0m10.605s # 1 locale ("en_US.UTF-8") real 0m48.781s user 0m43.355s sys 0m13.721s # 1 locale ("C") real 0m3.510s user 0m5.768s sys 0m7.068s Interestingly, on similar hardware (4CPU AMD64 box) running Solaris 10 the test completes in under a minute: real 1m6.558s user 1m43.690s sys 0m26.743s
          Hide
          Martin Sebor added a comment -

          It's possible that the bad performance on Linux would be alleviated by making use of the Extended Locale Support discussed in STDCXX-892.

          Show
          Martin Sebor added a comment - It's possible that the bad performance on Linux would be alleviated by making use of the Extended Locale Support discussed in STDCXX-892 .
          Hide
          Martin Sebor added a comment -

          We've run out of time to solve this in 4.2.1. Deferred until 4.2.2.

          Show
          Martin Sebor added a comment - We've run out of time to solve this in 4.2.1. Deferred until 4.2.2.

            People

            • Assignee:
              Unassigned
              Reporter:
              Martin Sebor
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development