Skip to content

Heisenbug concerning bigallocs init (on GCC 15.2) #179

@difcsi

Description

@difcsi

There seems to be some kind of Heisenbug causing intermittent aborts. I'll keep my log my findings and fixes under this issue. I don't have time to work on this right now, perhaps in a couple of days.

Interestingly, a debugger seems to prevent the error from appearing. Some kind of init issue?

Here is a bt from a gdb attached after the fault occurs. It is an init issue!

(gdb) bt
#0  0x00007e837d9a0423 in do_syscall6 (gsp=0x7fffc20cc9c0)
    at /home/zoltan/Develop/pycallocs/contrib/liballocs/contrib/libsystrap/src/../src/do-syscall.h:170
#1  do_real_syscall (gsp=0x7fffc20cc9c0)
    at /home/zoltan/Develop/pycallocs/contrib/liballocs/contrib/libsystrap/src/../src/do-syscall.h:218
#2  do_generic_syscall_and_fixup (gsp=0x7fffc20cc9c0)
    at /home/zoltan/Develop/pycallocs/contrib/liballocs/contrib/libsystrap/src/../src/do-syscall.h:312
--Type <RET> for more, q to quit, c to continue without paging--c
#3  handle_sigill (n=<optimised out>)
    at /home/zoltan/Develop/pycallocs/contrib/liballocs/contrib/libsystrap/src/../src/sigill.c:271
#4  <signal handler called>
#5  0x00007e837d4a00cc in __internal_syscall_cancel (a1=a1@entry=0, a2=a2@entry=0, a3=a3@entry=140736449009536, 
    a4=a4@entry=140736449009536, a5=a5@entry=0, a6=a6@entry=0, nr=230) at ./nptl/cancellation.c:40
#6  0x00007e837d4f62f2 in __GI___clock_nanosleep (clock_id=<optimised out>, clock_id@entry=0, flags=flags@entry=0, 
    req=req@entry=0x7fffc20cd780, rem=rem@entry=0x7fffc20cd780) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
#7  0x00007e837d503fd7 in __GI___nanosleep (req=req@entry=0x7fffc20cd780, rem=rem@entry=0x7fffc20cd780)
    at ../sysdeps/unix/sysv/linux/nanosleep.c:25
#8  0x00007e837d51ad8e in __sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
#9  0x00007e837d988c01 in abort () at /home/zoltan/Develop/pycallocs/contrib/liballocs/src/../src/preload.c:365
#10 0x00007e837d988ce1 in __assert_fail (
    assertion=0x7e837dd1bbb8 "file_bigalloc && \"file bigallocs have not been initialized\"", 
    file=0x7e837dd1bb68 "/home/zoltan/Develop/pycallocs/contrib/liballocs/src/../src/allocsites.c", line=98, 
    function=0x7e837dd1bd40 <__PRETTY_FUNCTION__.1> "get_file")
    at /home/zoltan/Develop/pycallocs/contrib/liballocs/src/../src/preload.c:399
#11 0x00007e837d95ad9c in get_file (allocsite=0x74565b2150da)
    at /home/zoltan/Develop/pycallocs/contrib/liballocs/src/../src/allocsites.c:98
#12 0x00007e837d95adca in __liballocs_find_allocsite_entry_at (allocsite=0x74565b2150da)
    at /home/zoltan/Develop/pycallocs/contrib/liballocs/src/../src/allocsites.c:106
#13 0x00007e837d971d66 in extract_and_output_alloc_site_and_type (p_ins=0x64568c1749e0, out_type=0x7fffc20cda58, 
    out_site=0x0) at /home/zoltan/Develop/pycallocs/contrib/liballocs/src/../include/generic_malloc_index.h:776
#14 0x00007e837d971a57 in __generic_malloc_get_info (a=0x7e837df29c40 <__global_malloc_allocator>, 
    sizefn=0x7e837d971f18 <__default_lib_malloc_usable_size>, obj=0x64568c1749c0, 
    maybe_the_allocation=0x7e837e11bee8 <big_allocations+1224>, out_type=0x7fffc20cda58, out_base=0x0, 
    out_size=0x0, out_site=0x0)
    at /home/zoltan/Develop/pycallocs/contrib/liballocs/src/../include/generic_malloc_index.h:707
#15 0x00007e837d972380 in get_info (obj=0x64568c1749c0, maybe_the_allocation=0x7e837e11bee8 <big_allocations+1224>, 
    out_type=0x7fffc20cda58, out_base=0x0, out_size=0x0, out_site=0x0)
    at /home/zoltan/Develop/pycallocs/contrib/liballocs/src/../src/allocators/default-lib-malloc.c:47
#16 0x00007e837d967440 in __liballocs_get_alloc_info (obj=0x64568c1749c0, out_allocator=0x0, out_alloc_start=0x0, 
    out_alloc_size_bytes=0x0, out_alloc_uniqtype=0x7fffc20cda58, out_alloc_site=0x0)
    at /home/zoltan/Develop/pycallocs/contrib/liballocs/src/../include/liballocs.h:651
#17 0x00007e837d968492 in __liballocs_get_type (obj=0x64568c1749c0)
    at /home/zoltan/Develop/pycallocs/contrib/liballocs/src/../src/query.c:72
#18 0x000064565b2150e5 in main () at offsetof.c:25

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions