#622 DS logging errors "libdb: BDB0171 seek: 2147483648: (262144 * 8192) + 0: No such file or directory
Closed: wontfix None Opened 8 years ago by jyotidas81.

This error message gets logged in the error log if size of the id2entry grows beyond 2 GB. By debugging the code and found the root cause of the issue. Please verify the fix and merge the changes back into the 389 code base.

Problem statement:

In file ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c and function "dblayer_seek43_large" the ret is declared as a int type. ideally int can hold upto 2147483647. As ns-slapd is a 64 bit application, the ret type should have bin unsigned long type.

if 1000DB_VERSION_MAJOR + 100DB_VERSION_MINOR >= 4300

/ Helper function for large seeks, db4.3 /
static int dblayer_seek43_large(int fd, off64_t offset, int whence)
{
int ret = 0; / This is problem here, it should have been off64_t type /

ret = lseek64(fd, offset, whence);

return (ret < 0) ? errno : 0;

}

else

Fix details:

if 1000DB_VERSION_MAJOR + 100DB_VERSION_MINOR >= 4300

/ Helper function for large seeks, db4.3 /
static int dblayer_seek43_large(int fd, off64_t offset, int whence)
{
off64_t ret = 0; / Defined as unsigned long type instead of int /

ret = lseek64(fd, offset, whence);

return (ret < 0) ? errno : 0;

}

else


Thanks for the fix jyotidas81! The official patch has been sent out for review...

git merge ticket622
Updating 59ae73c..0c37479
Fast-forward
ldap/servers/slapd/back-ldbm/dblayer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

git push origin master
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 861 bytes, done.
Total 7 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
59ae73c..0c37479 master -> master

Metadata Update from @mreynolds:
- Issue assigned to mreynolds
- Issue set to the milestone: 1.3.1

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/622

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

a year ago

Login to comment on this ticket.

Metadata