Skip to content

python-tornado-streaming and rust GIL #2945

@davidebenato

Description

@davidebenato

Bug Report

While launching the python-tornado-streaming example I get:

Cannot clone pointer into Python heap without the GIL being held.

Steps to Reproduce:

clone the repo:

In python-tornado-streaming, edit index.hml to point to the CDN versions of the js:

    <script type="module"
        src="https://cdn.jsdelivr.net/npm/@finos/perspective-viewer-datagrid/dist/cdn/perspective-viewer-datagrid.js"></script>
    <script type="module"
        src="https://cdn.jsdelivr.net/npm/@finos/perspective-viewer-d3fc/dist/cdn/perspective-viewer-d3fc.js"></script>

    <link rel="stylesheet" crossorigin="anonymous"
        href="https://cdn.jsdelivr.net/npm/@finos/perspective-viewer/dist/css/themes.css" />

and 
    <script type="module">
        import "https://cdn.jsdelivr.net/npm/@finos/perspective-viewer/dist/cdn/perspective-viewer.js";
        import perspective from "https://cdn.jsdelivr.net/npm/@finos/perspective/dist/cdn/perspective.js";
cd perspective/examples/python-tornado-streaming
python3 server.py

Now open localhost:8080

davide@LAPTOP-VJ1ERR85:~/perspective/examples/python-tornado-streaming$ python3 server.py
CRITICAL:root:Listening on http://localhost:8080

thread '<unnamed>' panicked at rust/perspective-python/src/server/server_sync.rs:37:10:
Cannot clone pointer into Python heap without the GIL being held.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)

Environment:

For JavaScript (browser):

  • @finos/perspective version
  • Browser and version
  • OS
  • (if websocket) Language/version/OS of perspective server

For Node.js:

  • node version
  • OS

For Python

davide@LAPTOP-VJ1ERR85:~/perspective/examples/python-tornado-streaming$ python3 --version
Python 3.10.12
davide@LAPTOP-VJ1ERR85:~/perspective/examples/python-tornado-streaming$ pip3 --version
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)
  • OS: WSL Ubuntu

Perspective version: 3.4.0

davide@LAPTOP-VJ1ERR85:~/perspective/examples/python-tornado-streaming$ pip install --upgrade perspective-python
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: perspective-python in /home/davide/.local/lib/python3.10/site-packages (3.4.0)

Additional Context:

I might be doing something wrong, please let me know

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConcrete, reproducible bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions