This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fatal error in launcher: Job information querying failed
Type: Stage: resolved
Components: Windows Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: dbjorge, dstufft, eryksun, gavstar, hheimbuerger, jaraco, paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware
Priority: normal Keywords:

Created on 2015-05-05 11:57 by gavstar, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (18)
msg242598 - (view) Author: (gavstar) Date: 2015-05-05 11:57
Hi All;
After a fresh install of Python 2.7 I receive the following error:

Fatal error in launcher: Job information querying failed

when I type "pip" into the command line.

a google search finds this error in relation to wine but I'm not using wine.
As this error is not listed as a current issue I suspect the error is due to the install being on windows 10 Tech Preview.
Does anyone know how to fix this error? 
Thanks
G.
msg242600 - (view) Author: Tim Golden (tim.golden) * (Python committer) Date: 2015-05-05 12:39
To eliminate pip from the equation, can you just try running: "py" on its own command line?

Also: what platform are you on? Win7? Win8.1? 32-bit or 64-bit? Are you running in an unusually restrictive user environment?
msg242601 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2015-05-05 12:44
Install is noted as being on Windows 10 tech preview. I don't have a Windows 10 installation present, but the similar issues reported in Wine seem to be related to limited support in Wine for Windows job objects. Have there been any changes to Job object support in Windows 10? I couldn't find anything specific from a web search.
msg242634 - (view) Author: (gavstar) Date: 2015-05-06 00:48
Hi Tim.golden;
py in its own command line gives..

"
Microsoft Windows [Version 10.0.10074]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\Gav>py
Job information querying failed

C:\Users\Gav>
"
on platform windows 10 tech preview 64bit.
as administrator.
msg242670 - (view) Author: Henrik Heimbuerger (hheimbuerger) * Date: 2015-05-06 13:21
I can confirm this issue for pip 6.1.1 on Windows 10.0.10074 for both Python 2.7.9 as well as 3.4.3.

As a workaround, using "python -m pip" works fine (as suggested on http://stackoverflow.com/a/26428562/6278 for a different issue).
msg242672 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2015-05-06 13:50
It looks like something in the QueryInformationJobObject API has changed with Windows 10. The code says:

    ok = QueryInformationJobObject(job, JobObjectExtendedLimitInformation,
                                  &info, sizeof(info), &rc);
    if (!ok || (rc != sizeof(info)) || !job)
        error(RC_CREATE_PROCESS, L"Job information querying failed");


This call looks right to me based on the MSDN documentation.

Two possibilities I can think of:
1. Bug in Windows 10, which should be reported to Microsoft.
2. the size of the JOBOBJECT_EXTENDED_LIMIT_INFORMATION structure has changed in Windows 10, and the SDK used to build Python 2.7 doesn't have the new definition.

Do you get the same problem with Python 3.4? If so, that might indicate a VS2008 issue. (I don't think this is likely as I checked sizeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION) in VS 2008 and VS 2010 and both said 144...)
msg242676 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-05-06 14:42
Null is a valid value for job here (indicates the current process's job), so that's probably the check that's failing. When I can sit down with a VM and a debugger I'll check, but that won't be until next week.
msg242677 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2015-05-06 14:49
Cheers. I missed a bit of code, job comes from "job = CreateJobObject(NULL, NULL)" so it shouldn't be NULL unless that call failed.

Rather than speculate though, I'll leave it with you. Shout if I can help.
msg242682 - (view) Author: Henrik Heimbuerger (hheimbuerger) * Date: 2015-05-06 15:46
To your earlier question: yes, I can reproduce this with Python 3.4.3.

This is all on Windows 10.0.10074, 64-bit. I don't have a 32-bit system to test. UAC configuration is unmodified and on the default setting (third of the four steps on the slider).

Python has been installed using the MSI installer without administrative rights. On Python 2, pip has been installed using the official 6.1.1 get-pip.py. For Python 3, it has been tested both with the preinstalled pip (I believe that was 6.0.8) as well as after upgrading it from PyPI (using the "python -m pip" workaround).
msg242697 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2015-05-06 18:26
Adding Jason Coombs and Vinay Sajip, as if this needs a fix to the launcher code, then the launchers used by distlib and setuptools (for exe wrappers of console entry points) will need to be changed as well.

It would be really useful if all 3 projects used a single codebase - having to duplicate fixes like this is annoying.
msg242808 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2015-05-09 12:19
> 1. Bug in Windows 10, which should be reported to Microsoft.

It appears to be a bug in the kernel. It's isn't updating the value of of the output parameter *lpReturnLength.

    C:\>ver

    Microsoft Windows [Version 10.0.10074]

    C:\>cdb -xi ld py

    Microsoft (R) Windows Debugger Version 10.0.10075.9 X86
    Copyright (c) Microsoft Corporation. All rights reserved.

    CommandLine: py

    ************* Symbol Path validation summary **************
    Response                         Time (ms)     Location
    Deferred
        symsrv*symsrv.dll*C:\Symbols*
        http://msdl.microsoft.com/download/symbols
    Symbol search path is:
        symsrv*symsrv.dll*
        C:\Symbols*http://msdl.microsoft.com/download/symbols
    Executable search path is:
    (b5c.9cc): Break instruction exception - code 80000003 (first chance)
    eax=00000000 ebx=00000000 ecx=8ce20000 edx=00000000 esi=00d600e8 edi=7f9ea000
    eip=776dfb65 esp=0056f980 ebp=0056f9ac iopl=0         nv up ei pl zr na pe nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
    ntdll!LdrpDoDebuggerBreak+0x2b:
    776dfb65 cc              int     3

    0:000> bp kernel32!QueryInformationJobObject
    0:000> g

    Breakpoint 0 hit
    eax=0056f36c ebx=00d70c90 ecx=0056f370 edx=00000000 esi=00000184 edi=00db50cc
    eip=7759c4c0 esp=0056f2e8 ebp=0056f3e8 iopl=0         nv up ei pl zr na pe nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
    KERNEL32!QueryInformationJobObject:
    7759c4c0 8bff            mov     edi,edi

    0:000> dd esp l6
    0056f2e8  00d619e5 00000184 00000009 0056f370
    0056f2f8  00000070 0056f36c

hJob == 0x184
JobObjectInfoClass == JobObjectExtendedLimitInformation
cbJobObjectInfoLength == 0x70 (32-bit)
*lpReturnLength (rc in run_child) is uninitialized:

    0:000> dd 56f36c l1
    0056f36c  77748600

Step to the system call, NtQueryInformationJobObject:

    0:000> pc
    eax=0056f370 ebx=00000001 ecx=00000184 edx=0056f36c esi=0056f268 edi=00db50cc
    eip=7759c523 esp=0056f244 ebp=0056f2e4 iopl=0         nv up ei pl nz na po nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000202
    KERNEL32!QueryInformationJobObject+0x63:
    7759c523 ff158c0e5d77    call
        dword ptr [KERNEL32!_imp__NtQueryInformationJobObject (775d0e8c)]
        ds:002b:775d0e8c={ntdll!NtQueryInformationJobObject (776a6c60)}

    0:000> dd esp l5
    0056f244  00000184 00000009 0056f268 00000070
    0056f254  0056f36c

    0:000> p
    eax=00000000 ebx=00000001 ecx=8ce20000 edx=0046e3e0 esi=0056f268 edi=00db50cc
    eip=7759c529 esp=0056f258 ebp=0056f2e4 iopl=0         nv up ei pl nz na po nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000202
    KERNEL32!QueryInformationJobObject+0x69:
    7759c529 85c0            test    eax,eax

It returns STATUS_SUCCESS (register eax), but *lpReturnLength hasn't been updated:

    0:000> dd 56f36c l1
    0056f36c  77748600

Likewise the Win32 call is successful.

    0:000> pt
    eax=00000001 ebx=00d70c90 ecx=541ed0d4 edx=00000000 esi=00000184 edi=00db50cc
    eip=7759c5c4 esp=0056f2e8 ebp=0056f3e8 iopl=0         nv up ei pl zr na pe nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
    KERNEL32!QueryInformationJobObject+0x104:
    7759c5c4 c21400          ret     14h

    0:000> dd 56f36c l1
    0056f36c  77748600
msg243610 - (view) Author: Dan Bjorge (dbjorge) Date: 2015-05-19 17:14
Confirmed, this is a known Windows 10 tech preview bug - it is specific to using 32bit Python on 64bit Windows. It's already been fixed internally, and we expect the fix to make it out to one of the next couple of public tech preview builds.

Thanks!
-Dan Bjorge (MSFT)
msg243616 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2015-05-19 18:11
Fantastic news, thanks for the feedback.

Closing this as a third party issue.
msg243621 - (view) Author: Henrik Heimbuerger (hheimbuerger) * Date: 2015-05-19 19:51
Dan, thanks so much for taking the time to post back here, and for the good news!
msg245320 - (view) Author: Henrik Heimbuerger (hheimbuerger) * Date: 2015-06-13 16:43
I can still reproduce this on the just released Windows 10 build 10130, after "python -m pip uninstall pip" and then "python get-pip.py" (which recreated the pip.exe binary for pip 7.0.3).

Is there anything else I need to do to make this work now?
msg245410 - (view) Author: Dan Bjorge (dbjorge) Date: 2015-06-15 21:33
No, it just takes a long time between us making a fix in early internal builds and the fix propagating to public builds. I think 10135 is the first build number expected to have the fix.
msg245417 - (view) Author: Henrik Heimbuerger (hheimbuerger) * Date: 2015-06-16 07:22
Great, thanks for letting us know, Dan!
msg246032 - (view) Author: Henrik Heimbuerger (hheimbuerger) * Date: 2015-07-01 10:28
Happy to report that in build 10159 of Windows 10 64-bit, this just started to work again. No reinstallation of pip needed!
History
Date User Action Args
2022-04-11 14:58:16adminsetgithub: 68315
2015-07-01 13:03:03zach.waresetstage: resolved
2015-07-01 10:28:42hheimbuergersetmessages: + msg246032
2015-06-16 07:22:51hheimbuergersetmessages: + msg245417
2015-06-15 21:33:43dbjorgesetmessages: + msg245410
2015-06-13 16:43:24hheimbuergersetmessages: + msg245320
2015-05-19 19:51:33hheimbuergersetmessages: + msg243621
2015-05-19 18:11:56paul.mooresetstatus: open -> closed
resolution: third party
messages: + msg243616
2015-05-19 17:14:57dbjorgesetnosy: + dbjorge
messages: + msg243610
2015-05-09 12:19:10eryksunsetnosy: + eryksun

messages: + msg242808
versions: + Python 3.4, Python 3.5
2015-05-06 18:26:47paul.mooresetnosy: + jaraco
messages: + msg242697
2015-05-06 15:46:47hheimbuergersetmessages: + msg242682
2015-05-06 14:49:34paul.mooresetmessages: + msg242677
2015-05-06 14:42:37steve.dowersetmessages: + msg242676
2015-05-06 13:50:47paul.mooresetmessages: + msg242672
2015-05-06 13:21:19hheimbuergersetnosy: + hheimbuerger
messages: + msg242670
2015-05-06 00:48:39gavstarsetmessages: + msg242634
2015-05-05 12:44:22paul.mooresetmessages: + msg242601
2015-05-05 12:39:44paul.mooresetnosy: + paul.moore
2015-05-05 12:39:04tim.goldensetmessages: + msg242600
2015-05-05 12:34:47r.david.murraysetnosy: + dstufft, vinay.sajip, tim.golden, zach.ware, steve.dower
components: + Windows
2015-05-05 11:57:06gavstarcreate