Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-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 78B20E5D8 for ; Fri, 4 Jan 2013 21:41:17 +0000 (UTC) Received: (qmail 14654 invoked by uid 500); 4 Jan 2013 21:41:16 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 14585 invoked by uid 500); 4 Jan 2013 21:41:16 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 14577 invoked by uid 99); 4 Jan 2013 21:41:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2013 21:41:16 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of daniel.lescohier@cbsinteractive.com designates 74.125.149.155 as permitted sender) Received: from [74.125.149.155] (HELO na3sys009aog126.obsmtp.com) (74.125.149.155) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 04 Jan 2013 21:41:07 +0000 Received: from mail-oa0-f69.google.com ([209.85.219.69]) (using TLSv1) by na3sys009aob126.postini.com ([74.125.148.12]) with SMTP ID DSNKUOdMXfmg/QHaZ5FhOhoZsQNnBiqebOGx@postini.com; Fri, 04 Jan 2013 13:40:46 PST Received: by mail-oa0-f69.google.com with SMTP id j6so72552547oag.0 for ; Fri, 04 Jan 2013 13:40:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:date:x-google-sender-auth:message-id :subject:from:to:content-type:x-gm-message-state; bh=7AdwuXcpn7AjQKkIpU0RyHZcgKY/3op+0KVDnGUkj3c=; b=CRXBtkmiSpmFRCkm/LgFPsMXYIzC+axzIWId63g8sWps+nYni7QUHGsXvMp4rKkTws Sucg7ruJNg274DXMziLP3YYnPkdHfSKLnL6AifmKsfO/P3PSwooJ29qRYI84PyeHrq5Z L6SshTUjhJl3lgZRQ/XrCR9Hy9/8KbNYoQqK5aApMFT8QX653N0QV0r5oUviPoHZVl87 6SSnwI7Y81kI4UfE/uBAkNAcUuRQaArnfSn5aRQHUTp/Vbl8ur1Wo74zTEJgLv6wITbm jzBUNiHQxttyCnVJ4UUKC7nXJVJwDeR89KjjEBY2l1bhp7QbkUhKmqFC5O0UxxiVM1f9 dWlQ== X-Received: by 10.60.29.70 with SMTP id i6mr31518246oeh.38.1357335644754; Fri, 04 Jan 2013 13:40:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.29.70 with SMTP id i6mr31518245oeh.38.1357335644642; Fri, 04 Jan 2013 13:40:44 -0800 (PST) Sender: daniel.lescohier@cbsinteractive.com Received: by 10.76.86.233 with HTTP; Fri, 4 Jan 2013 13:40:44 -0800 (PST) Date: Fri, 4 Jan 2013 16:40:44 -0500 X-Google-Sender-Auth: 8P2oZZlgnvEKUBngr3MOvA9T5NE Message-ID: Subject: thread-safety of time conversion caches in util_time.c and mod_log_config.c From: Daniel Lescohier To: dev@httpd.apache.org Content-Type: multipart/alternative; boundary=e89a8ff25644f09d1d04d27d544a X-Gm-Message-State: ALoCoQkrrieZps6uC9nx45HVe5ezDgwatv7AxOpABnT+nT2K7Jgqb+IHI1NL83/xrXDR1v3TmOSYgPcgsMJVmo69QGOCR26ujtVns5MDn/2X0itacU+5uSRgsTAA8NEytQX6CMIsoBLVkxcNJpiLSLhWqJ6+7dnQvty7q+hN1J3e+ylhl51nYr0= X-Virus-Checked: Checked by ClamAV on apache.org --e89a8ff25644f09d1d04d27d544a Content-Type: text/plain; charset=ISO-8859-1 I entered a bug on the thread-safety of the time conversion caches in server/util_time.c and modules/loggers/mod_log_config.c. In brief, they're not thread-safe because: 1. The algorithm depends on total memory ordering, and both the volatile qualifier and memory barriers are not used. 2. The algorithm is subject to the "ABA problem." The details of the problem are here: https://issues.apache.org/bugzilla/show_bug.cgi?id=54363 I included in the bug not-yet-tested patches with a different algorithm. Do other people agree that the existing algorithm have the problems explained in detail in the bug? Thanks, Daniel Lescohier --e89a8ff25644f09d1d04d27d544a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I entered a bug on the thread-safety of the time conversion caches in serve= r/util_time.c and modules/loggers/mod_log_config.c.

In brief, they&#= 39;re not thread-safe because:
  1. The algorithm depends on total me= mory ordering, and both the volatile qualifier and memory barriers are not = used.
  2. The algorithm is subject to the "ABA problem."

Th= e details of the problem are here:

https://issues.apache.org/bugzilla/sho= w_bug.cgi?id=3D54363

I included in the bug not-yet-tested patches with a different algorithm.=

Do other people agree that the existing algorithm have the problems = explained in detail in the bug?

Thanks,

Daniel Lescohier


--e89a8ff25644f09d1d04d27d544a--