Bug 2196512 - RuntimeError: RLock objects should only be shared between processes through inheritance
Summary: RuntimeError: RLock objects should only be shared between processes through i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-PyGithub
Version: 38
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Carl George 🤠
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-09 11:15 UTC by Jiri Popelka
Modified: 2023-05-11 01:56 UTC (History)
17 users (show)

Fixed In Version: python-PyGithub-1.58.2-1.fc38
Clone Of:
Environment:
Last Closed: 2023-05-11 01:56:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jiri Popelka 2023-05-09 11:15:09 UTC
When I put 'authentication' into ~/.config/.packit.yaml and run 'packit status' I get a traceback.

Reproducible: Always

Steps to Reproduce:
$ podman run -ti --rm fedora:38 bash
[root@2a6f0c13fc8a /]# cd
[root@2a6f0c13fc8a ~]# dnf install packit
[root@2a6f0c13fc8a ~]# cat ~/.config/.packit.yaml 
authentication:
  github.com:
    token: ghp_foobarbaz
[root@2a6f0c13fc8a ~]# git clone https://github.com/packit/ogr; cd ogr
[root@2a6f0c13fc8a ogr]# packit -d status

Actual Results:  
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/packit/cli/utils.py", line 50, in covered_func
    func(config=config, *args, **kwargs)
  File "/usr/lib/python3.11/site-packages/packit/cli/utils.py", line 145, in covered_func
    decorated_func_kwargs["config"] = copy.deepcopy(
                                      ^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 271, in _reconstruct
    state = deepcopy(state, memo)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 146, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 231, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
                             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 265, in _reconstruct
    y = func(*args)
        ^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 264, in <genexpr>
    args = (deepcopy(arg, memo) for arg in args)
            ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 146, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 206, in _deepcopy_list
    append(deepcopy(a, memo))
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 271, in _reconstruct
    state = deepcopy(state, memo)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 146, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 231, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
                             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 271, in _reconstruct
    state = deepcopy(state, memo)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 146, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 231, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
                             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 271, in _reconstruct
    state = deepcopy(state, memo)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 146, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 231, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
                             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 271, in _reconstruct
    state = deepcopy(state, memo)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 146, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 231, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
                             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/copy.py", line 161, in deepcopy
    rv = reductor(4)
         ^^^^^^^^^^^
  File "/usr/lib64/python3.11/multiprocessing/synchronize.py", line 101, in __getstate__
    context.assert_spawning(self)
  File "/usr/lib64/python3.11/multiprocessing/context.py", line 373, in assert_spawning
    raise RuntimeError(
RuntimeError: RLock objects should only be shared between processes through inheritance

Expected Results:  
no traceback

Comment 1 Jiri Popelka 2023-05-09 15:31:33 UTC
The same (packit) code has worked OK in Fedora 37.

To Python maintainers: Do you have any idea what's changed in Fedora 38 to possibly cause this? The Python versions (in F37 and F38) look the same to me.

Comment 2 Nikola Forró 2023-05-09 15:57:20 UTC
This has nothing to do with Python, it's caused by RLock in PyGithub Requester, and it seems to be already fixed: https://github.com/PyGithub/PyGithub/pull/2446

Comment 3 Nikola Forró 2023-05-09 15:59:21 UTC
The fix is in 1.58.2, so it should be fixed by https://bodhi.fedoraproject.org/updates/FEDORA-2023-09bd2ec549

Comment 4 Fedora Update System 2023-05-10 08:01:27 UTC
FEDORA-2023-09bd2ec549 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-09bd2ec549

Comment 5 Fedora Update System 2023-05-11 01:56:52 UTC
FEDORA-2023-09bd2ec549 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.