[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [POT] PHP 'hangs' slapd (?!)



Quoting "Pierangelo Masarati" <ando@sys-net.it>:

>> In my phpQLAdmin, I sometimes (can't successfully reproduce it)
>> manage to hang the slapd process. The only way to recover, is to
>> remove the logfiles (log.* and __db.*) and reindex the database.
>>
>> I don't use the CLI tools much any more, but it happens and I
>> have not seen this with those.
>>
>> Anyone have an idea what it can be, and where to look?
>
> The report is a bit vague.

Yeah, I know. Sorry about that, but I have not been able to reproduce
it. It can work for hours, but all of a sudden slapd hangs...

> I suggest you run a non-stripped binary, and
> run gdb on it when it hangs to see where (and what stack strace with) it
> happens.  Some trace of the operation initiated by PHP would also be of
> help.

I'll do that as soon as it hangs again. But in the meantime, here's what
'logcheck' is telling me:

----- s n i p -----
Possible Security Violations
=-=-=-=-=-=-=-=-=-=
Oct 11 12:22:32 papadoc slapd[9016]: bdb(c=SE): txn_checkpoint: failed to flush the buffer cache Invalid argument
Oct 11 12:22:32 papadoc slapd[9016]: bdb(c=SE): txn_checkpoint: failed to flush the buffer cache Invalid argument
Oct 11 12:23:07 papadoc slapd[8426]: bdb(c=SE): txn_checkpoint: failed to flush the buffer cache Invalid argument
Oct 11 12:23:07 papadoc slapd[8426]: bdb(c=SE): txn_checkpoint: failed to flush the buffer cache Invalid argument
Oct 11 12:23:20 papadoc slapd[8426]: bdb(c=SE): txn_checkpoint: failed to flush the buffer cache Invalid argument
Oct 11 12:23:20 papadoc slapd[8426]: bdb(c=SE): txn_checkpoint: failed to flush the buffer cache Invalid argument

Unusual System Events
=-=-=-=-=-=-=-=-=-=-=
Oct 11 12:22:32 papadoc slapd[9016]: bdb(c=SE): DB_ENV->log_flush: LSN of 1/1689557 past current end-of-log of 1/18039
Oct 11 12:22:32 papadoc slapd[9016]: bdb(c=SE): Database environment corrupt; the wrong log files may have been removed or inco\mpatible database files imported from another environment
Oct 11 12:22:32 papadoc slapd[9016]: bdb(c=SE): id2entry.bdb: unable to flush page: 0
Oct 11 12:22:32 papadoc slapd[9016]: bdb(c=SE): txn_checkpoint: failed to flush the buffer cache Invalid argument
Oct 11 12:22:32 papadoc slapd[9016]: bdb(c=SE): DB_ENV->log_flush: LSN of 1/1689557 past current end-of-log of 1/18039
Oct 11 12:22:32 papadoc slapd[9016]: bdb(c=SE): Database environment corrupt; the wrong log files may have been removed or inco\mpatible database files imported from another environment
Oct 11 12:22:32 papadoc slapd[9016]: bdb(c=SE): id2entry.bdb: unable to flush page: 0
Oct 11 12:22:32 papadoc slapd[9016]: bdb(c=SE): txn_checkpoint: failed to flush the buffer cache Invalid argument
[...]
----- s n i p -----

This is extracted from the syslog...

To get slapd running again, I had to remove the log files
(log.* and __db.*) and then reindex (where the are recreated).
That might explain 'wrong log files ...', but why the 'past current end-of-log'?!