Skip to content
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

ImportError: DLL load failed while importing #90434

Closed
89z mannequin opened this issue Jan 6, 2022 · 6 comments
Closed

ImportError: DLL load failed while importing #90434

89z mannequin opened this issue Jan 6, 2022 · 6 comments
Labels
3.10 only security fixes type-bug An unexpected behavior, bug, or error

Comments

@89z
Copy link
Mannequin

89z mannequin commented Jan 6, 2022

BPO 46276
Nosy @ericvsmith, @eryksun, @89z

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:

assignee = None
closed_at = None
created_at = <Date 2022-01-06.04:21:31.541>
labels = ['type-bug', '3.10']
title = 'ImportError: DLL load failed while importing'
updated_at = <Date 2022-01-07.07:46:17.513>
user = 'https://github.com/89z'

bugs.python.org fields:

activity = <Date 2022-01-07.07:46:17.513>
actor = 'eryksun'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2022-01-06.04:21:31.541>
creator = '89z'
dependencies = []
files = []
hgrepos = []
issue_num = 46276
keywords = []
message_count = 5.0
messages = ['409815', '409825', '409835', '409945', '409952']
nosy_count = 3.0
nosy_names = ['eric.smith', 'eryksun', '89z']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue46276'
versions = ['Python 3.10']

@89z
Copy link
Mannequin Author

89z mannequin commented Jan 6, 2022

This code fails:

>>> import _frida
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing _frida: The specified module could not be found.

works as expected with Python 3.9

https://github.com/frida/frida-python/blob/main/frida/__init__.py

@89z 89z mannequin added type-crash A hard crash of the interpreter, possibly with a core dump 3.10 only security fixes labels Jan 6, 2022
@ericvsmith
Copy link
Member

I see this has been reported in frida's tracker. It looks like a problem with that package.

@ericvsmith ericvsmith added type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Jan 6, 2022
@eryksun
Copy link
Contributor

eryksun commented Jan 6, 2022

"_frida.cp310-win_amd64.pyd" is a bad build or corrupted file. It imports a procedure with no name from a DLL with no name, which causes the loader to search for a file named ".DLL". Even if that were found, it imports another procedure with no name or correct ordinal from "IPHLPAPI.DLL". There are probably more problems with this DLL.

@89z
Copy link
Mannequin Author

89z mannequin commented Jan 7, 2022

Looks like the issue is not specific to that one package:

Traceback (most recent call last):
File "Lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py", line 17, in
File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
File "multiprocessing_init_.py", line 16, in
File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
File "multiprocessing\context.py", line 6, in
File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
File "multiprocessing\reduction.py", line 16, in
File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
File "socket.py", line 49, in
ImportError: DLL load failed while importing _socket: El parámetro no es correcto.
[8464] Failed to execute script 'pyi_rth_multiprocessing' due to unhandled exception!

@eryksun
Copy link
Contributor

eryksun commented Jan 7, 2022

ImportError: DLL load failed while importing _socket: El parámetro no es correcto.

I'm not familiar with the implementation of PyInstaller, which is a third-party tool. The above invalid-parameter error may be indirectly related to the problem with frida, or it may be a separate issue.

The problem with frida is simply that "_frida.cp310-win_amd64.pyd" is an invalid or corrupted DLL that the system can't load. I don't know what went wrong with their build and distribution process that caused the problem. It's something to resolve on the frida issue tracker.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@iritkatriel
Copy link
Member

Closing as a third party issue.

@iritkatriel iritkatriel closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 only security fixes type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants