You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Daniel Quinlan <qu...@pathname.com> on 2005/04/27 03:22:13 UTC
DNS ID initialization
bugzilla-daemon@bugzilla.spamassassin.org writes:
> Theo and I speculate that the problem is the 16 bit ID wrapping. I
> think that closing and reopening the socket to get a new port with
> each message will fix the problem.
16 bits is a lot of packets. I don't see how on earth we could be
wrapping around. Collisions, now, that I can believe.
I checked and it seems like the initialization function is very poor for
usage in mass-check (and also spamd when spamd first starts) since it
clusters the IDs together for pids that are close in number.
pid DNS id
10 640
11 704
100 6400
101 6464
1000 64000
1002 64128
10000 50185
10010 50825
I doubt this was the intention of it, but just in case that some
behavior difference (in this respect) between 'my' and 'our' was
expected... the 'our' variable isn't shared between child and parent as
far as I can tell:
perl -e 'our $foo = 1; if (!fork()) { $foo++; print "child $foo\n"; \
exit; } print "parent $foo\n";'
--
Daniel Quinlan
http://www.pathname.com/~quinlan/