Bug 15750 - Scavenger timer not fully reset when Durable Handle is reconnected
Summary: Scavenger timer not fully reset when Durable Handle is reconnected
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-08 07:33 UTC by Ralph Böhme
Modified: 2024-11-08 07:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2024-11-08 07:33:55 UTC
When a Durable Handle is reconnected and subsequently disconnected a second time, we update disconnect_time in the smbXsrv_open_global.tdb record which ensures the timer fired by the first disconnect event doesn't purge the open record by virtue of the logic in smbXsrv_open_cleanup_fn():

  nttime_to_timeval(&disconnect_time, global->disconnect_time);                                                                               
  tdiff = usec_time_diff(&now, &disconnect_time);                                                                                             
  delete_open = (tdiff >= 1000*global->durable_timeout_msec);

Unfortunately we don't implement this required logic for locking.tdb and since smbXsrv_open_cleanup_fn() in the scavenger calls into the cleanup code for locking.tdb first and the result of smbXsrv_open_cleanup_fn() (deletes vs not deleted) is not used to guide the whole logic.

Have WIP patch, need bug number.