JuliaPy / JuliaPy/PythonCall.jl

Bug with `cugraph` and `MAT.jl`

Đang mở
#335 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Julia
Star
1.1k
Fork
86
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
3

Mô tả

**Affects:** PythonCall

**Describe the bug**
I tried to do

```julia
using MAT, PythonCall
py_cugraph = pyimport("cugraph");
```

and it errored (see the end of the bug report for the first few lines of the error).

If, instead I try

```julia
using PythonCall
py_cugraph = pyimport("cugraph");
using MAT
```

it works fine (no errors), and I can run commands from `cugraph`. But this cannot work when preparing a package because all `using` commands supersede the `pyimport` commands defined in the `__init()__` routine. g

I am copying below the state of the `Project.toml` and `CondaPkg.toml` that reproduces this error on `Linux`.

**System**
Information about the system:
- The operating system: `Linux linux53 5.15.0-75-generic #82-Ubuntu SMP Tue Jun 6 23:10:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux`
- `Julia v1.9.0`
- `PythonCall v0.9.13`
- `MAT v0.10.5`
- `Pkg.status()`
```
Status `/tmp/problem/Project.toml`
[992eb4ea] CondaPkg v0.2.18
[23992714] MAT v0.10.5
[6099a3de] PythonCall v0.9.13
```
- `CondaPkg.status()`
```
CondaPkg Status /tmp/problem/CondaPkg.toml
Environment
/tmp/problem/.CondaPkg/env
Packages
cudf v23.06.01 (23.06.1)
cugraph v23.06.02 (23.06.2)
scipy v1.11.1 (1.11.1)
Channels
conda-forge
nvidia
rapidsai
```

**Additional context**
I am sharing here the first few lines of the error:

```
s2n_init() failed: 402653193 (NULL pointer encountered)
Fatal error condition occurred in /home/conda/feedstock_root/build_artifacts/aws-c-io_1686376437702/work/source/s2n/s2n_tls_channel_handler.c:203: 0 && "s2n_init() failed"
Exiting Application
################################################################################
Stack trace:
################################################################################
/tmp/problem/.CondaPkg/env/lib/python3.10/site-packages/pyarrow/../../../././libaws-c-common.so.1(aws_backtrace_print+0x59) [0x7f03a8af0839]
/tmp/problem/.CondaPkg/env/lib/python3.10/site-packages/pyarrow/../../../././libaws-c-common.so.1(aws_fatal_assert+0x46) [0x7f03a8ade646]
/tmp/problem/.CondaPkg/env/lib/python3.10/site-packages/pyarrow/../../../././libaws-c-io.so.1.0.0(+0x29641) [0x7f03a8995641]
/tmp/problem/.CondaPkg/env/lib/python3.10/site-packages/pyarrow/../../../././libaws-c-mqtt.so.1.0.0(aws_mqtt_library_init+0x21) [0x7f03a8a902c1]
/tmp/problem/.CondaPkg/env/lib/python3.10/site-packages/pyarrow/../../.././libaws-crt-cpp.so(_ZN3Aws3Crt9ApiHandleC2EP13aws_allocator+0x2d) [0x7f03a9103dad]
/tmp/problem/.CondaPkg/env/lib/python3.10/site-packages/pyarrow/../../.././libaws-cpp-sdk-core.so(_ZN3Aws13InitializeCrtEv+0x30) [0x7f03a92ceaf0]
/tmp/problem/.CondaPkg/env/lib/python3.10/site-packages/pyarrow/../../.././libaws-cpp-sdk-core.so(_ZN3Aws7InitAPIERKNS_10SDKOptionsE+0x4a) [0x7f03a92cd46a]
/tmp/problem/.CondaPkg/env/lib/python3.10/site-packages/pyarrow/../../../libarrow.so.1100(+0x108e233) [0x7f03ab0bf233]
/tmp/problem/.CondaPkg/env/lib/python3.10/site-packages/pyarrow/../../../libarrow.so.1100(_ZN5arrow2fs12InitializeS3ERKNS0_15S3GlobalOptionsE+0x47) [0x7f03ab0c4127]
/tmp/problem/.CondaPkg/env/lib/python3.10/site-packages/pyarrow/_s3fs.cpython-310-x86_64-linux-gnu.so(+0x139e1) [0x7f03a41a69e1]
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Reproduce the two import orders using the Project.toml and CondaPkg.toml states shown in the report, focusing on PythonCall's __init__ routine and pyimport calls. Compare the failing and working initialization paths and the displayed libaws/libarrow stack trace. Done means the documented package-preparation scenario works without the cugraph initialization error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
backend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.