Project

General

Profile

Bug #11332

Regression: 11184 causes kernel hang during boot on CPUs without ARAT

Added by Spencer Berger 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

I have an old box running openindiana hipster. Recently after a pkg update, the machine hung at boot. Disabling ACPI in the bootloader works around the issue. Looking between the illumos-gate commit hashes, "11184 Want CPU Temperature Sensors" stood out. Compiling a non-incremental build of this commit and the previous commit confirmed that this was where the regression was introduced. The issue occurs whether or not pkg:/driver/cpu/sensor is installed, so I was able to isolate the issue fairly quickly. An explanation is below and a patch is attached.

cpuid_pass2 clobbers the cached cpuid result cp->cp_eax with the leaf number when it skips leaves 6 and 7. The result of this is that the cached eax for leaf 6 becomes 6 == CPUID_INTC_EAX_ARAT | CPUID_INTC_EAX_TURBO. So cpuid_arat_supported always returns true on intel processors (at least if it's called after cpuid_pass2). This appears to cause the boot hang I experienced on Intel processors without ARAT support unless ACPI is disabled.

None of the other callers of cpuid_insn appear to use the eax register for leaves 6 or 7, so I don't think any processors other than Intel processors without ARAT support are affected by this bug or patch, except users of the cpuid driver.


Files


Related issues

Related to illumos gate - Feature #11184: Want CPU Temperature SensorsClosed

Actions

History

#1

Updated by Spencer Berger 3 months ago

#2

Updated by Robert Mustacchi 3 months ago

Hi Spencer, thanks for the detailed report and apologies for the breakage here. This looks good. I'll do a quick test of this and work to get this integrated on your behalf (unless you want to do so directly). Do you mind if I edit the synopsis slightly? Thank you for taking the time to report this.

#3

Updated by Spencer Berger 3 months ago

Robert Mustacchi wrote:

Hi Spencer, thanks for the detailed report and apologies for the breakage here. This looks good. I'll do a quick test of this and work to get this integrated on your behalf (unless you want to do so directly). Do you mind if I edit the synopsis slightly? Thank you for taking the time to report this.

Sure, go ahead and edit it to whatever makes sense.

#4

Updated by Robert Mustacchi 3 months ago

  • Subject changed from Regression: Kernel hang during boot on older Intel processors (that don't support ARAT) unless acpi is disabled (patch attached) to Regression: 11184 causes kernel hang during boot on CPU without ARAT
#5

Updated by Robert Mustacchi 3 months ago

  • Subject changed from Regression: 11184 causes kernel hang during boot on CPU without ARAT to Regression: 11184 causes kernel hang during boot on CPUs without ARAT
#6

Updated by Electric Monk 3 months ago

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

git commit 1fbb7a7c3b62c369349ec1774806ed321e4f6119

commit  1fbb7a7c3b62c369349ec1774806ed321e4f6119
Author: Spencer Berger <bergerspencer@gmail.com>
Date:   2019-07-09T00:06:11.000Z

    11332 Regression: 11184 causes kernel hang during boot on CPUs without ARAT
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Joshua M. Clulow <josh@sysmgr.org>

Also available in: Atom PDF