On Mon, Oct 22, 2012 at 02:55:18PM -0700, Brock Pytlik wrote:
> On 10/22/12 13:23, Edward Pilatowicz wrote:
> >hey all,
> >
> >while trying to debug a pkg update problem i hit:
> >
> > 7140470 __plan_common_exception() calls raise with no exception in scope
> >
> >could i get a review for the 1 line fix?
> >
> >---8<---
> > self._activity_lock.release()
> >- raise
> >+
> >+ # re-raise the original exception. (we have to explicitly
> >+ # restate the original exception since we may have cleared
> >the
> >+ # current exception scope above.)
> >+ raise exc_type, exc_value, exc_traceback
> >
> > def solaris_image(self):
> > """Returns True if the current image is a solaris image,
> > or an
> >---8<---
> >
> >a webrev is also available:
> > https://cr.opensolaris.org/action/browse/pkg/edp/pkg.api-plan-err/webrev
> >
> >thanks,
> >ed
> >_______________________________________________
> >pkg-discuss mailing list
> >[email protected]
> >http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
> lgtm. I wish we knew how the exception was getting wiped from the
> scope (I wonder if it's the try/except block), but there's no reason
> to hold up the fix to figure that out.
>
i spent a while trying to reliably reproduce the issue, but
unfortunately i was unable to pin it down before the problem stopped
reproducing all together for me.
i suspected the try/except block as well, but i don't think that's it.
i was able to trigger the except block by doing:
PKG_DUMP_STATS=a pkg ....
and in that case if we've already got an active exception in scope (like
say a plan exception), it will get overwritten via a ValueError
exception and then we'll report that, which is also arguably another bug
since we wanted to report the plan exception and ignore the ValueError
(and i verified that my fix does addresses this issue).
thanks for the review.
ed
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss