Project

General

Profile

Actions

Bug #38407

closed

Funny issues with python sub-interpreters

Added by Sebastian Wagner about 5 years ago. Updated over 2 years ago.

Status:
Can't reproduce
Priority:
Normal
Assignee:
-
Category:
python interface
Target version:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Orchestrator is now running into funny issues with python sub-interpreters.

https://modwsgi.readthedocs.io/en/develop/user-guides/application-issues.html#multiple-python-sub-interpreters

Stuff like:

Error EINVAL: Traceback (most recent call last):
  File "/home/sebastian/Repos/ceph/src/pybind/mgr/mgr_module.py", line 862, in _handle_command
    return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
  File "/home/sebastian/Repos/ceph/src/pybind/mgr/mgr_module.py", line 337, in call
    return self.func(mgr, **kwargs)
  File "/home/sebastian/Repos/ceph/src/pybind/mgr/orchestrator_cli/module.py", line 23, in handle_exception
    return func(*args, **kwargs)
  File "/home/sebastian/Repos/ceph/src/pybind/mgr/orchestrator_cli/module.py", line 93, in _list_devices
    completion.raise_if_exception()
  File "/home/sebastian/Repos/ceph/src/pybind/mgr/orchestrator.py", line 99, in raise_if_exception
    dumped_exception = pickle.dumps(self.exception)
  File "/usr/lib/python2.7/pickle.py", line 1380, in dumps
    Pickler(file, protocol).dump(obj)
  File "/usr/lib/python2.7/pickle.py", line 224, in dump
    self.save(obj)
  File "/usr/lib/python2.7/pickle.py", line 331, in save
    self.save_reduce(obj=obj, *rv)
  File "/usr/lib/python2.7/pickle.py", line 400, in save_reduce
    save(func)
  File "/usr/lib/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.7/pickle.py", line 748, in save_global
    __import__(module)
RuntimeError: cannot unmarshal code objects in restricted execution mode

or broken ininstance() calls within the orchestrator.

This is not going to be sustainable in the long term.


Related issues 3 (2 open1 closed)

Related to mgr - Bug #37472: Cython 0.29 removed support for subinterpreters: raises "ImportError: Interpreter change detected ..."ResolvedRicardo Dias

Actions
Related to mgr - Bug #45574: subinterpreters: ceph/mgr/rook RuntimeError on import of RookOrchestrator - ceph cluster does not startNew

Actions
Blocked by mgr - Cleanup #63294: mgr: enable per-subinterpreter GIL (Python >= 3.12) New

Actions
Actions

Also available in: Atom PDF