[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-05-22 Thread miss-islington
miss-islington added the comment: New changeset 0cc7becde0bfe896fd23b5cb14fedfb8f2066fca by Miss Islington (bot) in branch '3.8': bpo-40214: Fix ctypes WinDLL test with insecure flags (GH-19652) https://github.com/python/cpython/commit/0cc7becde0bfe896fd23b5cb14fedfb8f2066fca --

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +18982 pull_request: https://github.com/python/cpython/pull/19656 ___ Python tracker ___

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-22 Thread Steve Dower
Steve Dower added the comment: Looks like that fix has done it. Thanks, Eryk! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-22 Thread Steve Dower
Steve Dower added the comment: New changeset 9b498939009f49b8c772c89e8fc80efbfd8afcb5 by Steve Dower in branch 'master': bpo-40214: Fix ctypes WinDLL test with insecure flags (GH-19652) https://github.com/python/cpython/commit/9b498939009f49b8c772c89e8fc80efbfd8afcb5 --

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-22 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +18978 pull_request: https://github.com/python/cpython/pull/19652 ___ Python tracker ___

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-13 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-13 Thread Eryk Sun
Eryk Sun added the comment: > You mean the CI agent is doing it? Because there's nowhere in > Python that should be doing it. The ProcessParameters->DllPath value is inherited until a process in the tree reverts to the original search path via SetDllDirectoryW(NULL), so it can be any

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-13 Thread Steve Dower
Steve Dower added the comment: You mean the CI agent is doing it? Because there's nowhere in Python that should be doing it. I'd rather not blanket change this option in the test suite (except to turn it on :) ), so that code snippet probably needs to shrink down into a one-liner that can

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-13 Thread Eryk Sun
Eryk Sun added the comment: > it seems the search order we're getting for _sqlite3.dll (.pyd) is: > > * app directory > * SQL server install directory (?) > * Windows/System32 > * Windows > * %PATH% (which is truncated at 2190 chars) Thank you. It finally makes sense. The parent process is

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-13 Thread Steve Dower
Steve Dower added the comment: Okay, I've wasted enough time on this. Let's just disable the test permanently and say that the winmode=0 behaviour is system-specific and is not tested. -- ___ Python tracker

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-13 Thread Steve Dower
Steve Dower added the comment: So I collected more info, and it seems the search order we're getting for _sqlite3.dll (.pyd) is: * app directory * SQL server install directory (?) * Windows/System32 * Windows * %PATH% (which is truncated at 2190 chars) And then we never look in CWD. I

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-13 Thread Steve Dower
Steve Dower added the comment: > I don't understand what's going on here if %PATH% is interfering. Yeah, as shown by the fact my fix didn't fix it :) I'm going to try adding some more diagnostics around this to find out exactly where it's failing. I suspect it's a dependency, rather than

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-13 Thread Eryk Sun
Eryk Sun added the comment: > But I'm not sure why that is getting loaded earlier than the > current directory. Is that the behaviour we went for here? I don't understand what's going on here if %PATH% is interfering. The current directory (%__CD__%) should be checked before %PATH% with the

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-13 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +18851 pull_request: https://github.com/python/cpython/pull/19500 ___ Python tracker ___

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-09 Thread miss-islington
miss-islington added the comment: New changeset c83f003ee5398e9c27a0c634329420003d607d46 by Miss Islington (bot) in branch '3.8': bpo-40214: Temporarily disable a ctypes test (GH-19404) https://github.com/python/cpython/commit/c83f003ee5398e9c27a0c634329420003d607d46 --

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-09 Thread STINNER Victor
STINNER Victor added the comment: Python 3.8 is also affected. Example: https://github.com/python/cpython/pull/19444#issuecomment-611499825 I backported the change to skip the test until it's fixed: PR 19449. -- nosy: +vstinner versions: +Python 3.8

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-09 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +18804 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19449 ___ Python tracker

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-08 Thread Kyle Stanley
Kyle Stanley added the comment: Steve Dower wrote: > It's one sample point, but compare > https://buildbot.python.org/all/#/builders/129/builds/708 to > https://github.com/python/cpython/runs/571497886 FWIW, I'd be +1 in favor for using the debug build then. A few additional minutes would

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-08 Thread Steve Dower
Steve Dower added the comment: > Do you have a general estimate or rough idea as to how much slower it would > be in comparison? It's one sample point, but compare https://buildbot.python.org/all/#/builders/129/builds/708 to https://github.com/python/cpython/runs/571497886 Compile time:

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-08 Thread Zachary Ware
Zachary Ware added the comment: Feel free to backport PR19404 as needed, but mark versions here appropriately to make sure the *real* fix makes it where it needs to go. -- ___ Python tracker

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Is this going to be backported? It seems backports also use the same build and have this error. Sample 3.8 backport build that seems to be related to this issue :

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Kyle Stanley
Kyle Stanley added the comment: Steve Dower wrote: > (FWIW, we build and test a release build, not a debug build, which is why > we're not looking for sqlite3_d.dll... but perhaps we should be using a debug > build? That might be slower, but the extra validation is probably > worthwhile...)

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Steve Dower
Steve Dower added the comment: Found it (and it's kind-of us): Checking C:\Program Files\Amazon\AWSCLIV2\ *** Found at C:\Program Files\Amazon\AWSCLIV2\sqlite3.dll *** Found at C:\Program Files\Amazon\AWSCLIV2\_sqlite3.pyd But I'm not sure why that is getting loaded earlier than the current

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Steve Dower
Steve Dower added the comment: It might also be a "sqlite3_d.dll". Updated build is https://dev.azure.com/Python/cpython/_build/results?buildId=60787=results -- ___ Python tracker

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Steve Dower
Steve Dower added the comment: It's probably the sqlite3.dll dependency that's failing, not the _sqlite3.dll (originally _sqlite3.pyd) one. The test is verifying that dependent DLLs are loaded correctly. So I assume in this case the _sqlite3.dll is being loaded, but it's finding the wrong

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Zachary Ware
Zachary Ware added the comment: Assuming I implemented my checks correctly (see PR19413), I think I've just debunked both of our leading theories. Results here:

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Zachary Ware
Change by Zachary Ware : -- pull_requests: +18773 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19413 ___ Python tracker ___

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Eryk Sun
Eryk Sun added the comment: > Maybe something else was installed that put an incompatible > _sqlite3.dll on PATH? Thereby proving the inherent risk of > using unsafe DLL load settings should_pass() sets the working directory of the test process to the `tmp` directory. The loader normally

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Steve Dower
Steve Dower added the comment: Maybe something else was installed that put an incompatible _sqlite3.dll on PATH? Thereby proving the inherent risk of using unsafe DLL load settings :) If we're not already overriding PATH for the subprocess in this test (should only need

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Kyle Stanley
Kyle Stanley added the comment: Zachary Ware wrote: > My best guess at the moment is that something changed in the underlying > Windows image, particularly given the comment above the failing line that > "insecure load flags should succeed" (though that could easily be a red > herring).

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Zachary Ware
Change by Zachary Ware : -- stage: patch review -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Zachary Ware
Zachary Ware added the comment: New changeset f407e209c1e35b64835f73e7e7ca23e33817e9fe by Zachary Ware in branch 'master': bpo-40214: Temporarily disable a ctypes test (GH-19404) https://github.com/python/cpython/commit/f407e209c1e35b64835f73e7e7ca23e33817e9fe --

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Zachary Ware
Change by Zachary Ware : -- stage: -> patch review type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Zachary Ware
Zachary Ware added the comment: My best guess at the moment is that something changed in the underlying Windows image, particularly given the comment above the failing line that "insecure load flags should succeed" (though that could easily be a red herring). Until someone who actually

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-07 Thread Zachary Ware
Change by Zachary Ware : -- keywords: +patch nosy: +zach.ware nosy_count: 1.0 -> 2.0 pull_requests: +18768 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19404 ___ Python tracker

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-06 Thread Kyle Stanley
New submission from Kyle Stanley : In several recent PRs, test_ctypes.test_load_dll_with_flags is failing for the Azure Pipelines "Windows PR tests win32" and "Windows PR tests win64" with the following error message: ``` ==