[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pb : semaphore crashing with kernel 2..4.x
From: |
Stephane Domas,,, |
Subject: |
pb : semaphore crashing with kernel 2..4.x |
Date: |
Wed, 02 Feb 2005 18:06:36 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 |
hello
I'm writing you to ask if you already seen problems with semaphore and
thread termination under kernel 2.4.X.
To describe more precisely my problem :
I launch a process, which instanciate 7 semaphores, agregate in a
Handler object. Then the process launches 3 threads (let's call them S,
R, and C). These three threads own the Handler object, so they can post
and/or wait on these semaphore. 3 first semaphore are used by the
process to wake up S,R,C and the three others are used by S, R and C to
signal to the process that they are stopped.
Further in the execution, the process launches a new thread (let's call
it T) that also owns the handler object. And for an obscur reason, when
this thread or another one do a post on the the 7th semaphore, it
crashes. Very surprisingly, this crash does not occur on a 2.6.X kernel.
Another bug [ if I do not post on the 7th semaphore ] : if I let the
last thread T ends himself, it calls the final method which only
contains a message print. This works well. But ... if the thread do a
long sleep [ just before the end of run() ], and the process tries to
delete it (calling terminate in the destructor of T), the thread prints
out the message and then blocks infinitely. Thus, ending itself works
but forcing a thread to terminate does not work. Once again, this bug
disappear when using a 2.6.8 kernel !
Have you any idea on why this behaviour ??
Thanx
S. Domas
--
__________ _______________ ____________________ ________ ______ ___
// / _ / / / /---\
//___ _/_ /_| ___/_ _____ ______/_ ____ __ ____// |
|| | // ____ | || /
|| ooo //ooo |----| || /
|| OOOOOOOOOOOO __|____|__ "Leave yourself behind..." ||--
|| OOO OOOOOOOOO / Q o\ ||
|| OO OOOOOO_OOO (___~~_) but never forget ur hat ||
|| OOO OOOOO|_\OO /=/ \\ ||
|| OOO OOOOO\_\___/=/ | - Hervald's saying - ||
|| OOOOOOOOO\/|_|\/ /\ ||
||___ _ OOOOOOO ____ ___ __ __|___ ___ __||
// / / / / //
//_____/-____________/-_______/--___________/__________/--______//
- pb : semaphore crashing with kernel 2..4.x,
Stephane Domas,,, <=