Skip to content

hotfix(hooks): prevent worker crashes from poisoning the process pool#32

Merged
Peter-L-SVK merged 5 commits into
mainfrom
stage
Jul 1, 2026
Merged

hotfix(hooks): prevent worker crashes from poisoning the process pool#32
Peter-L-SVK merged 5 commits into
mainfrom
stage

Conversation

@Peter-L-SVK

Copy link
Copy Markdown
Owner

_generate_chunk in the synthetic data generator could throw unhandled
exceptions (connection failure, faker import error, bad preset) that
killed the spawned worker process. Once a worker dies, ProcessPoolExecutor
refuses all further work with 'A child process terminated abruptly,
the process pool is not usable anymore.'

  • Wrapped _generate_chunk body in try/except so it returns 0 on error
    instead of crashing the worker
  • Added _reset_pool() to worker_pool.py to recreate a broken pool
  • Multi-CPU path now catches BrokenProcessPool and retries once with
    a fresh pool

packaging: improve RPM and DEB package builds

  • Use pyproject.toml as single source of truth for dependencies
  • Add package→import name mapping (PyGObject→gi, pycairo→cairo, etc.)
  • Create sql-schema-studio-install-deps helper script for Python dependencies
  • Launcher now checks for missing packages and guides user
  • Remove requirements.txt generation, read directly from pyproject.toml
  • Make icon and desktop file installation more robust with fallbacks
  • Fix ModuleNotFoundError by properly setting PYTHONPATH

docs: update README with improved installation instructions

  • Simplify installation steps with unified approach
  • Add sql-schema-studio-install-deps to post-install workflow
  • Remove scattered pip install commands
  • Add pipx as recommended installation method
  • Update troubleshooting section for new workflow"

_generate_chunk in the synthetic data generator could throw unhandled
exceptions (connection failure, faker import error, bad preset) that
killed the spawned worker process. Once a worker dies, ProcessPoolExecutor
refuses all further work with "A child process terminated abruptly,
the process pool is not usable anymore."

- Wrapped _generate_chunk body in try/except so it returns 0 on error
  instead of crashing the worker
- Added _reset_pool() to worker_pool.py to recreate a broken pool
- Multi-CPU path now catches BrokenProcessPool and retries once with
  a fresh pool

packaging: improve RPM and DEB package builds

- Use pyproject.toml as single source of truth for dependencies
- Add package→import name mapping (PyGObject→gi, pycairo→cairo, etc.)
- Create sql-schema-studio-install-deps helper script for Python dependencies
- Launcher now checks for missing packages and guides user
- Remove requirements.txt generation, read directly from pyproject.toml
- Make icon and desktop file installation more robust with fallbacks
- Fix ModuleNotFoundError by properly setting PYTHONPATH

docs: update README with improved installation instructions

- Simplify installation steps with unified approach
- Add sql-schema-studio-install-deps to post-install workflow
- Remove scattered pip install commands
- Add pipx as recommended installation method
- Update troubleshooting section for new workflow

Closes #<issue-number> (if applicable)
- _reset_pool() in worker_pool.py referenced _worker_pool but the global
  singleton is named _pool, causing three mypy name-defined errors
…y error

_reset_pool accessed _pool._pool.shutdown() directly but mypy can't
narrow the inner ProcessPoolExecutor | None to non-None. Replaced with
a call to the public shutdown() method which already handles the check.
@Peter-L-SVK Peter-L-SVK self-assigned this Jul 1, 2026
@Peter-L-SVK Peter-L-SVK added documentation Improvements or additions to documentation bugfix labels Jul 1, 2026
@Peter-L-SVK Peter-L-SVK merged commit 453faac into main Jul 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant