openldap na bdb

The Undefined undefine w aramin.net
Śro, 18 Sie 2004, 02:13:26 CEST


Kilka dni testowo działało, potem się wywaliło:
bdb_db_open: dbenv_open(/var/lib/openldap-data)
=> bdb_last_id: get failed: Cannot allocate memory (12)
bdb_db_open: last_id(/var/lib/openldap-data) failed: Cannot allocate memory (12)
backend_startup: bi_db_open failed! (12)

strace nie daje wiele wiecej:
write(2, "bdb_db_open: dbenv_open(/var/lib"..., 48bdb_db_open: dbenv_open(/var/lib/openldap-data)) = 48
stat64("/var/lib/openldap-data/DB_CONFIG", 0xbffff860) = -1 ENOENT (No such file or directory)
open("/var/lib/openldap-data/DB_CONFIG", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/var/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
stat64("/var/lib/openldap-data/__db.001", {st_mode=S_IFREG|0600, st_size=8192, ...}) = 0
open("/var/lib/openldap-data/__db.001", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = -1 EEXIST (File exists)
open("/var/lib/openldap-data/__db.001", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = -1 EEXIST (File exists)
open("/var/lib/openldap-data/__db.001", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = -1 EEXIST (File exists)
open("/var/lib/openldap-data/__db.001", O_RDWR|O_LARGEFILE) = 9
fcntl64(9, F_SETFD, FD_CLOEXEC)         = 0
fstat64(9, {st_mode=S_IFREG|0600, st_size=8192, ...}) = 0
close(9)                                = 0
open("/var/lib/openldap-data/__db.001", O_RDWR|O_LARGEFILE) = 9
fcntl64(9, F_SETFD, FD_CLOEXEC)         = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED, 9, 0) = 0x40015000
close(9)                                = 0
stat64("/var/lib/openldap-data/__db.002", {st_mode=S_IFREG|0600, st_size=270336, ...}) = 0
open("/var/lib/openldap-data/__db.002", O_RDWR|O_CREAT|O_LARGEFILE, 0600) = 9
fcntl64(9, F_SETFD, FD_CLOEXEC)         = 0
mmap2(NULL, 270336, PROT_READ|PROT_WRITE, MAP_SHARED, 9, 0) = 0x4050e000
close(9)                                = 0
stat64("/var/lib/openldap-data/__db.003", {st_mode=S_IFREG|0600, st_size=98304, ...}) = 0
open("/var/lib/openldap-data/__db.003", O_RDWR|O_CREAT|O_LARGEFILE, 0600) = 9
fcntl64(9, F_SETFD, FD_CLOEXEC)         = 0
mmap2(NULL, 98304, PROT_READ|PROT_WRITE, MAP_SHARED, 9, 0) = 0x40550000
close(9)                                = 0
stat64("/var/lib/openldap-data/__db.004", {st_mode=S_IFREG|0600, st_size=368640, ...}) = 0
open("/var/lib/openldap-data/__db.004", O_RDWR|O_CREAT|O_LARGEFILE, 0600) = 9
fcntl64(9, F_SETFD, FD_CLOEXEC)         = 0
mmap2(NULL, 368640, PROT_READ|PROT_WRITE, MAP_SHARED, 9, 0) = 0x40568000
close(9)                                = 0
stat64("/var/lib/openldap-data/__db.005", {st_mode=S_IFREG|0600, st_size=16384, ...}) = 0
open("/var/lib/openldap-data/__db.005", O_RDWR|O_CREAT|O_LARGEFILE, 0600) = 9
fcntl64(9, F_SETFD, FD_CLOEXEC)         = 0
mmap2(NULL, 16384, PROT_READ|PROT_WRITE, MAP_SHARED, 9, 0) = 0x405c2000
close(9)                                = 0
stat64("/var/lib/openldap-data/id2entry.bdb", {st_mode=S_IFREG|0600, st_size=3866624, ...}) = 0
stat64("/var/lib/openldap-data/id2entry.bdb", {st_mode=S_IFREG|0600, st_size=3866624, ...}) = 0
open("/var/lib/openldap-data/id2entry.bdb", O_RDWR|O_LARGEFILE) = 9
fcntl64(9, F_SETFD, FD_CLOEXEC)         = 0
read(9, "\2\0\0\0\302H\26\0\0\0\0\0b1\5\0\t\0\0\0\0@\0\0\0\t\0\0"..., 512) = 512
close(9)                                = 0
stat64("/var/lib/openldap-data/id2entry.bdb", {st_mode=S_IFREG|0600, st_size=3866624, ...}) = 0
open("/var/lib/openldap-data/id2entry.bdb", O_RDWR|O_LARGEFILE) = 9
fcntl64(9, F_SETFD, FD_CLOEXEC)         = 0
fstat64(9, {st_mode=S_IFREG|0600, st_size=3866624, ...}) = 0
time(NULL)                              = 1092790954
stat64("/var/lib/openldap-data/dn2id.bdb", {st_mode=S_IFREG|0600, st_size=8192, ...}) = 0
stat64("/var/lib/openldap-data/dn2id.bdb", {st_mode=S_IFREG|0600, st_size=8192, ...}) = 0
open("/var/lib/openldap-data/dn2id.bdb", O_RDWR|O_LARGEFILE) = 10
fcntl64(10, F_SETFD, FD_CLOEXEC)        = 0
read(10, "\0\0\0\0\1\0\0\0\0\0\0\0b1\5\0\t\0\0\0\0\20\0\0\0\t\0\0"..., 512) = 512
close(10)                               = 0
stat64("/var/lib/openldap-data/dn2id.bdb", {st_mode=S_IFREG|0600, st_size=8192, ...}) = 0
open("/var/lib/openldap-data/dn2id.bdb", O_RDWR|O_LARGEFILE) = 10
fcntl64(10, F_SETFD, FD_CLOEXEC)        = 0
fstat64(10, {st_mode=S_IFREG|0600, st_size=8192, ...}) = 0
time(NULL)                              = 1092790954
write(2, "=> bdb_last_id: get failed: Cann"..., 56=> bdb_last_id: get failed: Cannot allocate memory (12)) = 56
time([1092790954])                      = 1092790954
getpid()                                = 16331
rt_sigaction(SIGPIPE, {0x400d2770, [], 0}, {SIG_IGN}, 8) = 0
send(4, "<167>Aug 18 03:02:34 slapd[16331"..., 92, 0) = 92
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
write(2, "bdb_db_open: last_id(/var/lib/op"..., 81bdb_db_open: last_id(/var/lib/openldap-data) failed: Cannot allocate memory (12)) = 81


db_verify jedyny uszkodzony plik podaje:
[root w helios openldap-data]# db_verify /var/lib/openldap-data/id2entry.bdb 
db_verify: Page 1: item 25 of unrecognizable type
db_verify: Page 1: item 26 of unrecognizable type
db_verify: Page 1: item 28 of unrecognizable type
db_verify: Page 1: item 29 of unrecognizable type
db_verify: Page 1: item 30 of unrecognizable type
db_verify: Page 1: item 31 of unrecognizable type
db_verify: Page 1: gap between items at offset 2440
db_verify: Page 1: gap between items at offset 5156
db_verify: Page 1: item order check unsafe: skipping
db_verify: DB->verify: /var/lib/openldap-data/id2entry.bdb: DB_VERIFY_BAD: Database verification failed

Tylko.. co dalej mogę z tym zrobić? :) (poza rzecz jasna odtworzeniem bazy z repliki/backupu)

google milczy na ten temat, jedyne co znalazlem to:
http://bbs.chinaunix.net/forum/35/20040718/369058.html, potrafi ktos przetłumaczyć? ;)
(patch widzę że jest juz na nasze db nałożony...)

-- 
Andrzej 'The Undefined' Dopierała
UNIX && Linux administrator, Adam Mickiewicz University WMiI
PLD Linux Developer             HomePage: http://aramin.net/
JID: undefine w piastlan.net    e-mail: undefine w pld-linux.org




Więcej informacji o liście dyskusyjnej pld-devel-pl