On Mon, Aug 31, 2009 at 06:46:37PM -0400, Joanmarie Diggs wrote:
> Hey Padraig.
> 
> With respect to the issue below, __main_application_quit ain't quitting;
> it's getting hung up on the sys.exit(0).
> 
> Looking at some DTrace output, I *think* that the failure of
> __main_application_quit to quit is allowing the transport engine to
> continue running -- and with my connection to the outside world severed
> (or the repo down as was the case this weekend), it just keeps
> trying....
> 
> This solves it for me:
> 
> ~~~~~~~~~~~~~~~~~
> diff -r d3b0ddf1d1c2 src/packagemanager.py
> --- a/src/packagemanager.py   Fri Aug 28 14:36:19 2009 -0700
> +++ b/src/packagemanager.py   Mon Aug 31 18:25:48 2009 -0400
> @@ -2676,7 +2676,7 @@
>                  while gtk.events_pending():
>                          gtk.main_iteration(False)
>                  gtk.main_quit()
> -                sys.exit(0)
> +                os._exit(0)
>                  return True

Using os._exit() isn't the way to solve this problem, though it
illuminates why we're running into the problem.  The transport isn't
multi-threaded, but calling sys.exit() forces Python to cleanup objects,
call destructors, and perform any routine that were registered through
the atexit handler.  My guess is that you're trying to destroy a
transport object from this thread that's in use by another thread.
That's a no-no.  If you're accessing these objects from multiple
contexts, you need a lock to serialize access.

-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to