* Changes Pthreads, Mutexes and Co. ?
@ 2004-11-10 14:24 Emmanuel Fleury
2004-11-10 15:36 ` Robin Rosenberg
0 siblings, 1 reply; 2+ messages in thread
From: Emmanuel Fleury @ 2004-11-10 14:24 UTC (permalink / raw)
To: Linux Kernel Mailing-list
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 ???"
I didn't find anything obvious about this by browsing the web.
Regards
--
Emmanuel Fleury
Computer Science Department, | Office: B1-201
Aalborg University, | Phone: +45 96 35 72 23
Fredriks Bajersvej 7E, | Fax: +45 98 15 98 89
9220 Aalborg East, Denmark | Email: fleury@cs.aau.dk
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Changes Pthreads, Mutexes and Co. ?
2004-11-10 14:24 Changes Pthreads, Mutexes and Co. ? Emmanuel Fleury
@ 2004-11-10 15:36 ` Robin Rosenberg
0 siblings, 0 replies; 2+ messages in thread
From: Robin Rosenberg @ 2004-11-10 15:36 UTC (permalink / raw)
To: Emmanuel Fleury; +Cc: Linux Kernel Mailing-list
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-11-10 15:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-10 14:24 Changes Pthreads, Mutexes and Co. ? Emmanuel Fleury
2004-11-10 15:36 ` Robin Rosenberg
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