JuliaPy / JuliaPy/PythonCall.jl

juliacall segfaults when loading a package that uses PythonCall

未关闭
#211 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Julia
星标
1.1k
派生
86
平均合并
1 天 22 小时
30 天内合并 PR
3

描述

juliacall always segfaults on me when I try to load a package that uses PythonCall.

This should reproduce the error:

```python
import juliapkg

juliapkg.add("BATPythonCall", "dc6699a0-bee0-4ed4-84d6-ad34e0e2513f", rev = "loaddebug", url = "https://github.com/bat/BATPythonCall.jl.git")

juliapkg.resolve()
juliapkg.status()

from juliacall import Main as jl

jl.seval("using BATPythonCall")
```

results in

```
free(): invalid pointer

signal (6): Aborted
in expression starting at none:1
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
```

BATPythonCall.jl (on branch "loaddebug") is basically an empty package that only does `using PythonCall`. Removing `using PythonCall` makes the segfault disappear.

CC @philippeller

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start by running the Python reproduction with juliacall, juliapkg, and BATPythonCall on its loaddebug branch, then compare it with the case where using PythonCall is removed. Trace the package-loading entry point involved in `jl.seval("using BATPythonCall")`; done means the package loads without the invalid-pointer abort.

由索引模型根据 Issue 内容生成。

评估

技术栈
julia, python
领域
backend
Issue 类型
缺陷
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。