; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports-bugs@freebsd.org Sender: owner-freebsd-ports-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279011 Bug ID: 279011 Summary: deskutils/py-paperless-ngx: port affected by classifier training hanging Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: grembo@FreeBSD.org Reporter: freebsd.bugzilla@mail.tinsuke.com Assignee: grembo@FreeBSD.org Flags: maintainer-feedback?(grembo@FreeBSD.org) The port seems to be affected by this issue: https://github.com/paperless-ngx/paperless-ngx/discussions/2373 In short, on my instance, with 106 documents, 12 tag(s), 29 correspondent(s= ), 8 document type(s), 0 storage path(es), classifier training gets stuck/hangs indefinitely with 1 CPU showing 100% usage. The logs show: [2024-05-15 15:56:20,696] [DEBUG] [paperless.classifier] Document classification model does not exist (yet), not performing automatic matchin= g. [2024-05-15 15:56:20,697] [DEBUG] [paperless.classifier] Gathering data from database... [2024-05-15 15:56:20,843] [DEBUG] [paperless.classifier] 106 documents, 12 tag(s), 29 correspondent(s), 8 document type(s). 0 storage path(es) [2024-05-15 15:56:20,877] [DEBUG] [paperless.classifier] Vectorizing data... [2024-05-15 15:56:21,650] [DEBUG] [paperless.classifier] Training tags classifier... [2024-05-15 15:56:22,163] [DEBUG] [paperless.classifier] Training correspon= dent classifier... Running `su -l paperless -c 'paperless document_create_classifier'` shows: OMP: Warning #96: Cannot form a team with 16 threads, using 1 instead. OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set). As suggested in the linked discussion, adding this to /etc/profile fixes the issue for me: # Fix document classifier hanging: # https://github.com/paperless-ngx/paperless-ngx/discussions/2373#discussionc= omment-9244780 export OMP_NUM_THREADS=3D1 The port could either set this variable as well (as the NixOS port did: https://github.com/NixOS/nixpkgs/pull/299008), or try replacing the depende= ncy on openblas by mkl, but that seems to be problematic for FreeBSD: https://github.com/paperless-ngx/paperless-ngx/discussions/2373#discussionc= omment-8563927 --=20 You are receiving this mail because: You are the assignee for the bug.=