Skip Menu |

This queue is for tickets about the BerkeleyDB CPAN distribution.

Report information
The Basics
Id: 121991
Status: open
Priority: 0/
Queue: BerkeleyDB

People
Owner: Nobody in particular
Requestors: aliaksei-belaus [...] yandex.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: bug in cursor lock
Date: Mon, 05 Jun 2017 13:32:34 +0300
To: bug-berkeleydb [...] rt.cpan.org
From: Алексей Белоус <aliaksei-belaus [...] yandex.ru>
Hello, I have found an error which can lead to deadlock of berkley db. main.cpp file has code how to reproduce it. It was reproduced in 6.0.20 version.
The problem here is that after call of
 
ret = db_cursor->c_get(db_cursor, &key, &data, DB_MULTIPLE_KEY | DB_NEXT);
 
cursor read lock disappears. You can check that with db_stat tool.
 
When I call ret = db_cursor->c_get(db_cursor, &key, &data, DB_MULTIPLE_KEY | DB_SET_RANGE); I take a lock on page 1.
 
2 READ_UNCOMMITTED    1 HELD    ./databese.db             page          1
 
But after call ret = db_cursor->c_get(db_cursor, &key, &data, DB_MULTIPLE_KEY | DB_NEXT); the lock disappears.
 
On next iterations I read data without lock on pages. I suppose it is an error. I also attached a patch, which fix a problem. Please check it.
 
Hope the problem will be fixed.
Thanks in advance.
 
 

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Thanks for the bug report. You've sent it to the wrong place. This site is only for issues with the Perl interface to Berkeley DB. Your issue seems to be with the underlying Berkeley DB C library. Suggest you report the issue on the Oracle site This looks like the best place https://community.oracle.com/community/database/high_availability/berkeley_db_family/berkeley_db cheers Paul