Bug 1732 - sa-learn is not releasing bayes.lock
Summary: sa-learn is not releasing bayes.lock
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Learner (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other other
: P3 major
Target Milestone: 2.60
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-02 13:00 UTC by Graham Murray
Modified: 2003-04-05 02:57 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
Output showing bug text/plain None Graham Murray [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Murray 2003-04-02 13:00:06 UTC
running 'sa-learn --ham' or 'sa-learn --spam' does not delete the bayes.lock
file when it terminates.
Comment 1 Theo Van Dinter 2003-04-02 14:26:30 UTC
what version are you seeing this with?  there was a bug in 2.51 which had this
problem, but it was fixed in 2.52 per bug 1672.
Comment 2 Graham Murray 2003-04-02 21:45:25 UTC
I am running the CVS HEAD which was current at the time I raised the bug. I am
using Perl 5.8.0.
Comment 3 Graham Murray 2003-04-03 21:53:50 UTC
Created attachment 859 [details]
Output showing bug
Comment 4 Graham Murray 2003-04-03 21:54:44 UTC
The problem only seems to happen when '-no-rebuild' is specified
Comment 5 Theo Van Dinter 2003-04-05 11:57:01 UTC
ok, so digging into this a little bit:

if we do a rebuild, sync_journal() is called, and it always calls untie_db(),
even if caller_will_untie is set (which it is).

if we don't do a rebuild, we end up calling finish_learner, which calls finish,
which checks caller_will_untie, and doesn't actually untie.


so I removed the check from finish() since it is the sub we call when we want to
finish with the learner and do an untie.  I added the check to sync_journal and
expire_old_tokens since they shouldn't untie if caller_will_untie is set.


it fixed the problem for me, so closing the ticket. :)