[erlang-questions] Mnesia Deadlock

Gordon Guthrie <>
Tue Jun 12 15:42:42 CEST 2012


> That is not a deadlock,

It's much worse than that :(

> Whenever 263 is finished 281 will get the lock.

263 is trying to execute a fn that has been passed in by 281 - one
process has a lock on a table and synchronously asks another fun to
acquire another lock on the same table, do something, and then return
:(

This isn't a deadlock is 'a demonic apparition from the spirit world-lock'

And its my fault :(

Gordon

On 12 June 2012 07:29, Dan Gudmundsson <> wrote:
> That is not a deadlock,
>
> You have one process holding the locks <0.263.0>
> and one waiting to get a table lock <0.281.0>
>
> Whenever 263 is finished 281 will get the lock.
>
> /Dan
>
> On Mon, Jun 11, 2012 at 9:28 PM, Gordon Guthrie <> wrote:
>> Folks
>>
>> I am getting a transactional deadlock:
>>
>> mnesia:info().
>> ---> Processes holding locks <---
>> Lock: {{'hypernumbers.dev&9000&item',1339363066444676},
>>       write,
>>       {tid,630,<0.263.0>}}
>> Lock: {{'hypernumbers.dev&9000&local_obj',1339363066444676},
>>       read,
>>       {tid,630,<0.263.0>}}
>> Lock: {{'hypernumbers.dev&9000&site',1339363066444676},
>>       write,
>>       {tid,630,<0.263.0>}}
>> Lock: {{'hypernumbers.dev&9000&del_local',1339363066444676},
>>       read,
>>       {tid,630,<0.263.0>}}
>> Lock: {{'hypernumbers.dev&9000&group',"doobie"},write,{tid,632,<0.281.0>}}
>> ---> Processes waiting for locks <---
>> Tid {tid,630,<0.263.0>} waits for write lock on oid
>> {'hypernumbers.dev&9000&group',
>>
>> '______WHOLETABLE_____'} owned by {tid,
>>
>>                 632,
>>
>>                 <0.281.0>}
>> ---> Participant transactions <---
>> ---> Coordinator transactions <---
>> Tid: 630 (owned by <0.263.0>)
>> Tid: 632 (owned by <0.281.0>)
>> ---> Uncertain transactions <---
>> ---> Active tables <---
>>
>> Process <0.263.0> is doing a foldl over a small table and process
>> <0.281.0> is trying to write to it.
>>
>> How do I get out of this?
>>
>> It is RB1403.
>>
>> Gordon
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list