`remote_exec` hangs forever when remotely using `gevent` model only at python3
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- python
- Domínio
- distributed-systems
Direção de pesquisa
Reproduza o travamento com o exemplo de Python 3 usando a configuração thread-to-gevent do execnet e as versões listadas no issue. Comece inspecionando o mapeamento de ExecModel em execnet/gateway_base.py por volta das linhas 112-125 e, em seguida, acompanhe remote_exec através do receiver e das threads worker. Está concluído quando a chamada remota retorna 333 e o programa chega a “everything done” sem travar.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
The problem only occurs at python3.
Environment:
- OS:
Linux faa410b1f09b 4.19.121-linuxkit #1 SMP Thu Jan 21 15:36:34 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux - Python version:
Python 3.7.5
Dependencies:
- gevent version:
21.1.2 - execnet version:
1.8.0
Code:
import execnet
# hangs forever when remote is gevent
execnet.set_execmodel('thread', 'gevent')
gw = execnet.makegateway()
print(gw)
print(gw.remote_status())
print('channel.send')
print (gw.remote_exec("channel.send(333)").receive())
print('everything done')
Problem: Above code hangs forever.
Stdout:
<Gateway id='gw0' receive-live, thread model, 0 active channels>
<RInfo 'execmodel=gevent, numchannels=0, numexecuting=0'>
channel.send
Debug log:
[89653] gw0 sent <Message STATUS channel=1 lendata=0>
[89653] gw0 [receiver-thread] RECEIVERTHREAD: starting to run
[89655] creating workergateway on <execnet.gateway_base.Popen2IO object at 0x1106a5820>
[89655] gw0-worker [serve] spawning receiver thread
[89655] gw0-worker [serve] joining receiver thread
[89655] gw0-worker waiting for receiver thread to finish
[89655] gw0-worker [receiver-thread] RECEIVERTHREAD: starting to run
[89655] gw0-worker [receiver-thread] received <Message STATUS channel=1 lendata=0>
[89655] gw0-worker sent <Message CHANNEL_DATA channel=1 lendata=73>
[89653] gw0 [receiver-thread] received <Message CHANNEL_DATA channel=1 lendata=73>
[89653] gw0 [receiver-thread] received <Message CHANNEL_CLOSE channel=1 lendata=0>
[89655] gw0-worker sent <Message CHANNEL_CLOSE channel=1 lendata=0>
[89653] gw0 1 channel.__del__
[89653] gw0 sent <Message CHANNEL_EXEC channel=3 lendata=31>
[89655] gw0-worker [receiver-thread] received <Message CHANNEL_EXEC channel=3 lendata=31>
The code hangs while executing remote_exec. The problem only occurs when remote thread model is gevent.
I guess the problem occurred because while gevent is rapidly syncing with python3, execnet was not maintained :C.
Maybe related to function mapping when making ExecModel:
https://github.com/pytest-dev/execnet/blob/894533a515baf526c35ea0fe525b4866c6824ab8/execnet/gateway_base.py#L112-L125
I know this repo is unmaintained. Hoping for receiving someone's help!
- Linguagem predominante
- Python
- Estrelas
- 103
- Forks
- 50
- Merge médio
- 5d 12h
- PRs com merge (30d)
- 4
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de pytest-dev/execnet
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
pytest-dev/execnet#374 · 3 comentários ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 45/100
pytest-dev/execnet#306 · 1 comentário ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
pytest-dev/execnet#279 · 1 reação ·
-
Exception ignored in atexit callback / RuntimeError: can't create new thread at interpreter shutdownTalvez livre de novo @RonnyPfannschmidt assumiu há 909 dias e não há nenhum pull request aberto. Abertabug
pytest-dev/execnet#271 · 4 comentários · 1 responsável ·
-
Record of old ISSUES.txtAberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 10/100
pytest-dev/execnet#205 ·
Todas as issues de pytest-dev/execnet
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
NousResearch/hermes-agent#136483 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
[BUG] LazyStackedTensorDictStore zeroes the last byte of a new key set on the last elementTalvez já em andamento @peterdsharpe assumiu hoje. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
pytorch/tensordict#2307 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
GrokModel.generate/a_generate pass an OpenAI-style list-of-dicts to xai_sdk.chat.user(), so every call crashes with a protobuf TypeError before any network I/OTalvez já em andamento @Christian-Sidak assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
confident-ai/deepeval#3436 · 1 comentário ·
Mantenedores costumam responder em até 1 dia