#12951·InvenTree

Backgroundworker crash/hang with looping reincarnation

Author: cbohnensCreated Sep 29, 2026Updated Oct 1, 2026
Labelsbugquestiontriage:not-checked

Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

Describe the bug*

The Backgroundworker started to hang/loop, as far as I can tell without any particular trigger. There were no "Failed Tasks" in the Admin Center under Background Tasks, but all tasks since the first log message in systemd logs indicating the problem were queued (~250 Tasks in 3.5 hours), and the page reported the background worker as "not running".

After the initial Syslog Entry indicating the problem: Sep 29 03:29:55 lenovo-hotspare python[1327378]: Exception ignored while calling weakref callback <Finalize object, dead>:, the crashed worker kept getting reincarnated, which resulted in ~70000 log entries of the repeating backtraces in syslog over the next 3.5 hours.

After stopping and starting the backgroundworker via systemctl, the pending tasks drained away and normal operation resumed.

I will keep an eye out if the issue happens again, but wanted to document this unexpected behaviour just in case.

Steps to Reproduce

could not reproduce yet

Expected behaviour

no looping reincarnation of crashed background worker task

Deployment Method

Bare metal

Version Information

InvenTree-Version: 1.5.5 Django Version: 5.2.16 Commit Hash: 5bd6e03 Commit Date: 2026-09-16 Commit Branch: stable Database: django.db.backends.postgresql Debug-Mode: True Deployed using Docker: False Platform: Linux-6.18.48-1-lts-x86_64-with-glibc2.44 Installer: GIT Active plugins: false

Try to reproduce on the demo site

I did not try to reproduce

Is the bug reproducible on the demo site?

Not reproducible

Relevant log output

bash
Sep 29 03:29:55 lenovo-hotspare python[1327378]: Exception ignored while calling weakref callback <Finalize object, dead>:
Sep 29 03:29:55 lenovo-hotspare python[1327378]: Traceback (most recent call last):
Sep 29 03:29:55 lenovo-hotspare python[1327378]:   File "/usr/lib/python3.14/multiprocessing/util.py", line 295, in __call__
Sep 29 03:29:55 lenovo-hotspare python[1327378]:     res = self._callback(*self._args, **self._kwargs)
Sep 29 03:29:55 lenovo-hotspare python[1327378]:   File "/usr/lib/python3.14/multiprocessing/synchronize.py", line 86, in _cleanup
Sep 29 03:29:55 lenovo-hotspare python[1327378]:     sem_unlink(name)
Sep 29 03:29:55 lenovo-hotspare python[1327378]: FileNotFoundError: [Errno 2] No such file or directory
Sep 29 03:29:57 lenovo-hotspare python[1379612]: Traceback (most recent call last):
Sep 29 03:29:57 lenovo-hotspare python[1379612]:   File "/usr/lib/python3.14/multiprocessing/forkserver.py", line 353, in main
Sep 29 03:29:57 lenovo-hotspare python[1379612]:     code = _serve_one(child_r, fds,
Sep 29 03:29:57 lenovo-hotspare python[1379612]:                       unused_fds,
Sep 29 03:29:57 lenovo-hotspare python[1379612]:                       old_handlers)
Sep 29 03:29:57 lenovo-hotspare python[1379612]:   File "/usr/lib/python3.14/multiprocessing/forkserver.py", line 393, in _serve_one
Sep 29 03:29:57 lenovo-hotspare python[1379612]:     code = spawn._main(child_r, parent_sentinel)
Sep 29 03:29:57 lenovo-hotspare python[1379612]:   File "/usr/lib/python3.14/multiprocessing/spawn.py", line 132, in _main
Sep 29 03:29:57 lenovo-hotspare python[1379612]:     self = reduction.pickle.load(from_parent)
Sep 29 03:29:57 lenovo-hotspare python[1379612]:   File "/usr/lib/python3.14/multiprocessing/synchronize.py", line 117, in __setstate__
Sep 29 03:29:57 lenovo-hotspare python[1379612]:     self._semlock = _multiprocessing.SemLock._rebuild(*state)
Sep 29 03:29:57 lenovo-hotspare python[1379612]:                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
Sep 29 03:29:57 lenovo-hotspare python[1379612]: FileNotFoundError: [Errno 2] No such file or directory
Sep 29 03:29:57 lenovo-hotspare python[1327378]: 2026-09-29 05:29:57,867 CRITICAL reincarnated worker Process-2394d00ae32b4d4596022c3bab947272 after death
Sep 29 03:30:00 lenovo-hotspare python[1379674]: Traceback (most recent call last):
Sep 29 03:30:00 lenovo-hotspare python[1379674]:   File "/usr/lib/python3.14/multiprocessing/forkserver.py", line 353, in main
Sep 29 03:30:00 lenovo-hotspare python[1379674]:     code = _serve_one(child_r, fds,
Sep 29 03:30:00 lenovo-hotspare python[1379674]:                       unused_fds,
Sep 29 03:30:00 lenovo-hotspare python[1379674]:                       old_handlers)
Sep 29 03:30:00 lenovo-hotspare python[1379674]:   File "/usr/lib/python3.14/multiprocessing/forkserver.py", line 393, in _serve_one
Sep 29 03:30:00 lenovo-hotspare python[1379674]:     code = spawn._main(child_r, parent_sentinel)
Sep 29 03:30:00 lenovo-hotspare python[1379674]:   File "/usr/lib/python3.14/multiprocessing/spawn.py", line 132, in _main
Sep 29 03:30:00 lenovo-hotspare python[1379674]:     self = reduction.pickle.load(from_parent)
Sep 29 03:30:00 lenovo-hotspare python[1379674]:   File "/usr/lib/python3.14/multiprocessing/synchronize.py", line 117, in __setstate__
Sep 29 03:30:00 lenovo-hotspare python[1379674]:     self._semlock = _multiprocessing.SemLock._rebuild(*state)
Sep 29 03:30:00 lenovo-hotspare python[1379674]:                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
Sep 29 03:30:00 lenovo-hotspare python[1379674]: FileNotFoundError: [Errno 2] No such file or directory
Sep 29 03:30:00 lenovo-hotspare python[1327378]: 2026-09-29 05:30:00,374 CRITICAL reincarnated worker Process-60ea50b458f2478e98dad619ec98bb69 after death

...

Sep 29 07:03:51 lenovo-hotspare python[1686719]: FileNotFoundError: [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327378]: 2026-09-29 09:03:51,348 CRITICAL reincarnated worker Process-fa8f998b7cd343508db41a3be5219f14 after death
Sep 29 07:03:51 lenovo-hotspare systemd[1]: Stopping Inventree Background Worker...
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:475: UserWarning: resource_tracker: There appear to be 16 leaked semaphore objects to clean up at shutdown: {'/mp-y816dk33', '/mp-16xf6bye', '/mp-sx460xn7', '/mp-2889xdbq', '/mp-ata6x8z5', '/mp-cjkw1m3f', '/mp-2>
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn(
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-y816dk33': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-16xf6bye': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-sx460xn7': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-2889xdbq': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-ata6x8z5': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-cjkw1m3f': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-28dglcwq': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-vtu9roqd': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-cprpz77i': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-jxmta0pu': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-i8jys1wp': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-jiz1ir8y': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-u5oty6ss': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare python[1327254]: /usr/lib/python3.14/multiprocessing/resource_tracker.py:491: UserWarning: resource_tracker: '/mp-toos0yvz': [Errno 2] No such file or directory
Sep 29 07:03:51 lenovo-hotspare python[1327254]:   warnings.warn('resource_tracker: %r: %s' % (name, e))
Sep 29 07:03:51 lenovo-hotspare systemd[1]: inventree_backgroundworker.service: Deactivated successfully.
Sep 29 07:03:51 lenovo-hotspare systemd[1]: Stopped Inventree Background Worker.

I have reviewed this report for correctness and filled out all sections.

  • I have checked this report. I acknowledge that filing bugs via AI agents without review might lead to being blocked.