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

Re: Crash when using cpupools


  • To: Juergen Gross <jgross@xxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 6 Sep 2021 09:46:13 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YJpL75vOv1uu/c6yyOoRd6o8Efhvw6/U6AAGNgCeSJ0=; b=D4M6qXOaR05hOFyZ5mjVUD2Gbqj/SqgLd3O2MQ9C2uhSjzki0U4sKrgakyTovAav9liZxUa1c8nAg6micPXQPPSTUxaqE+i3GTl7JvJDJlT5YlxaG5hrOF5YpRPM7VE5Iy2PcdFMuaKSUBF9eU8A/KORWE6jBgp10mgNuYT/lPGlvcaw7U1aWXNruSA+D0D/7E5KGpwjJssOAKAEK2RkdIkeL7zfgoR2opMkeGdHWZy0b0RUtstToMKX+6UPcNbPfrURSKiWvjpYAjOlywxumeNC14hEu6znZ8MNIa6g8M9vbBR57OtP9kYwZx2Ugi2ztCAVeH+7N6DswuedMeg9Bg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Al5qySRNiilD8T4leYlpt+sy8m8JPRx5uwqCjR2AJ57DH206eyitVZ/yiGF3L1woOVwJMZ9s3GGOsFucXzKWdaU6qIO0jU7vrbvlgpgOndDZvDAVXbpuc09JKLdeOF/UE1XrXQIselVanaUp9lDw50tk5bVt8jR03DTza3tuLTOj1iLB7b5YRiTCocKm18blCQjpoCXewVUdrRU64ZIBnG0nQFeMdDQLahqP9JnFS+xOQEaNKcm/aKypTJ5771s7NZDvGgkwIhPbq6/V8+unoj82iJVbTdfSnAbpkXzxwJjsauDndECmqjdLkRa0zQQO1/Cslfzlm+Sg2Fk+gcrDmg==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>
  • Delivery-date: Mon, 06 Sep 2021 08:46:34 +0000
  • Ironport-hdrordr: A9a23:ByibLqjJ+5mQBR2jh3RrPltxQXBQX0h13DAbv31ZSRFFG/FwyP rBoB1L73DJYWgqNE3I+erhBEGBKUmskaKdkrNhQ4tKOzOWx1dATbsSkbcKpgeAJ8SQzJ8n6U 4NSdkZNDS0NykGsS+Y2njKLz9D+qj+zEnAv463pB0BPGIaCdAT0+46MHf9LqQffng3OXNTLu vk2iMonUvERZ1aVLXAOpFTNNKz1uEj2aiWLSIuNloC0k2jnDmo4Ln1H1yx2QofaSpGxfMH/X LemwL0y62/u7XjoyWsmVP73tBzop/M29FDDMuDhow8LSjtsB+hYMBEV6eZtD44jemz4BIBkc XKoT0nI8NvgkmhMV2dkF/I4U3NwTwu43jtxRuxhmbim9XwQHYAB89IletiA1DkwntlmOs5/L NA3mqfuZYSJwjHhj7B69/BUAwvvlaooFI5+NRjzEB3YM87Uvt8vIYf9ERaHNMrByTh8r0qF+ FoEYX1+OtWS1WHdHrU11MfgOBEZk5DWytuf3Jy/vB8i1Nt7TdEJgojtY0id047hdAAo8Iu3Z WDDkxq/Is+BvP+I5gNXdvpevHHflAldyi8eV56EW6XYZ3vBEi93KIfwI9Frt1CK6Z4gafbpv z6ISVlXCgJChrTNfE=
  • Ironport-sdr: 0z+8TH3Pv/VgxCy7RjjW41oHdfRa/etgPAXFg1ex0PctC0AC6QIvnDhavS2YfEVAxw0HUrC2w7 3P6VQDowWhJJMAzL6di+qjBS4vjhFAtkZeysFbAuM0ma50jDOhQfqkCqESqxNkjOEYxKygP1hK 1WLR3IrOiH2bw6GosjdmnSXpoz+/Vn2Tg6vEueVPdmBDHdOMVNdHKpUh+XkijYELUhwPKAxPKl 5aQFVv4fCIO5nc7+67s1rMEUBctBkfFEl9SOsn2Hcuz/qwgPwj6GXlI9kTvg7OkkvhCsfx7yGi B1NLcweEKgHK1UtSxrx17igz
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 06/09/2021 09:23, Juergen Gross wrote:
> On 03.09.21 17:41, Bertrand Marquis wrote:
>> Hi,
>>
>> While doing some investigation with cpupools I encountered a crash
>> when trying to isolate a guest to its own physical cpu.
>>
>> I am using current staging status.
>>
>> I did the following (on FVP with 8 cores):
>> - start dom0 with dom0_max_vcpus=1
>> - remove core 1 from dom0 cpupool: xl cpupool-cpu-remove Pool-0 1
>> - create a new pool: xl cpupool-create name=\"NetPool\”
>> - add core 1 to the pool: xl cpupool-cpu-add NetPool 1
>> - create a guest in NetPool using the following in the guest config:
>> pool=“NetPool"
>>
>> I end with a crash with the following call trace during guest creation:
>> (XEN) Xen call trace:
>> (XEN)    [<0000000000234cb0>] credit2.c#csched2_alloc_udata+0x58/0xfc
>> (PC)
>> (XEN)    [<0000000000234c80>] credit2.c#csched2_alloc_udata+0x28/0xfc
>> (LR)
>> (XEN)    [<0000000000242d38>] sched_move_domain+0x144/0x6c0
>> (XEN)    [<000000000022dd18>]
>> cpupool.c#cpupool_move_domain_locked+0x38/0x70
>> (XEN)    [<000000000022fadc>] cpupool_do_sysctl+0x73c/0x780
>> (XEN)    [<000000000022d8e0>] do_sysctl+0x788/0xa58
>> (XEN)    [<0000000000273b68>] traps.c#do_trap_hypercall+0x78/0x170
>> (XEN)    [<0000000000274f70>] do_trap_guest_sync+0x138/0x618
>> (XEN)    [<0000000000260458>] entry.o#guest_sync_slowpath+0xa4/0xd4
>>
>> After some debugging I found out that unit->vcpu_list is NULL after
>> unit->vcpu_list = d->vcpu[unit->unit_id]; with unit_id 0 in
>> common/sched/core.c:688
>> This makes the call to is_idle_unit(unit) in csched2_alloc_udata
>> trigger the crash.
>
> So there is no vcpu 0 in that domain? How is this possible?

Easy, depending on the order of hypercalls issued by the toolstack.

Between DOMCTL_createdomain and DOMCTL_max_vcpus, the domain exists but
the vcpus haven't been allocated.

~Andrew




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.