Return-Path: X-Original-To: apmail-stdcxx-dev-archive@www.apache.org Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 061069B85 for ; Tue, 25 Sep 2012 03:50:30 +0000 (UTC) Received: (qmail 58414 invoked by uid 500); 25 Sep 2012 03:50:29 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 58294 invoked by uid 500); 25 Sep 2012 03:50:27 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 58258 invoked by uid 99); 25 Sep 2012 03:50:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2012 03:50:26 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of stefan.teleman@gmail.com designates 209.85.212.54 as permitted sender) Received: from [209.85.212.54] (HELO mail-vb0-f54.google.com) (209.85.212.54) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2012 03:50:21 +0000 Received: by vbmv11 with SMTP id v11so7099600vbm.41 for ; Mon, 24 Sep 2012 20:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=/uBf1tUZ8XrZDH2hBOUymEJXqIJO+NSH8k4KRflLiZY=; b=hpGT4/1vzwmxUYILdyEcq2iXzuPt9UGzcU5Y3YCpdfNw48FnAQ/Bf4F6TiX3MyToyx vDTM79AQX8W3FdeoEpDqeeyeAcoBBrrm0yh5w9dcFJRcOW1a0dyXH+N7QkWe8G5PykUR Xetl39SjleyV8Sm4wQLm42/4rZuiI8uO3byZODyDoqaSOcrlIZWJ7qG7S/hS+JKnwRoN b8KbYsUtn9HBg2kFP61Wz2/VW74tB3Gst11GSvx06bTUPtdtjdr8mX9TvwVLHhuFyEJR exnBvzqsRB31TD4B+oL2Ww/DeBh58mj+5TcyJAsmLwW9KvdVCA2VEOV03tPbCDs8pWqS WFZA== MIME-Version: 1.0 Received: by 10.221.0.78 with SMTP id nl14mr8536305vcb.21.1348545000468; Mon, 24 Sep 2012 20:50:00 -0700 (PDT) Received: by 10.58.29.164 with HTTP; Mon, 24 Sep 2012 20:50:00 -0700 (PDT) In-Reply-To: <506110E0.6090909@gmail.com> References: <505A6877.7090507@hates.ms> <346B7FD6-C961-4C0C-91C3-9FBBE442490D@hates.ms> <53D52D02E87FA04A948D9A74A7AE617C12E89935C4@Eagle.Blue.Roguewave.Com> <506110E0.6090909@gmail.com> Date: Mon, 24 Sep 2012 23:50:00 -0400 Message-ID: Subject: Re: STDCXX-1056 : numpunct fix From: Stefan Teleman To: "Apache Standard C++ Library" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Sep 24, 2012 at 10:03 PM, Martin Sebor wrote: > FWIW, there are race conditions in stdcxx. Some of them are by > design and benign on the systems the library runs on (although > I acknowledge that some others may be bugs). One such benign > date race is: > > time T1 T2 > 0 x = N > 1 x = N read x > > where x is a scalar that can be accessed atomically by the CPU > and the compiler. > > I think some of the lazy facet initialization falls under this > class. It would be nice to fix them but only if it doesn't slow > things down. The others need to be fixed in any case. The race conditions I am talking about are not benign. I've uploaded a full thread analyzer output for 22.locale.numpunct.mt showing dataraces here: http://s247136804.onlinehome.us/stdcxx-1056-malign/22.locale.numpunct.mt.2.er.tar.bz2 The name of the analyzer results directory is 22.locale.numpunct.mt.2.er You will need the SunPro Linux 12.3 Thread Analyzer installed, which comes with SunPro anyway. The analyzer itself is ${PATH_TO_SUN_PRO_INSTALL}/bin/analyzer There's a screenshot from the same Analyzer output here: http://s247136804.onlinehome.us/stdcxx-1056-malign/sunpro_thread_analyzer_screenshot.jpg taken just now on my laptop. The report itself is from a couple of days ago, and it's from a run with only the _numpunct.h patch applied. No patches to either facet.cpp, punct.cpp or locale_body.cpp. It shows the types of race conditions it's reporting: these are read/write race conditions, not read/read. The thread analyzer's html filter doesn't show the types of races reported as clearly as the command-line analyzer which has a windowing GUI. At any rate you can see the same exact type of race conditions being reported by the Intel Inspector 2013 Thread Analyzer. -- Stefan Teleman KDE e.V. stefan.teleman@gmail.com