Re: dbm_store() returns -1, but no specific error is reported
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Nov 28, 2007, at 10:45 AM, Christian Moen wrote: darwin-dev, I'm experiencing strange behaviour with DBM on a Mac OS X 10.5.1 (both on G5 and Intel) and it would be great to get some feedback from the list on what the problem might be. Running a quick dtrace script (attached) reveals that this fails due to an overflow page not being added: 1 <- memcmp 10001 1 -> __addel 1788 1 -> __add_ovflpage 1789 1 <- __add_ovflpage 7068 1 <- __addel 7067 1 <- hash_access 7005 1 <- dbm_store 7896 So, looking at http://www.opensource.apple.com/darwinsource/10.5/Libc-498/db/hash/hash_page... -- Anton _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com So __add_ovflpage is failing. But I'm not sure which source this is built from. I thought it was the BerkeleyDB-15 package, but that doesn't seem to have this function (it has __ham_add_ovflpage instead)...ah, we're working with LibC-548 instead. [Is the BerkeleyDB code shipped somehow?] it appears that overflow_page() must be returning 0, indicating that there are no usable free pages in the database file. There are some strange (to my eye) limits on which pages can be used for overflow pages. This looks like pretty old DBM code. I'm not sure I'd rely on it for larger databases. You could probably use the btree instead of hash code (using the dbopen interface) and at least get a larger file. But I'd still wonder if Apple's shipping a more up-to-date database somewhere.... test.d
participants (1)
-
Anton Rang