97 lines
3.5 KiB
Plaintext
97 lines
3.5 KiB
Plaintext
From ilug-admin@linux.ie Fri Sep 6 11:40:54 2002
|
|
Return-Path: <ilug-admin@linux.ie>
|
|
Delivered-To: zzzz@localhost.spamassassin.taint.org
|
|
Received: from localhost (jalapeno [127.0.0.1])
|
|
by spamassassin.taint.org (Postfix) with ESMTP id 7D5C516F19
|
|
for <zzzz@localhost>; Fri, 6 Sep 2002 11:39:13 +0100 (IST)
|
|
Received: from jalapeno [127.0.0.1]
|
|
by localhost with IMAP (fetchmail-5.9.0)
|
|
for zzzz@localhost (single-drop); Fri, 06 Sep 2002 11:39:13 +0100 (IST)
|
|
Received: from lugh.tuatha.org (root@lugh.tuatha.org [194.125.145.45]) by
|
|
dogma.slashnull.org (8.11.6/8.11.6) with ESMTP id g86AQeC32186 for
|
|
<zzzz-ilug@spamassassin.taint.org>; Fri, 6 Sep 2002 11:26:40 +0100
|
|
Received: from lugh (root@localhost [127.0.0.1]) by lugh.tuatha.org
|
|
(8.9.3/8.9.3) with ESMTP id LAA06471; Fri, 6 Sep 2002 11:24:33 +0100
|
|
X-Authentication-Warning: lugh.tuatha.org: Host root@localhost [127.0.0.1]
|
|
claimed to be lugh
|
|
Received: from web12102.mail.yahoo.com (web12102.mail.yahoo.com
|
|
[216.136.172.22]) by lugh.tuatha.org (8.9.3/8.9.3) with SMTP id LAA06436
|
|
for <ilug@linux.ie>; Fri, 6 Sep 2002 11:24:22 +0100
|
|
Message-Id: <20020906102417.66047.qmail@web12102.mail.yahoo.com>
|
|
Received: from [159.134.146.155] by web12102.mail.yahoo.com via HTTP;
|
|
Fri, 06 Sep 2002 11:24:17 BST
|
|
Date: Fri, 6 Sep 2002 11:24:17 +0100 (BST)
|
|
From: =?iso-8859-1?q?Colin=20Nevin?= <colin_nevin@yahoo.com>
|
|
To: ilug@linux.ie
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=iso-8859-1
|
|
Content-Transfer-Encoding: 8bit
|
|
Subject: [ILUG] semaphores on linux RH7.3
|
|
Sender: ilug-admin@linux.ie
|
|
Errors-To: ilug-admin@linux.ie
|
|
X-Mailman-Version: 1.1
|
|
Precedence: bulk
|
|
List-Id: Irish Linux Users' Group <ilug.linux.ie>
|
|
X-Beenthere: ilug@linux.ie
|
|
|
|
Hi All,
|
|
|
|
I have a question which is a bit tricky and was
|
|
wondering of anyone has come across this problem
|
|
before or could point me in the right direction.
|
|
|
|
I am involved in porting a SCO unix application to
|
|
Linux, and we have encountered a problem with the way
|
|
semaphores are being handled. The application uses
|
|
mulitple processes to run application code with the
|
|
main process known as the bsh which controls all i/o
|
|
be it screen, or file i/o, syncronisation is handled
|
|
via semaphores.
|
|
|
|
In certain circumstances the main process and the
|
|
application child process seem to lock up both waiting
|
|
for the syncronisation semaphores to change state, I
|
|
have attached ddd to the processes and it seems that
|
|
the semaphore code is doing the correct things for
|
|
syncronisation but the processes stay stuck in the
|
|
semop() system call.
|
|
|
|
I have also noticed that if I introduce a slight delay
|
|
between changing semaphore states the problem goes
|
|
away, but this causes our entire application to run
|
|
really sloooww !! lol
|
|
|
|
Is there anything weird or different with the standard
|
|
implemenation of semaphores on modern linux that could
|
|
cause a semop() to fail to pick up the change in state
|
|
|
|
in a semaphore immediately?
|
|
|
|
Setting sem_flg = IPC_NOWAIT and checking for errno ==
|
|
EAGAIN and recalling semop() if the semop() call fails
|
|
(-1) also fixes the problem but again system
|
|
performance goes down the toilet.
|
|
|
|
both the parent controlling process run as the same
|
|
uid, and the parent creates the semaphores with
|
|
permissions 0666.
|
|
|
|
Any pointers would be appreciated!
|
|
|
|
Rgds,
|
|
|
|
Colin Nevin
|
|
|
|
__________________________________________________
|
|
Do You Yahoo!?
|
|
Everything you'll ever need on one web page
|
|
from News and Sport to Email and Music Charts
|
|
http://uk.my.yahoo.com
|
|
|
|
--
|
|
Irish Linux Users' Group: ilug@linux.ie
|
|
http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
|
|
List maintainer: listmaster@linux.ie
|
|
|
|
|