I want to avoid DB failure after a crash: it looks like something
deterministic.
One of the replica servers uses OpenLDAP 2.0.27 with an earlier version of
BDB, and it has never had this kind of problem in the past.

I'm wondering if there is a configuration issue to take into account in
the BDB 4.1.25 in order to prevent such situation.

Walter,

IIRC, OpenLDAP 2.0 series would run a db_recover inside of slapd on
startup, thus masking most issues caused by crashes. There were some
problems with this method (like if you run multiple slapd's at the same
time), so that was removed from 2.1 and later. There has been some
discussion on how to best have slapd recover from a crash, but it can be
hard to determine that a crash has occurred. One thing that you could
possible do, is have "db_recover" called from your startup init script. If
you do that, however, you probably want to make sure that that script is
only executed at startup time.