Repository navigation
Compact dict bug on Windows (Visual Studio): if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2) #72248
Description
Activity
VS breaks at line Objects/dictobject.c:2339 - ' if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2)'
I don't have any more useful information; I'm running Windows 7.
- addedtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dumpinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
on Sep 10, 2016 Which hg (or git) revision do you use?
Latest, i.e. https://hg.python.org/cpython/rev/a477ef882a16
According to IRC log, the issue happens on Windows.
And hg revision is a477ef882a16.I'll try building Python on Windows 10 amd64 in this weekend.
VS breaks at line Objects/dictobject.c:2339 - ' if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2)'
Can you elaborate? Does the compilation fail? Did you get a crash? What was you doing while getting this error/message?
... Can you please give clues how to reproduce the issue?
I compiled, I got a "Python stopped working" during compiling (but it went on anyway), and then launched it from VS in Debugging mode. I did 'from test import support' and then it crashed. VS said this line was the faulty one, and didn't give me anything else useful (no call stack, no access to locals, etc.). I'm sadly not home until Monday, so I can't further investigate this.
- changed the title
[-]Python crashes on 'from test import support'[/-][+]Compact dict bug on Windows (Visual Studio): if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2)[/+]on Sep 11, 2016 I built acfe53a (git hash). Then:
c:\Users\inada-n\work\cpython>PCbuild\win32\python_d.exe -m test.test_dict
..............................................................................
----------------------------------------------------------------------
Ran 78 tests in 1.262sOK
Emanuel Barry: What is your Visual Studio (exact) version? I know that there are service packs for VS. What is your Windows version?
Emanuel Barry: What is your Visual Studio (exact) version? I know that there are service packs for VS. What is your Windows version?
Oh, same questions for you Naoki in fact :-) It may help to check if
it's related to VS, Windows or if it's something else.I noticed I tested win32 mode. I'll rebuild on amd64 mode.
Oh, same questions for you Naoki in fact :-)
I don't know about how to describe exist version of my Windows environment. Is these enough?
Windows 10 Home (with Anniversary Update)
10.0.14393 build 14393Microsoft Visual Studio Community 2015
Version 14.0.25425.01 Update 3
Microsoft .NET Framework
Version 4.6.01586
Installed Version: Community
Microsoft Visual C++ 2015cl /?
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24213.1 for x86C:\Users\inada-n\work\cpython>PCbuild\win32\python_d.exe
Python 3.6.0a4+ (default, Sep 11 2016, 18:22:14) [MSC v.1900 32 bit (Intel)] on win32amd64 result
c:\Users\inada-n\work\cpython>PCbuild\amd64\python_d.exe -m test.test_dict
..............................................................................
----------------------------------------------------------------------
Ran 78 tests in 1.498sOK
c:\Users\inada-n\work\cpython>PCbuild\amd64\python_d.exe
Python 3.6.0a4+ (default, Sep 11 2016, 19:10:48) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.Huh, weird. I'm running a win32 build on a 64 bits machine, with VS2015. I didn't have time to test on a clean checkout, I will do that first thing when I'm back home tonight. I hope I did something wrong and there really isn't any issue :)
It's unlikely, but we also print out the UCRT version at the end of the build process (with a warning if you need to update the WinSDK).
I built and tested a number of times with this change though. If suggest hg purge and rebuild to make sure everything is clean.
I just rebuilt the default Python branch (rev c8851a0ce7ca) on Windows in debug mode and 32-bit: the compilation succeeded and test_dict pass.
- Windows 8.1 (Version 6.3, Build 9600)
- Visual Studio 2015 : version 14.0.23107.0 D14EL
It's unlikely, but we also print out the UCRT version at the end of the build process (with a warning if you need to update the WinSDK).
Ah, UCRT seems outdated on my PC:
29>------ Rebuild All started: Project: _testbuffer, Configuration: Debug Win32 ------
27> Generating Code...
26> C:\Windows\SYSTEM32\ucrtbased.dll is version 10.0.10150.0
26> WARN: ucrtbased contains known issues. Please update the Windows 10 SDK.
26> See:
26> http://bugs.python.org/issue27705
26> https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdkI compiled Python in 4 modes:
- debug/32 bits
- debug/64 bits
- release/32 bits
- release/64 bits
Compilation never fails and test_dict always pass.
I'm unable to reproduce the issue, so I removed the "release blocker" flag to not stress our release manager :-)
I actually did a clean rebuild and could not reproduce, so I'm guessing something did go wrong on my side.
- added and removedtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
on Sep 12, 2016 I actually did a clean rebuild and could not reproduce, so I'm guessing something did go wrong on my side.
Don't worry. It shouldn't hurt to double or tiple check. I'm not fully confident of this critical change (compact dict). It's good to get any kind of feedback ;-)
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: