JuliaPy / JuliaPy/PythonCall.jl

Segfaults with frequent python calls from thread 1 on multithreaded Julia

Aberta
#201 18 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Julia
Estrelas
1.1k
Forks
86
Merge médio
1d 22h
PRs com merge (30d)
3

Descrição

In a complex application with high-frequency python calls I always run into

```
signal (11): Segmentation fault
in expression starting at REPL[41]:2
_PyTrash_begin at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/object.c:2125
```

segfaults when Julia has multiple threads (e.g. `JULIA_NUM_THREADS=4`). I do make sure to only use PythonCall from thread 1 (and I use asserts to verify that) but somehow that doesn't seem to be enough. When running with `JULIA_NUM_THREADS=1`, all is fine. Is PythonCall incompatible with multi-threaded Julia in general?

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Start by reducing the reported high-frequency PythonCall workload and compare it with JULIA_NUM_THREADS=1 and JULIA_NUM_THREADS=4, while retaining the thread-1 assertion. Use the reported _PyTrash_begin segmentation fault as the initial failure to investigate. Done means establishing whether multithreaded Julia is generally incompatible here or identifying a reproducible condition and its fix.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
julia, python
Domínio
backend
Tipo de issue
Bug
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.