Prox-Ez icon indicating copy to clipboard operation
Prox-Ez copied to clipboard

Pickle error when multithreading

Open sorcer0r opened this issue 1 year ago • 0 comments

When following the instructions (running in a venv, tried Python3.10 and Python3.11) Prox-Ez crashes as soon as the first client connects with the following error:

INFO:Proxy:Proxy socket bound, listening on 127.0.0.1:3128.
INFO:Proxy:Got connection from 127.0.0.1:55948.
INFO:Proxy:Exiting...
Traceback (most recent call last):
  File "/Users/user/Prox-Ez/proxy.py", line 1339, in <module>
    main()
  File "/Users/user/Prox-Ez/proxy.py", line 1335, in main
    proxy.run()
  File "/Users/user/Prox-Ez/proxy.py", line 992, in run
    p.start()
  File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/context.py", line 288, in _Popen
    return Popen(process_obj)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle '_cffi_backend.__CDataGCP' object

Using the -sp switch makes this error go away, and Prox-Ez functions, however the performance impact is significant.

sorcer0r avatar May 31 '23 09:05 sorcer0r