mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
To: Emmanuel Fleury <fleury@cs.aau.dk>
Cc: Linux Kernel Mailing-list <linux-kernel@vger.kernel.org>
Subject: Re: Changes Pthreads, Mutexes and Co. ?
Date: Wed, 10 Nov 2004 16:36:09 +0100	[thread overview]
Message-ID: <200411101636.10443.robin.rosenberg.lists@dewire.com> (raw)
In-Reply-To: <1100096653.3305.9.camel@rade7.e.cs.auc.dk>

On Wednesday 10 November 2004 15.24, you wrote:
> Hi all,
>
> I am using the software Cinelerra and I noticed that it was
> systematically crashing (segfaults) under 2.6.9 where using a 2.6.7 was
> ok. After looking more in depth at the problem it seems that the main
> issue comes from the fact that several objects (it's C++) are tested in
> one thread while they are freed in another. Changing from 2.6.7 to 2.6.9
> seems to make it possible to have the free(object) occurring before the
> test which leads to a segfault.
>
> So, my little question is: "Did something changed recently in the kernel
> about mutexes, phtreads, and so on ???"

A slight change in how the kernel schedules thread can cause failures in 
already broken programs. Such changes can come from any source. A 
consequence of preemptive scheduling is that you never when code in different 
threads run relative to each other except when you explicitly synchronize 
them.

It's very easy to create multithreaded programs that work fine by pure luck, 
until one day they stop working. Testing alone is not likely to find bugs 
caused by broken or missing synchronization, although multiprocessor machines
triggers such bugs more easily.

This doesn't rule out kernel bugs, but that's not where I'd start looking. 
First check that access to the objects in question is synchronized properly.

-- robin

      reply	other threads:[~2004-11-10 15:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-10 14:24 Emmanuel Fleury
2004-11-10 15:36 ` Robin Rosenberg [this message]

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=200411101636.10443.robin.rosenberg.lists@dewire.com \
    --to=robin.rosenberg.lists@dewire.com \
    --cc=fleury@cs.aau.dk \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome