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

Crashes ipykernel #508

Open
arslnb opened this issue Sep 19, 2024 · 3 comments
Open

Crashes ipykernel #508

arslnb opened this issue Sep 19, 2024 · 3 comments

Comments

@arslnb
Copy link

arslnb commented Sep 19, 2024

I'm trying to use vegafusion in a Rust project. I'm using tokio to spawn a ipykernel (basically just using python -m ipykernel_launcher with the right flags), from within a virtualenv.

Now in that ipykernel, I have installed altair using vegafusion as a data-transformer. It all works well, except when it comes to a particular dataset. Vegafusion simply crashes when trying to do one of: chart.to_json(format="vega") or vf.save_vega(chart, file="spec.json") with this dataset.

  1. It works with vegafusion with the exact same code when not using ipykernel
  2. It works without vegafusion using ipykernel

fwiw, since #506 logs internal rust logs in my setup, I can see that the last thing it logs is:

[2024-09-19T18:39:46Z DEBUG deno_runtime::worker] received module evaluate Ok(
        (),
    )
[2024-09-19T18:39:46Z DEBUG datafusion_functions_array] Overwrite existing UDF: array_to_string

Normally it goes on to show logs from the sql_optimizer, etc

You can check out the dataset here: trimmed-dataset.csv

@jonmmease
Copy link
Collaborator

Hi @arslnb, I don't fully follow your setup. Are you able to reproduce the crash using an ipython session from the command line, without launching from tokio? Do you see a stack trace or panic message anywhere?

@arslnb
Copy link
Author

arslnb commented Sep 26, 2024

Seems like launching the ipykernel_launcher session with elevated permissions seems to work. It does not panic, just is non-responsive. It seems to work perfectly without vegafusion with the same setup.

@arslnb
Copy link
Author

arslnb commented Sep 30, 2024

The only time you can see this state is when you launch an ipython session using Command and spawning a child process. There are many unknowns, like why this dataset, etc. Even with RUST_LOGS set to debug, there is no real error message, panic, etc to take a deeper look..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants