* How to identify locking process
@ 2000-10-24 4:00 Stefan Schwarzer
2000-10-24 4:00 ` Tony Verhulst
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Schwarzer @ 2000-10-24 4:00 UTC (permalink / raw)
We use an application (maple) that seems to rely on a (help) database
which it locks during use. Somehow, such a lock does not have been
properly removed maybe due to a crash, or a NFS locking problem or
some other reason. Now, whenever I use the application, it freezes on
me, probably waiting for the lock to become available.
Can I find out which process owns a lock?
Is there any way to unlock the file (if I could find out which one it is)
without reboot?
Over NFS, can I trick the lockd's into loosing locks?
Do you have any other suggestion?
Thanks a lot - Stefan.
--
Stefan Schwarzer office: +49-(0)711-685-7606 fax: x-3658
Uni Stuttgart, ICA 1 (?-
Pfaffenwaldring 27 //\ sts@ica1.uni-stuttgart.de
70569 Stuttgart, Germany -V_/---- http://www.ica1.uni-stuttgart.de/~sts
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to identify locking process
2000-10-24 4:00 How to identify locking process Stefan Schwarzer
@ 2000-10-24 4:00 ` Tony Verhulst
0 siblings, 0 replies; 2+ messages in thread
From: Tony Verhulst @ 2000-10-24 4:00 UTC (permalink / raw)
Stefan Schwarzer wrote:
>
> We use an application (maple) that seems to rely on a (help) database
> which it locks during use. Somehow, such a lock does not have been
> properly removed maybe due to a crash, or a NFS locking problem or
> some other reason. Now, whenever I use the application, it freezes on
> me, probably waiting for the lock to become available.
>
> Can I find out which process owns a lock?
> Is there any way to unlock the file (if I could find out which one it is)
> without reboot?
> Over NFS, can I trick the lockd's into loosing locks?
Assuming you have the source and if the lock is a semaphore, you can set
the SEM_UNDO flag when the lock is aquired so that when a process
terminates the lock is guaranteed to be dropped:
partdb->sops.sem_num = 0;
partdb->sops.sem_op = -1;
partdb->sops.sem_flg = SEM_UNDO;
if (semop(partdb->sem_id, &partdb->sops, 1) == -1)
perror("semop (lock)");
If you have no source, and again assuming semaphores, use ipcs(1) to get
the current semaphores and then use ipcrm(1) to remove it.
Tony V.
Kernel Group
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-10-24 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-24 4:00 How to identify locking process Stefan Schwarzer
2000-10-24 4:00 ` Tony Verhulst
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox