Bug 3101 - tdb changes lost after reboot
tdb changes lost after reboot
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: winbind
3.0.14a
x86 Linux
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
: 2667 2797 3176 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-15 00:08 UTC by Volker Lendecke
Modified: 2009-07-15 08:57 UTC (History)
3 users (show)

See Also:


Attachments
msync before munmap (2.25 KB, patch)
2005-09-15 00:11 UTC, Volker Lendecke
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Lendecke 2005-09-15 00:08:43 UTC
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
Comment 1 Volker Lendecke 2005-09-15 00:11:42 UTC
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
Comment 2 Gerald (Jerry) Carter 2005-09-27 12:10:29 UTC
*** Bug 2667 has been marked as a duplicate of this bug. ***
Comment 3 Gerald (Jerry) Carter 2005-09-29 07:58:32 UTC
*** Bug 2797 has been marked as a duplicate of this bug. ***
Comment 4 Gerald (Jerry) Carter 2005-10-17 08:08:32 UTC
*** Bug 3176 has been marked as a duplicate of this bug. ***
Comment 5 Volker Lendecke 2009-07-15 08:57:56 UTC
Closing this bug as fixed. All relevant persistent tdbs use transactions these days.

Volker