Skip to content

Wrong float4 struct pack on ppc64le and musl-based linux. #92826

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

Closed
dvarrazzo opened this issue May 15, 2022 · 13 comments
Closed

Wrong float4 struct pack on ppc64le and musl-based linux. #92826

dvarrazzo opened this issue May 15, 2022 · 13 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@dvarrazzo
Copy link

dvarrazzo commented May 15, 2022

Normally: struct.Struct('!f').pack(1.0).hex() = 3f800000
On musllinux ppc64le, struct.Struct('!f').pack(1.0).hex() = 00000000

Example working manylinux run
Example broken musllinux run

The architecture is the same for both the runs. Reproducible on Python 3.6-3.10.

See psycopg/psycopg#304
Reported to the Alpine project at https://gitlab.alpinelinux.org/alpine/aports/-/issues/13811

@mdickinson
Copy link
Member

What does float.__getformat__("float") give on this system?

@mdickinson
Copy link
Member

What does float.__getformat__("float") give on this system?

And the reason for asking: if the above is not returning "unknown", then this is the relevant code for converting a double value x to a sequence of four bytes:

cpython/Objects/floatobject.c

Lines 2263 to 2282 in 9d38120

float y = (float)x;
int i, incr = 1;
if (Py_IS_INFINITY(y) && !Py_IS_INFINITY(x))
goto Overflow;
unsigned char s[sizeof(float)];
memcpy(s, &y, sizeof(float));
if ((float_format == ieee_little_endian_format && !le)
|| (float_format == ieee_big_endian_format && le)) {
p += 3;
incr = -1;
}
for (i = 0; i < 4; i++) {
*p = s[i];
p += incr;
}
return 0;

If you have the facilities to debug on the target machine, that would be the starting point to look at. I'd want to double-check that sizeof(float) really is 4, and that the memcpy is doing the expected thing.

@mdickinson
Copy link
Member

One more question: after x = float.fromhex("0x0.23456789abcde"), what does struct.Struct('!f').pack(x) give?

@dvarrazzo
Copy link
Author

Requested info at https://github.com/psycopg/psycopg/runs/6607562276?check_suite_focus=true#step:6:437:

  float.__getformat__('float')='IEEE, little-endian'
  struct.Struct('!f').pack(x)=b'\x00\x00\x00\x00'

@mdickinson
Copy link
Member

Thanks. The first is what I was expecting (or at least hoping for). That second result is interesting - I was expecting to at least see a subset of the bytes of either the original double value or the converted float.

Staring at the code, I'm having a hard time seeing what could be wrong. Is it possible that there's a compiler or libc bug? Are you in a position to test with a version of Python compiled without the -O3 flag?

@mdickinson
Copy link
Member

@tiran Do I recall correctly that you have some familiarity with musl-based Linux distros? If so, any ideas what might be going wrong here?

@tiran
Copy link
Member

tiran commented May 26, 2022

I'm neither an Alpine expert nor a heavy user of Alpine Linux. All I did was founding a couple of problems with musl libc implementation. By the way, Alpine is still an unsupported platform. Python upstream does not support it because it has known bugs and we lack a stable build bot.

Anyhow I can reproduce the issue with Alpine container image, podman, and qemu-static:

$ podman run -ti --rm --platform linux/ppc64le alpine
/ # apk add python3
/ # python3
Python 3.10.4 (main, Apr 30 2022, 16:49:16) [GCC 11.2.1 20220219] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import struct
>>> struct.Struct('!f').pack(1.0).hex()
'00000000'

The same code works on emulated PPC64 LE Fedora:

$ podman run -ti --rm --platform linux/ppc64le fedora
# python3
Python 3.10.2 (main, Jan 17 2022, 00:00:00) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import struct
>>> struct.Struct('!f').pack(1.0).hex()
'3f800000'

@tiran
Copy link
Member

tiran commented May 26, 2022

It looks like a compiler or libc bug on Alpine:

/ # gcc -O0 floatpack.c -o floatpack && ./floatpack 1
1.000000
3f800000
/ # gcc -O1 floatpack.c -o floatpack && ./floatpack 1
1.000000
30303030
/ # gcc -O3 floatpack.c -o floatpack && ./floatpack 1
1.000000
30303030
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char **argv) {
    double d = atof(argv[1]);
    printf("%f\n", d);

    float y = (float)d;
    unsigned char s[sizeof(float)];
    memcpy(s, &y, sizeof(float));
    printf("%02x%02x%02x%02x\n", s[3], s[2], s[1], s[0]);
    return 0;
}
/ # gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc64le-alpine-linux-musl/11.2.1/lto-wrapper
Target: powerpc64le-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-11.2.1_git20220219/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=powerpc64le-alpine-linux-musl --host=powerpc64le-alpine-linux-musl --target=powerpc64le-alpine-linux-musl --with-pkgversion='Alpine 11.2.1_git20220219' --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-default-pie --enable-default-ssp --enable-cloog-backend --enable-languages=c,c++,objc,go,fortran,ada,jit --with-abi=elfv2 --enable-secureplt --enable-decimal-float=no --enable-targets=powerpcle-linux --disable-libquadmath --disable-libssp --disable-libmpx --disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads --enable-tls --enable-host-shared --with-system-zlib --with-linker-hash-style=gnu
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.1 20220219 (Alpine 11.2.1_git20220219) 

@mdickinson
Copy link
Member

Many thanks, @tiran. Looks like there's not a lot CPython can or should do here, then.

@dvarrazzo Okay to close here? (It may be worth copying @tiran's reproducer to the Alpine bug report, though.)

@dvarrazzo
Copy link
Author

@mdickinson that's ok for me, thank you for helping to restrict the cause of the problem. Yes, I will update Alpine folks about the developments here.

As far as psycopg is concerned, we are ok: we have a way to detect the issue and a workaround.

Maybe you can incentivize Alpine linux to provide a solution by adding a failing test in the CPython test suite?

@mdickinson
Copy link
Member

adding a failing test in the CPython test suite

Yes, we should definitely have a test; I'd be a bit surprised (and disturbed) if we're not exercising this code in the existing test suite. I'll check.

@tiran
Copy link
Member

tiran commented May 27, 2022

Maybe you can incentivize Alpine linux to provide a solution by adding a failing test in the CPython test suite?

Python's struct tests are failing on Alpine PPC64LE. This starts to look like a QA problem on Alpine's side. We really need some engineers from Alpine and musl to address the musl libc bugs from #90548 and then stable buildbots that run Python builds + tests on platforms supported by Alpine.

/ # apk add python3 python3-tests
/ # python3 -m test -w test_struct
0:00:00 load avg: 2.00 Run tests sequentially
0:00:00 load avg: 2.00 [1/1] test_struct
test test_struct failed -- multiple errors occurred; run in verbose mode for details
test_struct failed (3 failures)

== Tests result: FAILURE ==

1 test failed:
    test_struct
0:00:08 load avg: 2.36
0:00:08 load avg: 2.36 Re-running failed tests in verbose mode
0:00:08 load avg: 2.36 Re-running test_struct in verbose mode (matching: test_705836, test_new_features, test_transitiveness)
test_705836 (test.test_struct.StructTest) ... FAIL
test_new_features (test.test_struct.StructTest) ... FAIL
test_transitiveness (test.test_struct.StructTest) ... FAIL

======================================================================
FAIL: test_705836 (test.test_struct.StructTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/test/test_struct.py", line 367, in test_705836
    self.assertEqual(base, unpacked)
AssertionError: 1 != 0.0

======================================================================
FAIL: test_new_features (test.test_struct.StructTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/test/test_struct.py", line 129, in test_new_features
    self.assertEqual(res, exp)
AssertionError: b'\x00\x00\x00\x00' != b'@\x00\x00\x00'

======================================================================
FAIL: test_transitiveness (test.test_struct.StructTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/test/test_struct.py", line 78, in test_transitiveness
    self.assertEqual(int(100 * fp), int(100 * f))
AssertionError: 0 != 314

----------------------------------------------------------------------
Ran 3 tests in 0.026s

FAILED (failures=3)
test test_struct failed
1 test failed again:
    test_struct

== Tests result: FAILURE then FAILURE ==

1 test failed:
    test_struct

1 re-run test:
    test_struct

Total duration: 8.6 sec
Tests result: FAILURE then FAILURE
/ # python3 -m test.pythoninfo
Python debug information
========================

CC.version: gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219
Py_DEBUG: No (sys.gettotalrefcount() missing)
_decimal.__libmpdec_version__: 2.5.1
builtins.float.double_format: IEEE, little-endian
builtins.float.float_format: IEEE, little-endian
config[_config_init]: 2
config[_init_main]: 1
config[_install_importlib]: 1
config[_isolated_interpreter]: 0
config[argv]: ['-m']
config[base_exec_prefix]: '/usr'
config[base_executable]: '/usr/bin/python3'
config[base_prefix]: '/usr'
config[buffered_stdio]: 1
config[bytes_warning]: 0
config[check_hash_pycs_mode]: 'default'
config[configure_c_stdio]: 1
config[dev_mode]: 0
config[dump_refs]: 0
config[exec_prefix]: '/usr'
config[executable]: '/usr/bin/python3'
config[faulthandler]: 0
config[filesystem_encoding]: 'utf-8'
config[filesystem_errors]: 'surrogateescape'
config[hash_seed]: 0
config[home]: None
config[import_time]: 0
config[inspect]: 0
config[install_signal_handlers]: 1
config[interactive]: 0
config[isolated]: 0
config[malloc_stats]: 0
config[module_search_paths]: ['/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload']
config[module_search_paths_set]: 1
config[optimization_level]: 0
config[orig_argv]: ['/usr/bin/python3', '-m', 'test.pythoninfo']
config[parse_argv]: 2
config[parser_debug]: 0
config[pathconfig_warnings]: 1
config[platlibdir]: 'lib'
config[prefix]: '/usr'
config[program_name]: '/usr/bin/python3'
config[pycache_prefix]: None
config[pythonpath_env]: None
config[quiet]: 0
config[run_command]: None
config[run_filename]: None
config[run_module]: 'test.pythoninfo'
config[show_ref_count]: 0
config[site_import]: 1
config[skip_source_first_line]: 0
config[stdio_encoding]: 'utf-8'
config[stdio_errors]: 'surrogateescape'
config[tracemalloc]: 0
config[use_environment]: 1
config[use_hash_seed]: 0
config[user_site_directory]: 1
config[verbose]: 0
config[warn_default_encoding]: 0
config[warnoptions]: []
config[write_bytecode]: 1
config[xoptions]: []
datetime.datetime.now: 2022-05-27 12:50:34.114453
expat.EXPAT_VERSION: expat_2.4.8
fips.linux_crypto_fips_enabled: 0
fips.openssl_fips_mode: 0
gdbm.GDBM_VERSION: 1.23.0
global_config[Py_BytesWarningFlag]: 0
global_config[Py_DebugFlag]: 0
global_config[Py_DontWriteBytecodeFlag]: 0
global_config[Py_FileSystemDefaultEncodeErrors]: 'surrogateescape'
global_config[Py_FileSystemDefaultEncoding]: 'utf-8'
global_config[Py_FrozenFlag]: 0
global_config[Py_HasFileSystemDefaultEncoding]: 0
global_config[Py_HashRandomizationFlag]: 1
global_config[Py_IgnoreEnvironmentFlag]: 0
global_config[Py_InspectFlag]: 0
global_config[Py_InteractiveFlag]: 0
global_config[Py_IsolatedFlag]: 0
global_config[Py_NoSiteFlag]: 0
global_config[Py_NoUserSiteDirectory]: 0
global_config[Py_OptimizeFlag]: 0
global_config[Py_QuietFlag]: 0
global_config[Py_UTF8Mode]: 0
global_config[Py_UnbufferedStdioFlag]: 0
global_config[Py_VerboseFlag]: 0
global_config[_Py_HasFileSystemDefaultEncodeErrors]: 0
locale.encoding: UTF-8
os.cpu_count: 8
os.environ[HOME]: /root
os.environ[PATH]: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
os.environ[TERM]: xterm
os.getcwd: /
os.getegid: 0
os.geteuid: 0
os.getgid: 0
os.getgrouplist: 0, 0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27
os.getgroups: 0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27
os.getloadavg: (1.5400390625, 1.3583984375, 0.86328125)
os.getrandom: ready (initialized)
os.getresgid: (0, 0, 0)
os.getresuid: (0, 0, 0)
os.getuid: 0
os.name: posix
os.supports_bytes_environ: True
os.supports_effective_ids: ['access']
os.supports_fd: ['chdir', 'chmod', 'chown', 'execve', 'listdir', 'pathconf', 'scandir', 'stat', 'statvfs', 'truncate', 'utime']
os.supports_follow_symlinks: ['access', 'chown', 'link', 'stat', 'utime']
os.umask: 0o022
os.uname: posix.uname_result(sysname='Linux', nodename='056c882c7eb2', release='5.17.7-300.fc36.x86_64', version='#1 SMP PREEMPT Thu May 12 14:56:44 UTC 2022', machine='ppc64le')
path_config[exec_prefix]: '/usr'
path_config[home]: None
path_config[module_search_path]: '/usr/lib/python310.zip:/usr/lib/python3.10:/usr/lib/python3.10/lib-dynload'
path_config[prefix]: '/usr'
path_config[program_full_path]: '/usr/bin/python3'
path_config[program_name]: '/usr/bin/python3'
platform.architecture: 64bit
platform.platform: Linux-5.17.7-300.fc36.x86_64-ppc64le-with
platform.python_implementation: CPython
pre_config[_config_init]: 2
pre_config[allocator]: 0
pre_config[coerce_c_locale]: 0
pre_config[coerce_c_locale_warn]: 0
pre_config[configure_locale]: 1
pre_config[dev_mode]: 0
pre_config[isolated]: 0
pre_config[parse_argv]: 1
pre_config[use_environment]: 1
pre_config[utf8_mode]: 0
pwd.getpwuid(0): pwd.struct_passwd(pw_name='root', pw_passwd='x', pw_uid=0, pw_gid=0, pw_gecos='root', pw_dir='/root', pw_shell='/bin/ash')
pymem.allocator: pymalloc
pymem.with_pymalloc: True
readline._READLINE_LIBRARY_VERSION: 8.1
readline._READLINE_RUNTIME_VERSION: 0x801
readline._READLINE_VERSION: 0x801
resource.RLIMIT_AS: (-1, -1)
resource.RLIMIT_CORE: (-1, -1)
resource.RLIMIT_CPU: (-1, -1)
resource.RLIMIT_DATA: (-1, -1)
resource.RLIMIT_FSIZE: (-1, -1)
resource.RLIMIT_MEMLOCK: (8388608, 8388608)
resource.RLIMIT_MSGQUEUE: (819200, 819200)
resource.RLIMIT_NICE: (0, 0)
resource.RLIMIT_NOFILE: (1048576, 1048576)
resource.RLIMIT_NPROC: (63326, 63326)
resource.RLIMIT_RSS: (-1, -1)
resource.RLIMIT_RTPRIO: (0, 0)
resource.RLIMIT_RTTIME: (-1, -1)
resource.RLIMIT_SIGPENDING: (63326, 63326)
resource.RLIMIT_STACK: (8388608, -1)
resource.pagesize: 4096
socket.hostname: 056c882c7eb2
sqlite3.sqlite_version: 3.38.5
sqlite3.version: 2.6.0
ssl.HAS_SNI: True
ssl.OPENSSL_VERSION: OpenSSL 1.1.1o  3 May 2022
ssl.OPENSSL_VERSION_INFO: (1, 1, 1, 15, 15)
ssl.OP_ALL: 0x80000054
ssl.OP_NO_TLSv1_1: 0x10000000
ssl.SSLContext.maximum_version: TLSVersion.MAXIMUM_SUPPORTED
ssl.SSLContext.minimum_version: TLSVersion.TLSv1_2
ssl.SSLContext.options: Options.OP_ALL|OP_NO_SSLv3|OP_CIPHER_SERVER_PREFERENCE|OP_ENABLE_MIDDLEBOX_COMPAT|OP_NO_COMPRESSION
ssl.SSLContext.protocol: _SSLMethod.PROTOCOL_TLS_CLIENT
ssl.SSLContext.verify_mode: VerifyMode.CERT_REQUIRED
ssl.default_https_context.maximum_version: TLSVersion.MAXIMUM_SUPPORTED
ssl.default_https_context.minimum_version: TLSVersion.TLSv1_2
ssl.default_https_context.options: Options.OP_ALL|OP_NO_SSLv3|OP_CIPHER_SERVER_PREFERENCE|OP_ENABLE_MIDDLEBOX_COMPAT|OP_NO_COMPRESSION
ssl.default_https_context.protocol: _SSLMethod.PROTOCOL_TLS_CLIENT
ssl.default_https_context.verify_mode: VerifyMode.CERT_REQUIRED
ssl.stdlib_context.maximum_version: TLSVersion.MAXIMUM_SUPPORTED
ssl.stdlib_context.minimum_version: TLSVersion.TLSv1_2
ssl.stdlib_context.options: Options.OP_ALL|OP_NO_SSLv3|OP_CIPHER_SERVER_PREFERENCE|OP_ENABLE_MIDDLEBOX_COMPAT|OP_NO_COMPRESSION
ssl.stdlib_context.protocol: _SSLMethod.PROTOCOL_TLS_CLIENT
ssl.stdlib_context.verify_mode: VerifyMode.CERT_NONE
subprocess._USE_POSIX_SPAWN: False
sys.api_version: 1013
sys.builtin_module_names: ('_abc', '_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype')
sys.byteorder: little
sys.dont_write_bytecode: False
sys.executable: /usr/bin/python3
sys.filesystem_encoding: utf-8/surrogateescape
sys.flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0, dev_mode=False, utf8_mode=0, warn_default_encoding=0)
sys.float_info: sys.float_info(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, min=2.2250738585072014e-308, min_exp=-1021, min_10_exp=-307, dig=15, mant_dig=53, epsilon=2.220446049250313e-16, radix=2, rounds=1)
sys.float_repr_style: short
sys.hash_info: sys.hash_info(width=64, modulus=2305843009213693951, inf=314159, nan=0, imag=1000003, algorithm='siphash24', hash_bits=64, seed_bits=128, cutoff=0)
sys.hexversion: 50988272
sys.implementation: namespace(name='cpython', cache_tag='cpython-310', version=sys.version_info(major=3, minor=10, micro=4, releaselevel='final', serial=0), hexversion=50988272, _multiarch='powerpc64le-linux-gnu')
sys.int_info: sys.int_info(bits_per_digit=30, sizeof_digit=4)
sys.maxsize: 9223372036854775807
sys.maxunicode: 1114111
sys.path: ['/', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/usr/lib/python3.10/site-packages']
sys.platform: linux
sys.platlibdir: lib
sys.prefix: /usr
sys.stderr.encoding: utf-8/backslashreplace
sys.stdin.encoding: utf-8/surrogateescape
sys.stdout.encoding: utf-8/surrogateescape
sys.thread_info: sys.thread_info(name='pthread', lock='semaphore', version=None)
sys.version: 3.10.4 (main, Apr 30 2022, 16:49:16) [GCC 11.2.1 20220219]
sys.version_info: sys.version_info(major=3, minor=10, micro=4, releaselevel='final', serial=0)
sysconfig[CCSHARED]: -fPIC
sysconfig[CC]: gcc
sysconfig[CFLAGSFORSHARED]: -fPIC
sysconfig[CFLAGS]: -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fomit-frame-pointer -g -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x200000
sysconfig[CONFIG_ARGS]: '--build=powerpc64le-alpine-linux-musl' '--host=powerpc64le-alpine-linux-musl' '--prefix=/usr' '--enable-ipv6' '--enable-loadable-sqlite-extensions' '--enable-optimizations' '--enable-shared' '--with-lto' '--with-computed-gotos' '--with-dbmliborder=gdbm:ndbm' '--with-system-expat' '--with-system-ffi' '--with-system-libmpdec' '--without-ensurepip' '--with-bluetoothdir=/home/buildozer/aports/main/python3/src/bluez-5.64' 'build_alias=powerpc64le-alpine-linux-musl' 'host_alias=powerpc64le-alpine-linux-musl' 'CC=gcc' 'CFLAGS= -fomit-frame-pointer -g' 'CPPFLAGS=-Os -fomit-frame-pointer'
sysconfig[HOST_GNU_TYPE]: powerpc64le-alpine-linux-musl
sysconfig[MACHDEP]: linux
sysconfig[MULTIARCH]: powerpc64le-linux-gnu
sysconfig[OPT]: -DNDEBUG -g -fwrapv -O3 -Wall
sysconfig[PY_CFLAGS]: -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fomit-frame-pointer -g -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x200000
sysconfig[PY_CFLAGS_NODIST]: -fno-semantic-interposition -flto=4 -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-use -fprofile-correction -I./Include/internal
sysconfig[PY_CORE_LDFLAGS]: -fno-semantic-interposition -flto=4 -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g
sysconfig[PY_LDFLAGS_NODIST]: -fno-semantic-interposition -flto=4 -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g
sysconfig[PY_STDMODULE_CFLAGS]: -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fomit-frame-pointer -g -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x200000 -fno-semantic-interposition -flto=4 -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-use -fprofile-correction -I./Include/internal -I. -I./Include -Os -fomit-frame-pointer -Os -fomit-frame-pointer -fPIC
sysconfig[Py_DEBUG]: 0
sysconfig[Py_ENABLE_SHARED]: 1
sysconfig[SHELL]: /bin/sh
sysconfig[SOABI]: cpython-310-powerpc64le-linux-gnu
sysconfig[prefix]: /usr
test_socket.HAVE_SOCKET_ALG: True
test_socket.HAVE_SOCKET_BLUETOOTH: False
test_socket.HAVE_SOCKET_CAN: False
test_socket.HAVE_SOCKET_CAN_ISOTP: False
test_socket.HAVE_SOCKET_CAN_J1939: False
test_socket.HAVE_SOCKET_QIPCRTR: True
test_socket.HAVE_SOCKET_RDS: False
test_socket.HAVE_SOCKET_UDPLITE: True
test_socket.HAVE_SOCKET_VSOCK: False
test_support._is_gui_available: False
test_support.python_is_optimized: True
time.altzone: 0
time.daylight: 0
time.get_clock_info(monotonic): namespace(implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, adjustable=False, resolution=1e-09)
time.get_clock_info(perf_counter): namespace(implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, adjustable=False, resolution=1e-09)
time.get_clock_info(process_time): namespace(implementation='clock_gettime(CLOCK_PROCESS_CPUTIME_ID)', monotonic=True, adjustable=False, resolution=1e-09)
time.get_clock_info(thread_time): namespace(implementation='clock_gettime(CLOCK_THREAD_CPUTIME_ID)', monotonic=True, adjustable=False, resolution=1e-09)
time.get_clock_info(time): namespace(implementation='clock_gettime(CLOCK_REALTIME)', monotonic=False, adjustable=True, resolution=1e-09)
time.time: 1653655834.5841868
time.timezone: 0
time.tzname: ('UTC', 'UTC')
zlib.ZLIB_RUNTIME_VERSION: 1.2.12
zlib.ZLIB_VERSION: 1.2.12

@mdickinson
Copy link
Member

Thanks again, @tiran. And I've double checked that that part of the code is indeed well exercised by the test suite. Closing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants