-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RocksJava EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d) on Windows Server 2016 when reopening existing database with more than 2 keys #11096
Comments
Tested on Windows Server 2016 and Windows Server 2019:
Test java program attached (Crash always occurs when running the test program more than once). |
What version of the msvcpp runtime do you have installed on each system you tested with? |
I can't reproduce this. I've run the test program on Windows Server 2016 (Version 1607) and Windows Server 2019 (Version 1809) using rocksdbjni-7.8.3-win64.jar and an Azul Zulu jdk17.0.5+8-Zulu17.38.21-CA JVM. Works on both systems. |
@stefan-zobel did you run the test program at least twice? because the error occurs from the second run on. @adamretter msvcp versions on the Windows Server 2016 system (only x64 listed): |
I did run each test twice |
@Hutmar the version I have on my Windows Server 2012 system is:
How does that compare to yours? |
I am not sure, i guess 2015-2022 14.34.31931, i do not know how to find out which version is used by rocksdbjni. I also tested with Azul Zulu JDK on Windows Server 2016, vm also crashes, hs_err_pid attachted |
Your hs_err_pid log shows (line 487, 498/499) that msvcp and vcruntime DLLs are loaded from zulu17.40.19-ca-jdk17.0.6-win_x64\bin (which is what I would expect) |
I can reproduce this on a very old laptop that still has a Sandy Bridge CPU (like the OP's Windows 2016 machine seems to have). |
FWIW, at least in my test environment that bzhi instruction seems to come from snappy (snappy.cc, line 965): static inline uint32_t ExtractLowBytes(uint32_t v, int n) {
assert(n >= 0);
assert(n <= 4);
#if SNAPPY_HAVE_BMI2
return _bzhi_u32(v, 8 * n);
#else
// This needs to be wider than uint32_t otherwise `mask << 32` will be
// undefined.
uint64_t mask = 0xffffffff;
return v & ~(mask << (8 * n));
#endif
} The hypothesis would then be that |
A quick test did at least not contradict the hypothesis. I did a rebuild of snappy-1.1.9 with @Hutmar In case you want to try it out, I've attached a zipped jar (password is 123). |
Thank you very much, i can confirm it works on our Windows Server 2016 and Windows Server 2019 machines. I also did another test and changed compression type in the options to CompressionType.LZ4_COMPRESSION, which also works for unpatched rocksdbjni version 7.8.3. What changed in version 7.x? Because in rocksdbjni versions < 7 it also works without changing compression type? My last question is, will future versions of rocksdbjni work again on systems with Sandy Bridge CPUs or do we have to use versions < 7 / change compression type? |
@Hutmar I don't know the answers to your questions. I'm not associated with the RocksDB team, just a random RocksJava user. Let's see what @adamretter has to say. My personal take on pre-Haswell CPU support is quite radical: Just my 2c |
@Hutmar I am afraid that I agree with @stefan-zobel. As RocksDB explicitly strives for high performance I think it is unlikely that we would work backwards. I was happy to see that @stefan-zobel was able to suggest a workable solution for you. |
Expected behavior
When i reopen a database with an arbitrary number of key is expect to be able to call
Rocksdb::get
orRockIterator::seekToFirst
without crashing the vmActual behavior
Steps to reproduce the behavior
Interesting fact: opening the database from an windows 10 system, it works. Does not work on Windows Server 2016 or 2019
Version: 7.8.3
hs_err_pid9732.log
The text was updated successfully, but these errors were encountered: