Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924180 - dev-python/psycopg-3.1.17[native-extensions] fails tests on sparc, arm: tests/test_copy_async.py::test_read_rows[asyncio-names-1] Fatal Python error: Bus error
Summary: dev-python/psycopg-3.1.17[native-extensions] fails tests on sparc, arm: tests...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc64 Linux
: Normal normal
Assignee: Python Gentoo Team
URL: https://github.com/psycopg/psycopg/is...
Whiteboard:
Keywords:
Depends on:
Blocks: unaligned-access 922852 925053
  Show dependency tree
 
Reported: 2024-02-09 18:52 UTC by matoro
Modified: 2024-03-17 18:45 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (file_924180.txt,992.48 KB, text/plain)
2024-02-09 18:53 UTC, matoro
Details
gdb context and complete backtrace (file_924180.txt,3.27 KB, text/plain)
2024-02-09 21:03 UTC, matoro
Details
UBSAN run (file_924180.txt,1.82 KB, text/plain)
2024-02-09 22:06 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-02-09 18:52:19 UTC
Unaligned access kill in this test.

tests/test_copy_async.py::test_read_rows[asyncio-names-1] Fatal Python error: Bus error

Current thread 0xfff8000100038ce0 (most recent call first):
  File "/var/tmp/portage/dev-python/psycopg-3.1.17/work/psycopg-3.1.17-python3_11/install/usr/lib/python3.11/site-packages/psycopg/copy.py", line 749 in parse_row
  File "/var/tmp/portage/dev-python/psycopg-3.1.17/work/psycopg-3.1.17-python3_11/install/usr/lib/python3.11/site-packages/psycopg/copy.py", line 174 in _read_row_gen
  File "/var/tmp/portage/dev-python/psycopg-3.1.17/work/psycopg-3.1.17-python3_11/install/usr/lib/python3.11/site-packages/psycopg/waiting.py", line 129 in wait_async
  File "/var/tmp/portage/dev-python/psycopg-3.1.17/work/psycopg-3.1.17-python3_11/install/usr/lib/python3.11/site-packages/psycopg/connection_async.py", line 348 in wait
  File "/var/tmp/portage/dev-python/psycopg-3.1.17/work/psycopg-3.1.17-python3_11/install/usr/lib/python3.11/site-packages/psycopg/copy.py", line 526 in read_row
  File "/var/tmp/portage/dev-python/psycopg-3.1.17/work/psycopg-3.1.17/tests/test_copy_async.py", line 104 in test_read_rows
  File "/usr/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1889 in _run_tests_and_fixtures
  File "/usr/lib/python3.11/asyncio/events.py", line 80 in _run
  File "/usr/lib/python3.11/asyncio/base_events.py", line 1922 in _run_once
  File "/usr/lib/python3.11/asyncio/base_events.py", line 607 in run_forever
  File "/usr/lib/python3.11/asyncio/base_events.py", line 640 in run_until_complete
  File "/usr/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1954 in run_test
  File "/usr/lib/python3.11/site-packages/anyio/pytest_plugin.py", line 124 in pytest_pyfunc_call
  File "/usr/lib/python3.11/site-packages/pluggy/_callers.py", line 77 in _multicall
  File "/usr/lib/python3.11/site-packages/pluggy/_manager.py", line 115 in _hookexec
  File "/usr/lib/python3.11/site-packages/pluggy/_hooks.py", line 493 in __call__
  File "/usr/lib/python3.11/site-packages/_pytest/python.py", line 1792 in runtest
  File "/usr/lib/python3.11/site-packages/_pytest/runner.py", line 169 in pytest_runtest_call
  File "/usr/lib/python3.11/site-packages/pluggy/_callers.py", line 77 in _multicall
  File "/usr/lib/python3.11/site-packages/pluggy/_manager.py", line 115 in _hookexec
  File "/usr/lib/python3.11/site-packages/pluggy/_hooks.py", line 493 in __call__
  File "/usr/lib/python3.11/site-packages/_pytest/runner.py", line 262 in <lambda>
  File "/usr/lib/python3.11/site-packages/_pytest/runner.py", line 341 in from_call
  File "/usr/lib/python3.11/site-packages/_pytest/runner.py", line 261 in call_runtest_hook
  File "/usr/lib/python3.11/site-packages/_pytest/runner.py", line 222 in call_and_report
  File "/usr/lib/python3.11/site-packages/_pytest/runner.py", line 133 in runtestprotocol
  File "/usr/lib/python3.11/site-packages/_pytest/runner.py", line 114 in pytest_runtest_protocol
  File "/usr/lib/python3.11/site-packages/pluggy/_callers.py", line 77 in _multicall
  File "/usr/lib/python3.11/site-packages/pluggy/_manager.py", line 115 in _hookexec
  File "/usr/lib/python3.11/site-packages/pluggy/_hooks.py", line 493 in __call__
  File "/usr/lib/python3.11/site-packages/_pytest/main.py", line 350 in pytest_runtestloop
  File "/usr/lib/python3.11/site-packages/pluggy/_callers.py", line 77 in _multicall
  File "/usr/lib/python3.11/site-packages/pluggy/_manager.py", line 115 in _hookexec
  File "/usr/lib/python3.11/site-packages/pluggy/_hooks.py", line 493 in __call__
  File "/usr/lib/python3.11/site-packages/_pytest/main.py", line 325 in _main
  File "/usr/lib/python3.11/site-packages/_pytest/main.py", line 271 in wrap_session
  File "/usr/lib/python3.11/site-packages/_pytest/main.py", line 318 in pytest_cmdline_main
  File "/usr/lib/python3.11/site-packages/pluggy/_callers.py", line 77 in _multicall
  File "/usr/lib/python3.11/site-packages/pluggy/_manager.py", line 115 in _hookexec
  File "/usr/lib/python3.11/site-packages/pluggy/_hooks.py", line 493 in __call__
  File "/usr/lib/python3.11/site-packages/_pytest/config/__init__.py", line 169 in main
  File "/usr/lib/python3.11/site-packages/_pytest/config/__init__.py", line 192 in console_main
  File "/usr/lib/python3.11/site-packages/pytest/__main__.py", line 5 in <module>
  File "<frozen runpy>", line 88 in _run_code
  File "<frozen runpy>", line 198 in _run_module_as_main

Extension modules: psycopg_c.pq, psycopg_c._psycopg (total: 2)
2024-02-09 18:47:49.101 UTC [4345] LOG:  unexpected EOF on client connection with an open transaction
/var/tmp/portage/dev-python/psycopg-3.1.17/temp/environment: line 2529:  4016 Bus error               "${@}"

Reproducible: Always
Comment 1 matoro archtester 2024-02-09 18:53:35 UTC
Created attachment 884637 [details]
build.log and emerge --info
Comment 2 matoro archtester 2024-02-09 19:00:44 UTC
This ***IS REGRESSION*** from 3.1.16
Comment 3 matoro archtester 2024-02-09 19:04:40 UTC
(In reply to matoro from comment #2)
> This ***IS REGRESSION*** from 3.1.16

Oh wait, never mind, I see this is because USE=native-extensions was wired up.
Comment 4 matoro archtester 2024-02-09 21:03:18 UTC
Created attachment 884640 [details]
gdb context and complete backtrace

small gdb backtrace, difficult to get the complete picture because cython seems to wipe out the intermediate source
Comment 5 matoro archtester 2024-02-09 22:06:33 UTC
Created attachment 884641 [details]
UBSAN run

UBSAN proof here.  This was a true terror to extract
Comment 6 matoro archtester 2024-02-09 22:16:33 UTC
Opened https://github.com/psycopg/psycopg/issues/734 upstream.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-02-10 07:01:04 UTC
Should we masked it?  I didn't enable the C extension in the earlier versions.
Comment 8 matoro archtester 2024-03-17 17:36:43 UTC
Affects arm, and 3.1.18 also.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-17 18:36:00 UTC
I guess I'll just mask the flag globally on this version, in hope that upstream fixes it eventually.
Comment 10 Larry the Git Cow gentoo-dev 2024-03-17 18:45:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed2bf3069a5353f58b0125b99b3ba2dcaebdbd06

commit ed2bf3069a5353f58b0125b99b3ba2dcaebdbd06
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-03-17 18:43:41 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-03-17 18:44:59 +0000

    profiles/base: Mask dev-python/psycopg[native-extensions]
    
    Bug: https://github.com/psycopg/psycopg/issues/734
    Closes: https://bugs.gentoo.org/924180
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 profiles/base/package.use.mask | 5 +++++
 1 file changed, 5 insertions(+)