https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7587

--- Comment #3 from Nick Alcock <[email protected]> ---
Hm, some large-scale sa-learn runs show that it is leaking tied filehandless
like confetti too, because it ties to the storage whenever open_storages() is
called, but unties only if one of the code paths through
check_senders_reputation()->check_reputations()->check_reputation() happens to
be invoked.

It is possible that the right fix is to change

  if (defined $storage) {
    $self->{checker} = $self->{default_storage};
  }

in check_reputation to

  if (!defined $storage) {
    $self->{checker} = $self->{default_storage};
  }

since it appears that without that we are currently only untying if we are
using different storages per-user and per-system, but even this is error-prone
and will leak if we take the wrong path down through these functions. It's
easier just to cut the Gordian knot and untie from the storage whether or not
$self->{checker} is set.

However, even if you fix this, it still leaks tx-reputation fhs like confetti
and I have no idea why: ties and unties are precisely balanced, but the untie
is not closing the fh.

If anyone can see what's wrong, I'd be happy to know... but right now I'm
tempted to can this whole mess and go back to the AWL. At least the AWL works.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to