Skip to contentSkip to conversation

BUG grant_table.c line 939

DISCUSSION King, Steven R 2 participants 2 messages Jan 25, 2006 – Jan 26, 2006

lore
Share & tools
lore
#0 lore raw

Thanks Keir, that fixed it!!

So what was the problem? Was a callback waiting to destroy domA?

-----Original Message-----
From: Keir Fraser [mailto:[email protected]]
Sent: Wednesday, January 25, 2006 3:22 PM
To: King, Steven R
Cc: xen-devel
Subject: Re: [Xen-devel] BUG grant_table.c line 939

Quoted 4 lines · Steven R

So, why does Xen call domain_destroy() on domA? I but a BUG_ON(1) in domain_destroy(), and lo, the console produced the output below. My guess is that domA is destroyed via some callback waiting for its zombified mapping to be released.

Ah, I think I see the problem. Can you please try switching the order of the calls to domain_relinquish_resources() and gnttab_release_mappings() in common/domain.c:domain_kill()? i.e., the new order should be:

     gnttab_release_mappings(d);
     domain_relinquish_resources(d);

I think that should fix the crash.

-- Keir

#1 lore raw
Quoted 3 lines · Steven R

Thanks Keir, that fixed it!!

So what was the problem? Was a callback waiting to destroy domA?

Host mappings via grant tables are refcounted via the mapping PTEs, not directly via the maptrack table. So if we destroy pagetables first, we can drop all refcounts before we call the gnttab_release_mappings(), and the maptrack can have dangling domain id's at that point.

-- Keir