Package: libdb4.6
Severity: normal
Tags: patch

Currently it is not possible to set an in-memory database's maxium size using
it's memory pool's set_maxsize() function. Calling this function after a
db_open will cause libdb to hang in a mutex deadlock. This has only been
tested on an in-memory database using shared memory. The fix is a one liner
and seems to be pretty obvious. A patch is attached.

I have not yet reported this to upstream. Please let me know if you will be
doing this or if I can help out in anyway.
--- db-4.6.21.orig/mp/mp_fmethod.c	2007-06-01 16:30:30.000000000 +0000
+++ db-4.6.21/mp/mp_fmethod.c	2008-03-06 05:02:29.000000000 +0000
@@ -358,7 +358,7 @@
 		mfp->maxpgno += (db_pgno_t)
 		    ((bytes + mfp->stat.st_pagesize - 1) /
 		    mfp->stat.st_pagesize);
-		MPOOL_SYSTEM_UNLOCK(dbenv);
+		MUTEX_UNLOCK(dbenv, mfp->mutex);
 	}
 
 	return (0);

Attachment: signature.asc
Description: Digital signature

Reply via email to