New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brotli v1.1.0 tests fail with pypy3 #1072
Comments
git bisect points to c8df4b3.
I'm going to report this to PyPy upstream as well, as that RPython assertion looks suspicious. Curious enough, with tip of |
The segfault is introduced in acc2656.
|
Here's what I managed to gdb out of the segfault:
I'm going to report the assertion prior to that commit first, and see what comes out of that. |
I've filed to PyPy upstream at https://foss.heptapod.net/pypy/pypy/-/issues/4000 |
We get a suspicious crash in a Scrapy test (which passes garbage into the brotli decompressor among other things), the Python traceback is unhelpful as it's truncated, but the gdb one points to brotli: #4 0x00007ffff697ee41 in pypy_debug_catch_fatal_exception () from ~/.pyenv/versions/pypy3.9-7.3.11/bin/libpypy3.9-c.so
#5 0x00007ffff5e69fea in pypy_g_wrapper_second_level.star_2_51 () from ~/.pyenv/versions/pypy3.9-7.3.11/bin/libpypy3.9-c.so
#6 0x00007ffff03357d7 in BlocksOutputBuffer_Finish () from ~/scrapy/.tox/py/lib/pypy3.9/site-packages/_brotli.pypy39-pp73-x86_64-linux-gnu.so
#7 0x00007ffff0335a70 in brotli_Decompressor_process () from ~/scrapy/.tox/py/lib/pypy3.9/site-packages/_brotli.pypy39-pp73-x86_64-linux-gnu.so
#8 0x00007ffff5f586f1 in pypy_g_generic_cpy_call__StdObjSpaceConst_funcPtr_SomeI_13 () from ~/.pyenv/versions/pypy3.9-7.3.11/bin/libpypy3.9-c.so It doesn't look like this bug needs more info but if does please let me know! |
If change these invokings, does it fix the problem?
|
Unfortunately, the segfault seems to be a heisenbug and I can't reproduce it right now. As for the assertion from pypy3, these changes don't help, though it seems to happen elsewhere. I've pasted the log for that to the PyPy bug; it's failing on:
|
Bug: google/brotli#1072 Signed-off-by: Michał Górny <mgorny@gentoo.org>
I can reliably reproduce this failure when running the command line from the segfaulting test
The cause of the segfault is in this stanza
|
Here's an example that reliably crashes on brotli v1.1.0 and does not crash on brotli v1.0.9. I am on Fedora 39. Pypy 3.10 is taken from the system's packages:
Get brotli v1.1.0 from PyPI and compile it. If in this command you replace the version with
Here's a minimal program that causes the crash:
Crashes with:
View the core dump (I am assuming there where no other crashes in the system after this one):
Which seems to show that the crash is in
Something similar happens when calling |
(moved from google/brotli-wheels#19)
I tried to update the submodule to brotli v1.1.0 in google/brotli-wheels@c7db335 (google/brotli-wheels#18), but encountered an issue with pypy. The wheels get built but then when the tests are run, we get these sort of errors:
e.g. see CI log https://github.com/google/brotli-wheels/actions/runs/6085235897/job/16508840821#step:5:944
I don't know how to fix that, so for the time being I will simply disable building wheels for pypy...
If anybody would like to help fix this, they'll be welcome to send a PR.
Also note that pypy users may benefit from using the alternative CFFI-based bindings from https://github.com/python-hyper/brotlicffi, whose API is mostly a drop-in replacement for our official brotli bindings.
The text was updated successfully, but these errors were encountered: