[Yum-devel] [PATCH] Avoid dangling iterators if auto_close is used
seth vidal
skvidal at fedoraproject.org
Fri Feb 11 14:25:19 UTC 2011
On Fri, 2011-02-11 at 14:20 +0200, Panu Matilainen wrote:
> Closing the rpmdb which has active iterators turns the iterators
> into zombies that whose locks can only be freed when the process
> terminates. Rpm is being a reckless mom...
> ---
> yum/rpmsack.py | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/yum/rpmsack.py b/yum/rpmsack.py
> index 0982a7c..24bb9ce 100644
> --- a/yum/rpmsack.py
> +++ b/yum/rpmsack.py
> @@ -658,6 +658,7 @@ class RPMDBPackageSack(PackageSackBase):
> po._has_hdr = False
> del po.hdr
> self._cached_conflicts_data = result.values()
> + del mi
>
> if self.auto_close:
> self.ts.close()
> @@ -1276,6 +1277,7 @@ class RPMDBPackageSack(PackageSackBase):
> break
> else:
> ret.append(po)
> + del mi
>
> if self.auto_close:
> self.ts.close()
why do you have to specifically delete the match iterators?
-sv
More information about the Yum-devel
mailing list