Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

bcrypt 4.0.0 test failure on 32bit arch

Open
#407 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Reproduce the failure with the 32-bit Mageia or Fedora Mock build, then inspect bcrypt/init.py around kdf and tests/test_bcrypt.py at test_kdf. Run the reported tox py310 test environment and compare behavior on a 32-bit system. Done means the test suite completes without a segmentation fault on the affected architecture.

Written by the indexing model from the issue text.

Description

Tests fails due to a segfault on 32bit Mageia Cauldron, the development version of the distro. I can reproduce the issue also with Fedora 36 bcrypt mock build. Mock is a tool for a reproducible build of RPM packages.

+ /usr/bin/python3 -m tox --current-env -q --recreate -e py310
============================= test session starts ==============================
platform linux -- Python 3.10.6, pytest-7.1.3, pluggy-1.0.0
cachedir: .tox/py310/.pytest_cache
rootdir: /builddir/build/BUILD/bcrypt-4.0.0
collected 150 items

tests/test_bcrypt.py ................................................... [ 34%]
........................................................................ [ 82%]
..Fatal Python error: Segmentation fault

Current thread 0xf7938700 (most recent call first):
  File "/builddir/build/BUILDROOT/python-bcrypt-4.0.0-1.mga9.i386/usr/lib/python3.10/site-packages/bcrypt/__init__.py", line 127 in kdf
  File "/builddir/build/BUILD/bcrypt-4.0.0/tests/test_bcrypt.py", line 443 in test_kdf
  File "/usr/lib/python3.10/site-packages/_pytest/python.py", line 192 in pytest_pyfunc_call
  File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/usr/lib/python3.10/site-packages/_pytest/python.py", line 1761 in runtest
  File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 166 in pytest_runtest_call
  File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 259 in <lambda>
  File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 338 in from_call
  File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 258 in call_runtest_hook
  File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 219 in call_and_report
  File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 130 in runtestprotocol
  File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 111 in pytest_runtest_protocol
  File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 347 in pytest_runtestloop
  File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 322 in _main
  File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 268 in wrap_session
  File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 315 in pytest_cmdline_main
  File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 164 in main
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 187 in console_main
  File "/usr/lib/python3.10/site-packages/pytest/__main__.py", line 5 in <module>
  File "/usr/lib/python3.10/site-packages/coverage/execfile.py", line 199 in run
  File "/usr/lib/python3.10/site-packages/coverage/cmdline.py", line 830 in do_run
  File "/usr/lib/python3.10/site-packages/coverage/cmdline.py", line 659 in command_line
  File "/usr/lib/python3.10/site-packages/coverage/cmdline.py", line 943 in main
  File "/usr/bin/coverage", line 8 in <module>
ERROR: InvocationError for command /usr/bin/coverage run -m pytest --strict-markers (exited with code -11 (SIGSEGV)) (exited with code -11)
___________________________________ summary ____________________________________
ERROR:   py310: commands failed

Full build logs available in Fedora COPR, mageia-cauldron-i586 builder-live.log.gz.

Dominant language
Python
Stars
1.5k
Forks
215
Avg merge
6h 15m
Merged PRs (30d)
8

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pyca/bcrypt

All issues in pyca/bcrypt

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.