Skip to content

3.15.0b2 test failures on FreeBSD i386 (in poudriere, on ZFS file system): test.test_os.test_os test_complex test_ctypes (test_shutil reported in a separate issue) #151007

Closed

Description

@mandree

Bug report

Bug description:

I am seeing several test failures on FreeBSD 14.3 i386 but not on 14.3 amd64.

I appreciate FreeBSD is more or less discontinuing i386 support at this point, and I am not sure yet if we are looking at i386 specific failures or if these would also be present in other 32-bit platforms such as ARMv7. See #151019 for ARMv7 test results on FreeBSD 15.1.

It appears that the test.test_os.test_os failure is common to 32-bit platforms i386 and armv7, while the test_complex and test_ctypes failures are NOT observed on ARMv7 but seem specific to i386.
(Also do note I am not testing on the exact same OS version either; i386 is unsupported on FreBSD 15 and newer so has to use 14.X; this is a bit unfortunate because I am turning two knobs at the same time.)

This is in poudriere, a script collection FreeBSD uses to build binary packages from ports, and running atop a ZFS file system mount.

NOTE: the test_shutil failure is not shown in detail here, only in the summaries. I have reported that one separately in #150984 because it also occurs on the Tier-1 amd64 (think x86_64 or x64) platform.

This is the console output from "make test 2>&1", hand-edited to remove most parts from test_shutil (reported sparately) and the boring parts; it has the standard output first, and has the "verbose re-run" parts at the bottom.

===>  Testing for python315-3.15.0.b2
=== NOTE: the py315-* gdbm, sqlite3, tkinter modules must be rebuilt before the test ===
sleep 5
The following modules are *disabled* in configure script:
_gdbm                 _sqlite3              _tkinter           

Checked 116 modules (37 built-in, 75 shared, 1 n/a on freebsd-14.3-RELEASE-p14-i386, 3 disabled, 0 missing, 0 failed on import)
LD_LIBRARY_PATH=/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2 ./python -E ./Tools/build/generate-build-details.py `cat pybuilddir.txt`/build-details.json
LD_LIBRARY_PATH=/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2 ./python -E  -m test --fast-ci -u-gui --timeout= -j13 -x test_gdb
+ ./python -u -W error -bb -E -m test --fast-ci -u-gui --timeout= -j13 -x test_gdb --dont-add-python-opts
== CPython 3.15.0b2 (main, Jun 5 2026, 20:13:01) [Clang 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd7080
== FreeBSD-14.3-RELEASE-p14-i386-32bit-ELF little-endian
== Python build: release shared LTO
== cwd: /wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/build/test_python_worker_529æ
== CPU count: 32
== encodings: locale=UTF-8 FS=utf-8
== resources: all,-cpu,-gui

Using random seed: 1740539547
0:00:00 load avg: 0.01 Run 499 tests in parallel using 13 worker processes (timeout: 10 min, worker timeout: 15 min)

[...]

======================================================================
FAIL: test_truediv (test.test_complex.ComplexTest.test_truediv)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_complex.py", line 177, in test_truediv
    self.assertComplexesAreIdentical(INF/complex(2**1000, 2**-1000),
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                     complex(INF, NAN))
                                     ^^^^^^^^^^^^^^^^^^
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/support/testcase.py", line 65, in assertComplexesAreIdentical
    self.assertFloatsAreIdentical(x.imag, y.imag)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/support/testcase.py", line 53, in assertFloatsAreIdentical
    self.fail(msg.format(x, y))
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^
AssertionError: floats -inf and nan are not identical

----------------------------------------------------------------------
Ran 37 tests in 0.036s

FAILED (failures=1)
test test_complex failed

[...]

======================================================================
FAIL: test_struct_return_2H (test.test_ctypes.test_as_parameter.AsParamNestedWrapperTestCase.test_struct_return_2H)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_ctypes/test_as_parameter.py", line 172, in test_struct_return_2H
    self.assertEqual((s2h.x, s2h.y), (99*2, 88*3))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (-23216, -1) != (198, 264)

First differing element 0:
-23216
198

- (-23216, -1)
+ (198, 264)

======================================================================
FAIL: test_struct_return_2H (test.test_ctypes.test_as_parameter.AsParamPropertyWrapperTestCase.test_struct_return_2H)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_ctypes/test_as_parameter.py", line 172, in test_struct_return_2H
    self.assertEqual((s2h.x, s2h.y), (99*2, 88*3))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (-23200, -1) != (198, 264)

First differing element 0:
-23200
198

- (-23200, -1)
+ (198, 264)

======================================================================
FAIL: test_struct_return_2H (test.test_ctypes.test_as_parameter.AsParamWrapperTestCase.test_struct_return_2H)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_ctypes/test_as_parameter.py", line 172, in test_struct_return_2H
    self.assertEqual((s2h.x, s2h.y), (99*2, 88*3))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (-23200, -1) != (198, 264)

First differing element 0:
-23200
198

- (-23200, -1)
+ (198, 264)

======================================================================
FAIL: test_struct_return_2H (test.test_ctypes.test_as_parameter.BasicWrapTestCase.test_struct_return_2H)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_ctypes/test_as_parameter.py", line 172, in test_struct_return_2H
    self.assertEqual((s2h.x, s2h.y), (99*2, 88*3))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (-23200, -1) != (198, 264)

First differing element 0:
-23200
198

- (-23200, -1)
+ (198, 264)

======================================================================
FAIL: test_struct_return_2H (test.test_ctypes.test_functions.FunctionTestCase.test_struct_return_2H)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_ctypes/test_functions.py", line 407, in test_struct_return_2H
    self.assertEqual((s2h.x, s2h.y), (99*2, 88*3))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (-23216, -1) != (198, 264)

First differing element 0:
-23216
198

- (-23216, -1)
+ (198, 264)

======================================================================
FAIL: test_pass_by_value_in_register (test.test_ctypes.test_structures.StructureTestCase.test_pass_by_value_in_register)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_ctypes/test_structures.py", line 299, in test_pass_by_value_in_register
    self.assertEqual(s.first, got.first)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
AssertionError: 3735928559 != 4294944080

----------------------------------------------------------------------
Ran 619 tests in 1.114s

FAILED (failures=6, skipped=55)
test test_ctypes failed

[...]

======================================================================
ERROR: test_headers_overflow_32bits (test.test_os.test_os.TestSendfile.test_headers_overflow_32bits)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/asyncio/runners.py", line 127, in run
    return self._loop.run_until_complete(task)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/asyncio/base_events.py", line 724, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_os/test_os.py", line 3792, in test_headers_overflow_32bits
    self.server.handler_instance.accumulate = False
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Server' object has no attribute 'handler_instance'

======================================================================
ERROR: test_trailers_overflow_32bits (test.test_os.test_os.TestSendfile.test_trailers_overflow_32bits)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/asyncio/runners.py", line 127, in run
    return self._loop.run_until_complete(task)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/asyncio/base_events.py", line 724, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_os/test_os.py", line 3801, in test_trailers_overflow_32bits
    self.server.handler_instance.accumulate = False
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Server' object has no attribute 'handler_instance'

----------------------------------------------------------------------
Ran 361 tests in 12.772s

FAILED (errors=2, skipped=38)
test test.test_os.test_os failed

[...]

== Tests result: FAILURE ==

[...]

0:01:37 load avg: 4.13 [1/4/1] test_complex failed (1 failure)
Re-running test_complex in verbose mode (matching: test_truediv)
test_truediv (test.test_complex.ComplexTest.test_truediv) ... FAIL

======================================================================
FAIL: test_truediv (test.test_complex.ComplexTest.test_truediv)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_complex.py", line 177, in test_truediv
    self.assertComplexesAreIdentical(INF/complex(2**1000, 2**-1000),
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                     complex(INF, NAN))
                                     ^^^^^^^^^^^^^^^^^^
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/support/testcase.py", line 65, in assertComplexesAreIdentical
    self.assertFloatsAreIdentical(x.imag, y.imag)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/support/testcase.py", line 53, in assertFloatsAreIdentical
    self.fail(msg.format(x, y))
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^
AssertionError: floats -inf and nan are not identical

----------------------------------------------------------------------
Ran 1 test in 0.019s

FAILED (failures=1)
test test_complex failed
0:01:37 load avg: 4.13 [2/4/2] test.test_os.test_os failed (2 errors)
Re-running test.test_os.test_os in verbose mode (matching: test_headers_overflow_32bits, test_trailers_overflow_32bits)
test_headers_overflow_32bits (test.test_os.test_os.TestSendfile.test_headers_overflow_32bits) ... ERROR
test_trailers_overflow_32bits (test.test_os.test_os.TestSendfile.test_trailers_overflow_32bits) ... ERROR

======================================================================
ERROR: test_headers_overflow_32bits (test.test_os.test_os.TestSendfile.test_headers_overflow_32bits)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/asyncio/runners.py", line 127, in run
    return self._loop.run_until_complete(task)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/asyncio/base_events.py", line 724, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_os/test_os.py", line 3792, in test_headers_overflow_32bits
    self.server.handler_instance.accumulate = False
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Server' object has no attribute 'handler_instance'

======================================================================
ERROR: test_trailers_overflow_32bits (test.test_os.test_os.TestSendfile.test_trailers_overflow_32bits)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/asyncio/runners.py", line 127, in run
    return self._loop.run_until_complete(task)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/asyncio/base_events.py", line 724, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_os/test_os.py", line 3801, in test_trailers_overflow_32bits
    self.server.handler_instance.accumulate = False
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Server' object has no attribute 'handler_instance'

----------------------------------------------------------------------
Ran 2 tests in 0.016s

FAILED (errors=2)
test test.test_os.test_os failed
0:01:37 load avg: 4.13 [3/4/3] test_ctypes failed (6 failures)
Re-running test_ctypes in verbose mode (matching: test_struct_return_2H, test_struct_return_2H, test_struct_return_2H, test_struct_return_2H, test_struct_return_2H, test_pass_by_value_in_register)
test_struct_return_2H (test.test_ctypes.test_as_parameter.AsParamNestedWrapperTestCase.test_struct_return_2H) ... FAIL
test_struct_return_2H (test.test_ctypes.test_as_parameter.AsParamPropertyWrapperTestCase.test_struct_return_2H) ... FAIL
test_struct_return_2H (test.test_ctypes.test_as_parameter.AsParamWrapperTestCase.test_struct_return_2H) ... FAIL
test_struct_return_2H (test.test_ctypes.test_as_parameter.BasicWrapTestCase.test_struct_return_2H) ... FAIL
test_struct_return_2H (test.test_ctypes.test_functions.FunctionTestCase.test_struct_return_2H) ... FAIL
test_pass_by_value_in_register (test.test_ctypes.test_structures.StructureTestCase.test_pass_by_value_in_register) ... FAIL

======================================================================
FAIL: test_struct_return_2H (test.test_ctypes.test_as_parameter.AsParamNestedWrapperTestCase.test_struct_return_2H)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_ctypes/test_as_parameter.py", line 172, in test_struct_return_2H
    self.assertEqual((s2h.x, s2h.y), (99*2, 88*3))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (-23712, -1) != (198, 264)

First differing element 0:
-23712
198

- (-23712, -1)
+ (198, 264)

======================================================================
FAIL: test_struct_return_2H (test.test_ctypes.test_as_parameter.AsParamPropertyWrapperTestCase.test_struct_return_2H)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_ctypes/test_as_parameter.py", line 172, in test_struct_return_2H
    self.assertEqual((s2h.x, s2h.y), (99*2, 88*3))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (-23696, -1) != (198, 264)

First differing element 0:
-23696
198

- (-23696, -1)
+ (198, 264)

======================================================================
FAIL: test_struct_return_2H (test.test_ctypes.test_as_parameter.AsParamWrapperTestCase.test_struct_return_2H)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_ctypes/test_as_parameter.py", line 172, in test_struct_return_2H
    self.assertEqual((s2h.x, s2h.y), (99*2, 88*3))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (-23696, -1) != (198, 264)

First differing element 0:
-23696
198

- (-23696, -1)
+ (198, 264)

======================================================================
FAIL: test_struct_return_2H (test.test_ctypes.test_as_parameter.BasicWrapTestCase.test_struct_return_2H)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_ctypes/test_as_parameter.py", line 172, in test_struct_return_2H
    self.assertEqual((s2h.x, s2h.y), (99*2, 88*3))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (-23696, -1) != (198, 264)

First differing element 0:
-23696
198

- (-23696, -1)
+ (198, 264)

======================================================================
FAIL: test_struct_return_2H (test.test_ctypes.test_functions.FunctionTestCase.test_struct_return_2H)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_ctypes/test_functions.py", line 407, in test_struct_return_2H
    self.assertEqual((s2h.x, s2h.y), (99*2, 88*3))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (-23712, -1) != (198, 264)

First differing element 0:
-23712
198

- (-23712, -1)
+ (198, 264)

======================================================================
FAIL: test_pass_by_value_in_register (test.test_ctypes.test_structures.StructureTestCase.test_pass_by_value_in_register)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python315/work/Python-3.15.0b2/Lib/test/test_ctypes/test_structures.py", line 299, in test_pass_by_value_in_register
    self.assertEqual(s.first, got.first)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
AssertionError: 3735928559 != 4294943584

----------------------------------------------------------------------
Ran 6 tests in 0.010s

FAILED (failures=6)
test test_ctypes failed

[...]

4 tests failed again:
    test.test_os.test_os test_complex test_ctypes test_shutil

== Tests result: FAILURE then FAILURE ==

10 slowest tests:
- test.test_multiprocessing_spawn.test_processes: 35.8 sec
- test.test_concurrent_futures.test_process_pool: 33.6 sec
- test_socket: 32.7 sec
- test.test_multiprocessing_forkserver.test_processes: 31.5 sec
- test_xmlrpc: 27.8 sec
- test.test_io.test_signals: 24.6 sec
- test.test_multiprocessing_spawn.test_misc: 22.7 sec
- test.test_multiprocessing_forkserver.test_misc: 22.3 sec
- test_imaplib: 21.5 sec
- test_logging: 20.1 sec

29 tests skipped:
    test.test_asyncio.test_windows_events
    test.test_asyncio.test_windows_utils test.test_os.test_windows
    test_android test_apple test_dbm_gnu test_dbm_sqlite3 test_devpoll
    test_epoll test_free_threading test_idle test_launcher test_msvcrt
    test_perf_profiler test_perfmaps test_remote_pdb
    test_samply_profiler test_sqlite3 test_startfile test_tcl
    test_tkinter test_ttk test_ttk_textonly test_turtle test_winapi
    test_winconsoleio test_winreg test_winsound test_wmi

3 tests skipped (resource denied):
    test_peg_generator test_xpickle test_zipfile64

4 re-run tests:
    test.test_os.test_os test_complex test_ctypes test_shutil

4 tests failed:
    test.test_os.test_os test_complex test_ctypes test_shutil

463 tests OK.

Total duration: 1 min 38 sec
Total tests: run=49,372 failures=14 skipped=2,719
Total test files: run=500/499 failed=4 skipped=29 resource_denied=3 rerun=4
Result: FAILURE then FAILURE
gmake: *** [Makefile:2514: test] Error 2
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/python315

The same content is also attached:
test.log

CPython versions tested on:

3.15

Operating systems tested on:

Other

Activity

  1. added
    type-bug
    on Jun 6, 2026
  2. changed the title [-]3.15.0b2 test failures on FreeBSD i386 (in poudriere, on ZFS file system)[/-] [+]3.15.0b2 test failures on FreeBSD i386 (in poudriere, on ZFS file system): test.test_os.test_os test_complex test_ctypes (test_shutil reported in a separate issue)[/+] on Jun 6, 2026
  3. added
    tests
    on Jun 6, 2026
  4. vstinner commented on Jun 8, 2026

    @vstinner
    Member

    I cannot reproduce test_complex failures on 32-bit FreeBSD, on FreeBSD x64-64 in 32-bit using: ./configure --with-pydebug CFLAGS=-m32 LDFLAGS=-m32. See #151019 (comment).

    I appreciate FreeBSD is more or less discontinuing i386 support at this point

    So why do you report issues specific to 32-bit systems if it's no longer supported?

  5. mandree commented on Jun 8, 2026

    @mandree
    Author

    @vstinner wrote:

    I cannot reproduce test_complex failures on 32-bit FreeBSD, on FreeBSD x64-64 in 32-bit using: ./configure --with-pydebug CFLAGS=-m32 LDFLAGS=-m32. See #151019 (comment).

    I appreciate FreeBSD is more or less discontinuing i386 support at this point

    So why do you report issues specific to 32-bit systems if it's no longer supported?

    "Is discontinuing" does not imply that it's a thing of the past, FreeBSD 14.4 is slated to remain supported until the end of the year 2026, as a "Tier 2" level for i386, see https://www.freebsd.org/platforms/ and https://www.freebsd.org/security/#sup .

    If the Python project were to choose to not waste time on three months of supporting FreeBSD 14.4-on-i386 (between the 3.15 release in October-ish and the FreeBSD 14.4 EOL end of 2026, when FreeBSD pulls the plug on i386 support), that would be a fair point, but I am unaware of such decisions. Please point me to them if they were made, then we'll just set IGNORE_i386 in the Python 3.15 port and move on without wasting more time and energy on builds and reports.

    Also, running "-m32" compiled stuff on a 64-bit host isn't the same as running stuff compiled by a true i386 compiler in a jail. What I am doing with poudriere will more authentically reproduce what people compiling Python 3.15 do.

  6. mandree commented on Jun 8, 2026

    @mandree
    Author

    Re test_complex: Toyed around with compiler options and looking at predefined macros.
    Turns out test_complex is sensitive to the exact float-point maths instruction set; x86 gets to choose between 387 and SSE.

    Adding -msse2 lets test_complex pass for me, so the qualified guess is that the failing part float('inf')/complex(2**1000, 2**-1000) yields some inf instead of nan on 387 FP math due to its higher internal precision (80 bits; SSE has 64), or due to different exception/overflow/underflow behavior.

    @vstinner also note that cc (which is clang on FreeBSD) and GCC defaults for SSE/SSE2 appear to differ. cc default-disables SSE, gcc -m32 enables it, and Python's ./configure, due to its autoconf nature, prefers gcc over cc, so at the very least you would have to add CC=cc to your configuration: ./configure --with-pydebug CFLAGS=-m32 LDFLAGS=-m32 CC=cc to select the right compiler on FreeBSD, and possibly CC=clang19 or CC=clang-19 or CC=clang elsewhere.

    This is on FreeBSD 15.1-RC3 amd64 (the host):

    $ cc -m32 -dM -xc -E - </dev/null | egrep -i math\|sse
    #define __FINITE_MATH_ONLY__ 0
    #define __NO_MATH_ERRNO__ 1
    #define __NO_MATH_INLINES 1
    $ cc --version
    FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2)
    Target: x86_64-unknown-freebsd15.1
    ...
    $ gcc -m32 -dM -xc -E - </dev/null | egrep -i math\|sse
    #define __FINITE_MATH_ONLY__ 0
    #define __SSE__ 1
    #define __SSE2__ 1
    $ gcc --version
    gcc (FreeBSD Ports Collection) 14.2.0
    ...
    

    This is how the compiler pre-defines macros on i386 (same host, but inside a pure-i386 jail, so no -m32 tricks required, and older FreeBSD version 14.3):

    root@143i386-default:/usr/ports/lang/python315 # cc -msse2 -dM -xc -E - </dev/null | egrep -i math\|sse\|87
    #define __FINITE_MATH_ONLY__ 0
    #define __NO_MATH_ERRNO__ 1
    #define __NO_MATH_INLINES 1
    #define __SSE2_MATH__ 1
    #define __SSE2__ 1
    #define __SSE_MATH__ 1
    #define __SSE__ 1
    
    root@143i386-default:/usr/ports/lang/python315 # cc -dM -xc -E - </dev/null | egrep -i math\|sse\|87
    #define __FINITE_MATH_ONLY__ 0
    #define __NO_MATH_ERRNO__ 1
    #define __NO_MATH_INLINES 1
    
    root@143i386-default:/usr/ports/lang/python315 # cc --version
    FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2)
    Target: i386-unknown-freebsd14.3
    Thread model: posix
    InstalledDir: /usr/bin
    

    Re test_ctypes, I could report FreeBSD currently carries libffi-3.5.2, but other than that I don't have worthwhile and low-effort ideas to pursue right now.

  7. vstinner commented on Jun 9, 2026

    @vstinner
    Member

    "Is discontinuing" does not imply that it's a thing of the past, FreeBSD 14.4 is slated to remain supported until the end of the year 2026, as a "Tier 2" level for i386, see https://www.freebsd.org/platforms/ and https://www.freebsd.org/security/#sup .

    I don't think that it's worth it to invest time in supporting a platform in Python which is not currently supported (well, multiple tests fail, there is no Python CI running on it), if the upstream support ends at the end of 2026 (in 7 months).

    If the Python project were to choose to not waste time on three months of supporting FreeBSD 14.4-on-i386 (between the 3.15 release in October-ish and the FreeBSD 14.4 EOL end of 2026, when FreeBSD pulls the plug on i386 support), that would be a fair point, but I am unaware of such decisions. Please point me to them if they were made, then we'll just set IGNORE_i386 in the Python 3.15 port and move on without wasting more time and energy on builds and reports.

    Currently, only x86-64 FreeBSD is supported as Tier 3 (using clang): https://peps.python.org/pep-0011/#tier-3

    If you propose small patches fixing your issues, I can consider reviewing them. "Best effort" support.

    Also, running "-m32" compiled stuff on a 64-bit host isn't the same as running stuff compiled by a true i386 compiler in a jail. What I am doing with poudriere will more authentically reproduce what people compiling Python 3.15 do.

    Well, I'm not interested to set up "poudriere" on my FreeBSD VM to investigate these issues. I usually use this VM to debug issues on x86-64.

  8. mandree commented on Jun 9, 2026

    @mandree
    Author

    OK, let's not waste more time on FreeBSD i386 matters then. My recommendation is that the FreeBSD python315 port changes from "BROKEN_i386" to "IGNORE_i386" to make clear that it's not going to appear and the breakage isn't going to be temporary but permanent.

    https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295967

  9. vstinner commented on Jun 10, 2026

    @vstinner
    Member

    Ok, that's a reasonable resolution for FreeBSD i386.

    In the meanwhile, you can browse open FreeBSD issues and try to help fixing some of them :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-freebsdteststype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions