Customers of mine have reported several times that after rebooting the system changes in tdb files were not saved. I've seen it myself at least once, a workstation password after a domain join has not been saved in the secrets.tdb, before reboot is has been there. Pierre Filippone suggested that for him putting an msync() right before munmap fixes the problem. I don't fully believe that because when a system is rebooted munmap is not necessarily called explicitly, it is the direct close that from my point of view might leave dirty mmap'ed pages not flushed to disk. So we might need an msync() right after the fcntl unlock of a hash chain. Volker
Created attachment 1445 [details] msync before munmap This adds an msync call as suggested before the munmap call for every persistent tdb (no CLEAR_IF_FIRST set). These are not really under heavy write load, so the cost should be not too high. We might also put this at the end of all high-level change operations such as tdb_store and tdb_delete. Volker
*** Bug 2667 has been marked as a duplicate of this bug. ***
*** Bug 2797 has been marked as a duplicate of this bug. ***
*** Bug 3176 has been marked as a duplicate of this bug. ***
Closing this bug as fixed. All relevant persistent tdbs use transactions these days. Volker