Summary: | deskutils/py-paperless-ngx: port affected by classifier training hanging | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | freebsd.bugzilla |
Component: | Individual Port(s) | Assignee: | Michael Gmelin <grembo> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | Flags: | bugzilla:
maintainer-feedback?
(grembo) |
Priority: | --- | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
freebsd.bugzilla
2024-05-15 14:05:57 UTC
Thank you for reporting! A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3ace88e8ff1e9e2eaa2e7417da1ac03182188314 commit 3ace88e8ff1e9e2eaa2e7417da1ac03182188314 Author: Michael Gmelin <grembo@FreeBSD.org> AuthorDate: 2024-05-21 07:23:23 +0000 Commit: Michael Gmelin <grembo@FreeBSD.org> CommitDate: 2024-05-21 07:23:23 +0000 deskutils/py-paperless-ngx: Fix document classifier hanging Set OMP_NUM_THREADS=1 as a workaround (taken from NixOS port). PR: 279011 Reported by: freebsd.bugzilla@mail.tinsuke.com deskutils/py-paperless-ngx/Makefile | 2 +- deskutils/py-paperless-ngx/files/paperless-worker.in | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) Thanks for the fix! I have validated that it solves the issue when updating classifier training is triggered by the periodically scheduled task. But running `su -l paperless -c 'paperless document_create_classifier'` still leaves the user hanging. Would it be worth it to also patch manage.py to set OMP_NUM_THREADS=1? I believe that should "cover all bases", but if there are other entry points I can see how this can become a cat-and-mouse game. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=aed26383cdf5928ed5f7642954123f8099b23920 commit aed26383cdf5928ed5f7642954123f8099b23920 Author: Michael Gmelin <grembo@FreeBSD.org> AuthorDate: 2024-05-28 15:44:24 +0000 Commit: Michael Gmelin <grembo@FreeBSD.org> CommitDate: 2024-05-28 15:45:50 +0000 deskutils/py-paperless-ngx: Fix document classifier hanging (2) Turn paperless symlink into wrapper, this way OMP_NUM_THREADS=1 is also set when paperless is called outside rc scripts. PR: 279011 Reported by: freebsd.bugzilla@mail.tinsuke.com deskutils/py-paperless-ngx/Makefile | 8 +++----- deskutils/py-paperless-ngx/files/paperless-ngx.7.in | 13 ++++++------- deskutils/py-paperless-ngx/files/paperless.in (new) | 9 +++++++++ 3 files changed, 18 insertions(+), 12 deletions(-) (In reply to freebsd.bugzilla from comment #3) Let's see if you're right and this will actually turn into a game of Whac-A-Mole. For the time being, I (stubbornly) went with turning %%PREFIX%%/bin/paperless into a wrapper that sets the environment variable. Thanks for looking into it again, hopefully this won't creep up again anywhere else! I have verified the fix, and running `su -l paperless -c 'paperless document_create_classifier'` now works just fine. |