Bug 3402 - crashes are leaving lock files laying around
Summary: crashes are leaving lock files laying around
Status: RESOLVED INVALID
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamc/spamd (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Macintosh Mac OS X
: P1 normal
Target Milestone: 3.1.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-16 16:04 UTC by jon stevens
Modified: 2004-06-01 16:03 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description jon stevens 2004-05-16 16:04:53 UTC
[27][ ~jon/.spamassassin ]# dir
total 274892
     0 drwx------   8 jon  staff        272 May 16 16:02 ./
     0 drwxr-xr-x  66 jon  staff       2244 May 16 16:02 ../
269316 -rw-------   1 jon  staff  275779584 May 16 15:26 auto-whitelist
     4 -rw-------   1 jon  staff         27 May 16 15:58 auto-whitelist.lock
    84 -rw-------   1 jon  staff      82248 May 16 16:01 bayes_journal
   648 -rw-------   1 jon  staff     663552 May 16 16:02 bayes_seen
  4836 -rw-------   1 jon  staff    4952064 May 16 16:02 bayes_toks
     4 -rw-------   1 jon  staff       2080 Apr 27 11:06 user_prefs
[28][ ~jon/.spamassassin ]# more auto-whitelist.lock 
takahe.whichever.com.13005
[29][ ~jon/.spamassassin ]# ps uax | grep 13005
root    13081   0.0  0.0     1116    212 std  R+    4:03PM   0:00.00 grep 13005
[30][ ~jon/.spamassassin ]# 

oh shit, i just noticed my auto-whitelist is also 275megs! how did that happen?

i'm going to remove it and start over with a fresh one. let me know if there are
any tests you want me to perform on the file.
Comment 1 Theo Van Dinter 2004-05-16 16:29:41 UTC
Subject: Re:  New: crashes are leaving lock files laying around

On Sun, May 16, 2004 at 04:04:54PM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
>            Summary: crashes are leaving lock files laying around

I don't think there's much we can do about this.  When software
crashes/gets a fatal error, and it had something locked, the lock can't
get cleaned up as the process died.

Comment 2 jon stevens 2004-05-16 17:53:31 UTC
why was my file 275 megs then?

maybe some more size checks are needed?

even a warning during execution would be helpful...

warning: ~jon/auto-whitelist is an absurd size (275megs!). maybe it is corrupt?

jon
Comment 3 Daniel Quinlan 2004-05-16 17:59:49 UTC
Subject: Re:  crashes are leaving lock files laying around

> why was my file 275 megs then?

See bug 3082: auto-whitelist database needs expiry.

Comment 4 Theo Van Dinter 2004-05-16 18:12:29 UTC
Subject: Re:  crashes are leaving lock files laying around

On Sun, May 16, 2004 at 05:53:32PM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> why was my file 275 megs then?

Because it was that size?  The size has nothing to do with the lock file.
See ticket 3082.

Comment 5 jon stevens 2004-05-16 18:37:01 UTC
I noticed that SA will clear the lock after a certain amount of time. Is that
configurable given that my SA is regularily crashing and causing the AWL to
leave the lock file around?

Maye this should also point to something debugging wise that says that the crash
must be in some code somewhere between AWL open and AWL close.

=)

jon
Comment 6 Justin Mason 2004-05-17 09:25:56 UTC
Subject: Re:  crashes are leaving lock files laying around 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> I don't think there's much we can do about this.  When software
> crashes/gets a fatal error, and it had something locked, the lock can't
> get cleaned up as the process died.

...also, the lock code will detect "dead" locks and ignore them
(eventually).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Exmh CVS

iD8DBQFAqEAPQTcbUG5Y7woRAmiAAJ9LphgyLqFgfi+vs/s/2M3gUAxnsgCgmReN
cWH50nfhyhGuyAwt1CIrl0k=
=gd9Y
-----END PGP SIGNATURE-----

Comment 7 Justin Mason 2004-06-02 00:03:25 UTC
marking INVALID -- old .locks are cleaned up anyway (after an initial 30 seconds
of waiting, IIRC).