Bug #11332
closedRegression: 11184 causes kernel hang during boot on CPUs without ARAT
100%
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
Updated by Spencer Berger over 3 years ago
- Related to Feature #11184: Want CPU Temperature Sensors added
Updated by Robert Mustacchi over 3 years 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.
Updated by Spencer Berger over 3 years 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.
Updated by Robert Mustacchi over 3 years 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
Updated by Robert Mustacchi over 3 years 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
Updated by Electric Monk over 3 years 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>