From: Kyle Moffett <mrmacman_g4@mac.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Dan Bonachea <bonachead@comcast.net>,
linux-kernel@vger.kernel.org, nickpiggin@yahoo.com.au,
torvalds@osdl.org
Subject: Re: PROBLEM: pthread-safety bug in write(2) on Linux 2.6.x
Date: Thu, 13 Apr 2006 06:28:12 -0400 [thread overview]
Message-ID: <806A7BCF-C5FF-4B38-9F85-1D6FE8D47D6A@mac.com> (raw)
In-Reply-To: <20060413025608.3edbf603.akpm@osdl.org>
On Apr 13, 2006, at 05:56:08, Andrew Morton wrote:
> Dan Bonachea <bonachead@comcast.net> wrote:
>>
>> This problem arose in the parallel runtime system for a scientific
>> language compiler (nearly a million lines of code total -
>> definitely a "real-world" program) - the example code is merely a
>> pared-down demonstration of the problem. In parallel scientific
>> computing, it's very common for many threads to be writing to
>> stdout (usually for monitoring purposes) and it's expected and
>> normal for output from separate threads to be arbitrarily
>> interleaved, but it's *not* ok for output to be lost entirely.
>> This is essentially equivalent to the real-world example you gave
>> of many threads logging to a file.
>
> Interesting - afaik that's the first time this has been hit in a
> real application.
I would guess that it could also be a problem with a wide variety of
Perl CGIs running under Apache2+mod_perl with the worker threading
model. In fact this may actually explain some odd behavior I got
from one such module that I "fixed" by switching to logging via
syslog. I don't remember which module it was or what the exact
problem was, but I think it seemed similar in nature. That is
somewhat of a surprising and nonintuitive failure mode for logging,
IMHO it would be nice to get fixed. I would imagine that this has
probably been hit a number of times before, mysteriously fixed by
changed userspace locking or subtle thread ordering, and written off
as the mysterious effects of cosmic rays on RAM.
Cheers,
Kyle Moffett
next prev parent reply other threads:[~2006-04-13 10:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-13 1:45 Dan Bonachea
2006-04-13 2:10 ` Alistair John Strachan
2006-04-13 4:46 ` Andrew Morton
2006-04-13 5:33 ` Nick Piggin
2006-04-13 15:01 ` Linus Torvalds
2006-04-13 15:28 ` Linus Torvalds
2006-04-14 10:20 ` Nikita Danilov
2006-04-13 21:50 ` Alan Cox
2006-04-13 22:06 ` Dan Bonachea
2006-04-13 23:03 ` Linus Torvalds
2006-04-13 23:11 ` Alan Cox
2006-04-13 23:19 ` Linus Torvalds
2006-04-13 22:40 ` Linus Torvalds
2006-04-13 23:05 ` Alan Cox
2006-04-13 23:06 ` Linus Torvalds
2006-04-13 23:11 ` Linus Torvalds
2006-04-13 9:18 ` Dan Bonachea
2006-04-13 9:56 ` Andrew Morton
2006-04-13 10:28 ` Kyle Moffett [this message]
2006-04-13 14:14 ` Jan Engelhardt
2010-12-19 22:45 ` Jens Moser
[not found] <60Z8f-4QA-25@gated-at.bofh.it>
[not found] ` <611Wl-u5-1@gated-at.bofh.it>
[not found] ` <616k2-6Xz-27@gated-at.bofh.it>
2006-04-14 9:14 ` Kai Henningsen
2006-04-27 9:06 Samuel Thibault
2006-04-27 15:23 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=806A7BCF-C5FF-4B38-9F85-1D6FE8D47D6A@mac.com \
--to=mrmacman_g4@mac.com \
--cc=akpm@osdl.org \
--cc=bonachead@comcast.net \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®