Skip to content

Korp hangs in subprocess.Popen with gevent >= 25.8.1 #40

@janiemi

Description

@janiemi

After the dependency updates in commit 0c3e046, my local Korp began to hang when responding a request. This happens with both the Flask dev server and gevent.

It seems to me that Korp hangs in the subprocess.Popen constructor called in korp.cwb.run_cqp. I then noticed that Korp doesn’t hang if you comment out the monkey-patching code in run.py, nor if you downgrade gevent from 25.9.1 to 25.5.1 (or earlier), so the problem would seem to be related to gevent.

I’m wondering if you have been able to run Korp with gevent 25.9.1 (as indicated by requirements.txt) or if this is somehow specific to our environment. If you have also encountered the problem, should it be reported to gevent? But if the problem only occurs in our environment, I’m wondering what could be the incompatible component or what else could cause it.

I have tested this with Python 3.10.19, 3.12.3 and 3.14.0 on Ubuntu 24.04.1. The same also happened with Python 3.9.21 on AlmaLinux 9.5 when running via Gunicorn.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions