Bug #81197 | crash with STATUS_ILLEGAL_INSTRUCTION if CPU/OS cant do AVX instructions | ||
---|---|---|---|
Submitted: | 26 Apr 2016 2:18 | Modified: | 16 Feb 2017 17:41 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S1 (Critical) |
Version: | 5.7.12 | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[26 Apr 2016 2:18]
Shane Bester
[26 Apr 2016 2:21]
MySQL Verification Team
affected system in this case was: Windows 7 Ultimate 64 CPU:Intel(R) Xeon(R) CPU E5-1620 v3 3.50GHz
[26 Apr 2016 3:28]
MySQL Verification Team
Some references. https://bugzilla.mozilla.org/show_bug.cgi?id=1160148 https://software.intel.com/en-us/blogs/2011/04/14/is-avx-enabled/ Looks like Win7 service pack 1 may be required: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions if cpu supports AVX instructions, you can run: bcdedit /set xsavedisable 0 and reboot.
[26 Apr 2016 14:07]
MySQL Verification Team
Windows 7 Service Pack 1 solved the problem. I think this needs to be mentioned on the "supported platforms" page.
[27 Apr 2016 7:11]
MySQL Verification Team
Microsoft Windows 2008 Server R2 also requires SP1 to use AVX instructions.
[27 Apr 2016 7:12]
MySQL Verification Team
so this is a request to add the SP1 requirements to: https://www.mysql.com/support/supportedplatforms/database.html
[23 Jun 2016 7:20]
MySQL Verification Team
Bug #81799 marked as duplicate of this
[11 Nov 2016 20:39]
James Day
If your operating system is Windows 2008 R2 or Windows 7 and you do not have SP1 installed MySQL 5.7 will regularly restart and in the MySQL server error log file you will see this: mysqld got exception 0xc000001d This error message is because you are also using a CPU that does not support the VPSRLQ instruction and indicates that the CPU instruction that was attempted is not supported. You can confirm this diagnosis by using the client program mysql and running this statement: SELECT log10(100); If your system is affected your MySQL server will immediately restart. To fix this error, you MUST install SP1. This adds the required operating system support for the CPU capability detection and disables that support when the CPU does not have the required instructions. Alternatively you can install an older version of MySQL, like 5.6. Windows Server 2008 R2 end of support from Microsoft was 22 February 2013, two years after SP1 was released for it, as described in the Microsoft product lifecycle description at https://support.microsoft.com/en-us/lifecycle/search?alpha=Windows%202008%20R2 . Windows 7 status is similar, also out of Microsoft support well before MySQL 5.7 was released, details at https://support.microsoft.com/en-us/lifecycle/search?alpha=Windows%207 . Earlier versions of Windows will also be affected. Because the operating system including the service pack was out of Microsoft support before MySQL version 5.7 was released we will not be changing the 5.7 server itself to detect this issue, instead you should install the Windows service pack or use an earlier version of MySQL. James Day, MySQL Senior Principal Support Engineer, Oracle
[11 Nov 2016 21:19]
James Day
Both Windows 7 and Windows Server 2008 R2 are affected because the server one is the server version of Windows 7. The CPU instruction involved is VPSRLQ and this is part of the foundation part of the AVX-512 feature set, to be implemented in all CPUs that support AVX-512. Without checking in great depth it appears that the instruction is first supported in Xeon's Skylake EX/EP "Purley" generation with release expected in 2017 and in the 2016 Phi x200 Knights Landing processor that was announced in 2013 and first released in June 2016, as well as the related co-processor. The Cannonlake feature set is also expected to include the AVX-512 features. At the time of writing it appears unclear when non-Xeon desktop CPUs will have support for AVX-512. Just because a family of CPUs supports a feature does not mean that all CPUs in that family support it. CPUs are typically released in many sub-versions, so if you want this feature, ensure that the specific CPU model number you are buying has it. Just having a CPU with the feature is not enough because the operating system also has to preserve the register used by the feature and that support needs the service pack in Windows Server 2008 R2 and 7. CPUs which do have the feature should optimize queries a bit faster than ones without it. That's why MySQL included support for the feature that was expected to become available early in 5.7's lifecycle.
[11 Nov 2016 21:28]
James Day
It is not certain that SELECT log10(100); will always confirm diagnosis, it's just one way that can help to increase confidence in the diagnosis. Since the service pack is mandatory for MySQL 5.7 you must install it anyway.
[27 Jan 2017 12:38]
MySQL Verification Team
see https://bugs.mysql.com/bug.php?id=84690 (MySQL crashes on startup with existing ssl-certificates on Nano Server)
[29 Jan 2017 17:05]
Sebastian Tkaczuk
Try this WORKAROUND using Hyper-V 2012 R2: For virtual machine activate processor compatibility-mode for porting to another machine.
[16 Feb 2017 17:41]
Paul DuBois
Posted by developer: Updated https://dev.mysql.com/doc/refman/5.7/en/windows-installation.html with the SP1 requirement.