Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Panic on dom0 shutdown



On Jan 9, 2013, at 12:36 , Manuel Bouyer wrote:

> On Wed, Jan 09, 2013 at 09:56:30AM +0100, Johan Ihrén wrote:
>> Hi,
>> 
>>> OK, so can you try the attached patch (in addition to building with
>>> -fno-optimize-sibling-calls) ?
>> 
>> Smallest patch I ever saw, but I understand what you're trying to achieve 
>> (forcing pirq_interrupt to not have a tail-call to whatever it is calling). 
>> However, again, there is no change to the resulting trace at the point of 
>> the panic:
>> 
>>> Stopped in pid 745.1 (halt) at netbsd:bus_space_read_4*0x8:
>>> bus_space_read_4()
>>> pirq_interrupt()
>>> Xresume_xenev6() at netbsd:Xresume_xenev6+0x47
>> 
>> I don't know anything about how the trace function is implemented, but 
>> obviously adding a dummy statement to the tail end of pirq_interrupt didn't 
>> help us. So I added a dummy function between pirq_interrupt and the call to 
>> the function pointer to see where the trace starts to present the correct 
>> call chain.
>> 
>> This changed the trace to: 
>> 
>>> Stopped in pid ...
>>> bus_space_read_4()
>>> johani_dummy()
>>> pirq_interrupt()
>>> Xresume_xenev6() at netbsd:Xresume_xenev6+0x47
>> 
>> which tells me that from the POV of getting a correct trace our problem is 
>> not with getting rid of a tail-call from pirq_interrupt, but rather getting 
>> rid of a tail-call from the function that the function pointer refers to.
> 
> What does johani_dummy() do ? If it's just an empty function, I don't
> understand how we can have such a call trace.

It isn't empty, I just added the dummy to the call path to see where things get 
printed by the trace function in ddb:

int
johani_dummy(void *arg)
{
        struct pintrhand *ih = arg;
        int ret;

        ret = ih->func(ih->arg);
#ifdef IRQ_DEBUG
        if (ih->evtch == IRQ_DEBUG)
            printf("pirq_interrupt irq %d ret %d\n", ih->pirq, ret);
#endif
        __asm volatile("nop");
        return ret;
}

int
pirq_interrupt(void *arg)
{
        struct pintrhand *ih = arg;
        int ret;

        ret = johani_dummy(ih)
        return ret;
}

Regards,

Johan



Home | Main Index | Thread Index | Old Index