-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Windows] Crash while enumerating opened files #1763
Comments
For some reason, the bug was not triggered on our CI (GitHub VM). The bug was reported upstream (giampaolo/psutil#1763).
Sadly, our CI (GitHub Actions) did not catch it and I think yours has the same issue too :/ |
For some reason, the bug was not triggered on our CI (GitHub VM). The bug was reported upstream (giampaolo/psutil#1763).
For some reason, the bug was not triggered on our CI (GitHub VM). The bug was reported upstream (giampaolo/psutil#1763).
@BoboTiG But this is 32 or 64 bits python? Because I meet unexpected quit for 32 bits python on 64 bits Windows. |
Python 32-bit. |
So thanks for information. I have no idea why test on github actions fail in my PR when 64 bits test pass. I think that Your CI does not catch this because it works on 64 bits python. |
Arf, you are right :) |
FTR I updated the workflow to use Python 32-bits and tests are green 🤔 (cf https://github.com/nuxeo/nuxeo-drive/pull/1677/checks?check_run_id=690301455, and it shouldn't ^^) |
GH is running Windows Server 2019, that could explan why. |
But in my PR there is fail for 32 bits on GH actions. |
Could you test your application on python 64 bits on physical machine? |
It crashes too. |
Argh... |
If it can help, here is the Windows error report: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2020-05-20T09:39:46.428630900Z" />
<EventRecordID>2410</EventRecordID>
<Channel>Application</Channel>
<Computer>WM-10-Drive-Mika</Computer>
<Security />
</System>
<EventData>
<Data>python.EXE</Data>
<Data>3.7.7150.1013</Data>
<Data>5e676f16</Data>
<Data>_psutil_windows.cp37-win_amd64.pyd</Data>
<Data>0.0.0.0</Data>
<Data>5e4c25a3</Data>
<Data>c0000005</Data>
<Data>00000000000073fd</Data>
<Data>2730</Data>
<Data>01d62e8a95f90bc0</Data>
<Data>C:\Users\Windows10\Desktop\nuxeo-drive\.tox\unit\Scripts\python.EXE</Data>
<Data>C:\Users\Windows10\Desktop\nuxeo-drive\.tox\unit\lib\site-packages\psutil\_psutil_windows.cp37-win_amd64.pyd</Data>
<Data>d9d7b8dc-2bf0-473c-96aa-a00cc8faf209</Data>
<Data />
<Data />
</EventData>
</Event> And with Python 32-bit, it is Both are printing the "Windows fatal exception: access violation" sentence before crashing. |
Maybe you know some windows debugger witch can be run in batch mode? Something like |
@Czaki I am between a laptop upgrade / drama (new hardware, reinstall of Ubuntu, nvidia drivers not working, a lot of cursing in Italian etc. =)) so I don't have a Windows box to test on right now, but if you want to try fixing this "blindly" you may try getting rid of this part (the one which spawns a thread): psutil/psutil/arch/windows/process_handles.c Line 151 in 33fea55
...and instead call this function directly (just change the function signature and pass it a file HANDLE):
Maybe you're lucky, who knows.
Note: I refactored / rewritten |
I should have fixed this. Please reopen if I didn't. |
Platform
Bug description
That simple code is making Python to crash:
It will enumerate several proc and files but then it will simply crash. I know for sure that it did not happen on earlier versions of psutil.
Test results
I managed to run
pytest
into the tests folder and this is the output:Do you need more details? Let me know what I can do if so :)
The text was updated successfully, but these errors were encountered: