Re: [bdbxml] couldn't open container twice

Dmitriy Kargapolov <[email protected]>
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
Dmitriy Kargapolov <xoid@...> writes:

> 
> I tried to open container from two different accounts at the same time:
> 
> envsContainer = theMgr.openContainer(txn, "test.dbxml", config);
> pause();
> 
> when user1 opened container, user2 couldn't open _same_ container.
> once user1 closed container, user2 went ahead with no further problems.
> 
> I thought container could be opened multiple times but it didn't work.
> 
> Did anybody have similar problem?
> Thanks.
> 
> ------------------------------------------
> To remove yourself from this list, send an
> email to xml-unsubscribe@...
> 
> 

Another consideration:
I ran two identical processes on same db/container.
Each process opens container, performs some modification, then closes it.
Everything is done with transaction support.
After couple minutes of normal processing both proc. are stuck.
Backtrace in the GDB shows same place where they are waiting:
__db_tas_mutex_lock():

Closing container:
#4  0x5d16c534 in __db_tas_mutex_lock (dbenv=0x1dfcd0, mutexp=0xc18ccf60) at
../dist/../mutex/mut_tas.c:180
#5  0x5d29a638 in __db_mutex_free (dbenv=0x1dfcd0, infop=0x64150,
mutexp=0xc35298b0) at ../dist/../mutex/mutex.c:167
#6  0x5d2056f0 in __db_refresh (dbp=0x968b8, txn=0x0, flags=0,
deferred_closep=0x68ff3140) at ../dist/../db/db.c:915
#7  0x5d204bd0 in __db_close (dbp=0x968b8, txn=0x0, flags=0) at
../dist/../db/db.c:627

Opening container:
#4  0x5d16c534 in __db_tas_mutex_lock (dbenv=0x1dfcd0, mutexp=0xc18ccf60) at
../dist/../mutex/mut_tas.c:180
#5  0x5d286120 in __memp_alloc (dbmp=0x2b61c0, infop=0x64150, mfp=0x0, len=40,
offsetp=0x0, retp=0x52c4e0 "")
    at ../dist/../mp/mp_alloc.c:72
#6  0x5d29a550 in __db_mutex_alloc_int (dbenv=0x1dfcd0, infop=0x64150,
storep=0x52c4e0) at ../dist/../mutex/mutex.c:139
#7  0x5d29a330 in __db_mutex_setup (dbenv=0x1dfcd0, infop=0x64150, ptr=0x52c4e0
"", flags=257) at ../dist/../mutex/mutex.c:67

It looks like unexpected deadlock.
db_deadlock utility shows 180 lockers...




------------------------------------------
To remove yourself from this list, send an
email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.