Skip to content
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

free() error after CZoneInfoDatetimeSubclassTest[test_folds_from_utc] #116

Open
bnavigator opened this issue Mar 25, 2022 · 2 comments
Open

Comments

@bnavigator
Copy link

This is inside a openSUSE build service environment for building the rpm package:

abuild@skylab:~> cd rpmbuild/BUILD/zoneinfo-0.2.1/
abuild@skylab:~/rpmbuild/BUILD/zoneinfo-0.2.1> export PYTHONPATH=/home/abuild/rpmbuild/BUILDROOT/python-backports.zoneinfo-0.2.1-0.x86_64/usr/lib64/python3.8/site-packages/
abuild@skylab:~/rpmbuild/BUILD/zoneinfo-0.2.1> gdb python3
GNU gdb (GDB; openSUSE Tumbleweed) 11.1
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python3...
Reading symbols from /usr/lib/debug/usr/bin/python3.8-3.8.12-5.7.x86_64.debug...
(gdb) run -m pytest
Starting program: /usr/bin/python3 -m pytest
Download failed: No route to host.  Continuing without debug info for /home/abuild/rpmbuild/BUILD/zoneinfo-0.2.1/system-supplied DSO at 0x7ffff7fc1000.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Download failed: No route to host.  Continuing without debug info for /lib64/libbz2.so.1.
Download failed: No route to host.  Continuing without debug info for /lib64/liblzma.so.5.
[Detaching after fork from child process 1041]
Download failed: No route to host.  Continuing without debug info for /lib64/libuuid.so.1.
Download failed: No route to host.  Continuing without debug info for /lib64/libmpdec.so.3.
Download failed: No route to host.  Continuing without debug info for /lib64/libexpat.so.1.
========================================================================================================== test session starts ===========================================================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/abuild/rpmbuild/BUILD/zoneinfo-0.2.1
plugins: hypothesis-6.39.4, subtests-0.5.0
collecting ... Download failed: No route to host.  Continuing without debug info for /lib64/libssl.so.1.1.
Download failed: No route to host.  Continuing without debug info for /lib64/libcrypto.so.1.1.
Download failed: No route to host.  Continuing without debug info for /home/abuild/rpmbuild/BUILDROOT/python-backports.zoneinfo-0.2.1-0.x86_64/usr/lib64/python3.8/site-packages/backports/zoneinfo/_czoneinfo.cpython-38-x86_64-linux-gnu.so.
Missing separate debuginfo for /home/abuild/rpmbuild/BUILDROOT/python-backports.zoneinfo-0.2.1-0.x86_64/usr/lib64/python3.8/site-packages/backports/zoneinfo/_czoneinfo.cpython-38-x86_64-linux-gnu.so
Try: zypper install -C "debuginfo(build-id)=2fb0f9faaa06618bb6887ac49d12b82baecd91a0"
collected 233 items                                                                                                                                                                                                                      

tests/test_zoneinfo.py ............................................................................................................ssssssssssssssssssssssssss.............................................s....................... [ 87%]
.......                                                                                                                                                                                                                            [ 90%]
tests/test_zoneinfo_property.py .......................                                                                                                                                                                            [100%]

==================================================================================================== 206 passed, 27 skipped in 1.84s =====================================================================================================
free(): invalid pointer

Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
Download failed: No route to host.  Continuing without source file /usr/src/debug/glibc-2.35-4.7.x86_64/nptl/pthread_kill.c.
44      pthread_kill.c: No such file or directory.
Missing separate debuginfos, use: zypper install libbz2-1-debuginfo-1.0.8-5.75.x86_64 libexpat1-debuginfo-2.4.7-2.5.x86_64 liblzma5-debuginfo-5.2.5-4.74.x86_64 libmpdec3-debuginfo-2.5.1-3.51.x86_64 libopenssl1_1-debuginfo-1.1.1n-2.3.x86_64 libuuid1-debuginfo-2.37.4-3.5.x86_64
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff7ae61e3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007ffff7a96306 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff7a7f813 in __GI_abort () at abort.c:79
#4  0x00007ffff7ad91b7 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7c1f618 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#5  0x00007ffff7af0c9c in malloc_printerr (str=str@entry=0x7ffff7c1d1f2 "free(): invalid pointer") at malloc.c:5664
#6  0x00007ffff7af2ac4 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:4439
#7  0x00007ffff7af5753 in __GI___libc_free (mem=<optimized out>) at malloc.c:3391
#8  0x00007ffff7d881e5 in _Py_DECREF (op=<optimized out>, lineno=541, filename=<synthetic pointer>) at ./Include/object.h:478
#9  _Py_XDECREF (op=<optimized out>) at ./Include/object.h:541
#10 tupledealloc (op=0x7ffff7721220) at Objects/tupleobject.c:247
#11 0x00007ffff7d98817 in _Py_DECREF (op=<optimized out>, lineno=541, filename=<synthetic pointer>) at ./Include/object.h:478
#12 _Py_XDECREF (op=<optimized out>) at ./Include/object.h:541
#13 code_dealloc (co=0x7ffff7739d40) at Objects/codeobject.c:552
#14 0x00007ffff7d957cd in _Py_DECREF (op=<optimized out>, lineno=579, filename=0x7ffff7e73631 "Objects/funcobject.c") at ./Include/object.h:478
#15 func_clear (op=0x7ffff76a29d0) at Objects/funcobject.c:579
#16 0x00007ffff7d956ba in func_dealloc (op=0x7ffff76a29d0) at Objects/funcobject.c:600
#17 0x00007ffff7d85275 in _Py_DECREF (op=<optimized out>, lineno=541, filename=<synthetic pointer>) at ./Include/object.h:478
#18 _Py_XDECREF (op=<optimized out>) at ./Include/object.h:541
#19 free_keys_object (keys=0x7ffff770ce70) at Objects/dictobject.c:584
#20 0x00007ffff7e20ff6 in type_clear (type=0x55555560d8a0) at Objects/typeobject.c:3607
#21 0x00007ffff7d7f4c9 in delete_garbage (state=0x7ffff7f97618 <_PyRuntime+344>, old=0x7ffff7f97660 <_PyRuntime+416>, collectable=0x7fffffffe4a0) at Modules/gcmodule.c:948
#22 collect (generation=2, n_collected=0x0, n_uncollectable=0x0, nofail=1, state=0x7ffff7f97618 <_PyRuntime+344>) at Modules/gcmodule.c:1123
#23 0x00007ffff7e29962 in _PyGC_CollectNoFail () at Modules/gcmodule.c:1877
#24 0x00007ffff7e28ef4 in PyImport_Cleanup () at Python/import.c:599
#25 0x00007ffff7e266c1 in Py_FinalizeEx () at Python/pylifecycle.c:1229
#26 0x00007ffff7e1d8a8 in Py_RunMain () at Modules/main.c:691
#27 0x00007ffff7df90f9 in Py_BytesMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:743
#28 0x00007ffff7a80630 in __libc_start_call_main (main=main@entry=0x555555555140 <main>, argc=argc@entry=3, argv=argv@entry=0x7fffffffe878) at ../sysdeps/nptl/libc_start_call_main.h:58
#29 0x00007ffff7a806f0 in __libc_start_main_impl (main=0x555555555140 <main>, argc=3, argv=0x7fffffffe878, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe868) at ../csu/libc-start.c:392
#30 0x0000555555555075 in _start () at ../sysdeps/x86_64/start.S:115
(gdb) py-bt
Traceback (most recent call first):
  Garbage-collecting
(gdb) quit

If I exclude CZoneInfoDatetimeSubclassTest[test_folds_from_utc] from the pytest run, the free() error does not happen.

zoneinfo 0.2.1 with #101 and #115 applied.

@bnavigator
Copy link
Author

bnavigator commented Mar 25, 2022

Hmm, this does not happen outside of the build service virtual machine.

@Vogtinator
Copy link

Might be influenced by some of the MALLOC_* variables set inside

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants