it looks like you get the second trap while you are still in your notify handler, since i think this test (up->notified || up->notify==0) is for a proc in a notify handler getting a system trap (or a proc with no notify handler).
it would be very interesting to know what the system trap is. it would also be interesting to know if you are seeing this randomly or if you can reliable reproduce this condition. - erik