Project

General

Profile

Bug #10326

SPARC boot fails with vmem_xalloc(): size overflow

Added by Peter Tribble 11 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2019-01-30
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Booting a SPARC ISO with current bits panics (fairly late) with.

vmem_xalloc(): size overflow

The stack trace is basically:

vmem_xalloc
vmem_alloc
kmem_alloc
kmem_zalloc
zfs:aggsum_init
zfs:arc_state_init
zfs:arc_init
zfs:dmu_init
...

The problem here is that boot_ncpus is set to -1 so aggsum_init sends a negative size in its allocation request.

Verified by dropping into kmdb and boot_ncpus is 0xffffffff

This is specific to sun4u - other platforms (x86, sun4v) set boot_ncpus. And every other consumer other than aggsum_init either checks the value, or takes the maximum of it and ncpus, thereby escaping the trap.

History

#1

Updated by Electric Monk 10 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 4fe8b4169f2d86d1a437c24b01105d63d7c7bb37

commit  4fe8b4169f2d86d1a437c24b01105d63d7c7bb37
Author: Peter Tribble <peter.tribble@gmail.com>
Date:   2019-02-06T00:50:51.000Z

    10326 SPARC boot fails with vmem_xalloc(): size overflow
    Contributed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Andy Fiddaman <af@citrus-it.net>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF