psutil icon indicating copy to clipboard operation
psutil copied to clipboard

[Windows 11] python.exe crash when calling disk_partitions with Windows 11 Install USB key connected

Open charnet3d opened this issue 3 years ago • 2 comments

Summary

  • OS: Windows 11 Pro 21H2 Build 22000.282
  • Architecture: 64bit
  • Psutil version: 5.8.0
  • Python version: 3.10.0
  • Type: core

Description

The whole python.exe crashes when calling the function psutil.disk_partitions(all=True) with a Windows 11 Install USB key connected, this one was made using Rufus, with NTFS file system and GPT. It seems to have 2 partitions, one of which contains EFI info for boot:

image

When I remove the USB key the function works.

Originally this was happening in the context of SWAR Chia Plot Manager but I could reproduce the exact issue by running a python terminal then "import psutil" and calling the function in question.

charnet3d avatar Oct 24 '21 11:10 charnet3d

Probably a dupe of #1953.

giampaolo avatar Oct 24 '21 14:10 giampaolo

Its not duplicate of #1953 as opts is less than 20 chars only(checked with psutl-5.5.1) but the call crashes for 5.8.0. For me, it happened when a device(detected as mass storage) was connected to PC(Windows 10Pro) Below is the output for psutil-5.5.1. sdiskpart(device='E:\', mountpoint='E:\', fstype='FAT', opts='ro,removable') Its not specific to Win11(I observed it on Win10). It would be helpful if this can be taken on priority

megha-git-dev avatar Dec 10 '21 09:12 megha-git-dev