Re: task state in a deadlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



yes, please tell us how u've thought of detecting the deadlock situation.

On 6/9/06, Ohad Ben-Cohen <ohadbc@xxxxxxxxx> wrote:
Hi.

On 6/8/06, Vincenzo Mallozzi <vinjunior@xxxxxxxx> wrote:
...
> I've to know when these threads are in a deadlock
> situation.
> To do this, I get the task struct of each threads and
> I need to know what is their state when they are in
> such a situation.
...

Hmmm.. I disagree. There is no general connection between the task state
and whether a process is in deadlock or not.
If a task is not running it _may_ indicate it is waiting in a semaphore, yes,
but it's _not_ an evidence of it being deadlocked.
a deadlock is a logical state.
when you wait on a lock you can be either in a deadlock or not -
but either way your task state is the same.


> I don't know if there's another way to get this
> information.
please give us the full picture of the problem.
maybe more details will shed some light...

cheers,
Ohad.
>
> Vincenzo.
>
> --- Jinesh K J <jineshkj.newsletters@xxxxxxxxx> ha
> scritto:
>
> > once u get the task_struct of the deadlocked
> > process, u can get the
> > state from the 'state' field in the structure. BTW,
> > how are u going to
> > find out which process has deadlocked?
> >
> >
> > On 6/8/06, Ohad Ben-Cohen <ohadbc@xxxxxxxxx> wrote:
> > > On 6/8/06, Vincenzo Mallozzi <vinjunior@xxxxxxxx>
> > wrote:
> > > > Is there a deterministic way to know if a
> > process is in deadlock have state
> > > > TASK_INTERRUPTIBLE or TASK_UNINTERRUPTIBLE?
> > > > I really need this information to know if some
> > threads are in such a
> > > > situation.
> > > > How can I resolve this problem? Is there another
> > solution?
> > >
> > > It's a little weird question. can you please
> > elaborate more on the problem ?
> > > what's going on ? why do you need this ?
> > >
> > > if you think you have deadlocks, why not just try
> > to solve them ?
> > > anyway,
> > > you might be interested to examine a recent kernel
> > patch posted by Ingo Molnar,
> > > which is called "the kernel lock validator". it
> > essentially hunts down possible
> > > deadlocks in the kernel. read on in
> > http://lwn.net/Articles/185666/
> > >
> > > Ohad.
> > >
> > > > Thanks.
> > > > Vincenzo
> > > >
> > > > On Wednesday 07 June 2006 15:16, William J Beksi
> > wrote:
> > > > > Vincenzo Mallozzi wrote:
> > > > >
> > > > > >Hi,
> > > > > >what is the task state of some
> > processes/threads that are in a deadlock
> > > > > >situation?  I've heard about
> > TASK_UNINTERRUPTIBLE. Is not it?
> > > > > >
> > > > > >
> > > > > In a deadlock situation both tasks are waiting
> > for a resource that is
> > > > > held by another task, therefore none of the
> > other tasks waiting for that
> > > > > resource can proceed. In
> > TASK_INTERRUPTIBLE/TASK_UNINTERRUPTIBLE the
> > > > > task is in a sleeping state with the exception
> > that TASK_UNINTERRUPTIBLE
> > > > > cannot be woken up by a signal. So it seems a
> > deadlock can occur with a
> > > > > task in an interruptible or uniterruptible
> > state.
> > > > >
> > > > > William
> > > > >
> > > >
> > > >
> > > > ___________________________________
> > > > Yahoo! Messenger with Voice: chiama da PC a
> > telefono a tariffe esclusive
> > > > http://it.messenger.yahoo.com
> > > >
> > > >
> > > > --
> > > > Kernelnewbies: Help each other learn about the
> > Linux kernel.
> > > > Archive:
> > http://mail.nl.linux.org/kernelnewbies/
> > > > FAQ:           http://kernelnewbies.org/faq/
> > > >
> > > >
> > >
> > > --
> > > Kernelnewbies: Help each other learn about the
> > Linux kernel.
> > > Archive:
> > http://mail.nl.linux.org/kernelnewbies/
> > > FAQ:           http://kernelnewbies.org/faq/
> > >
> > >
> >
>
>
> Chiacchiera con i tuoi amici in tempo reale!
>  http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
>


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux