Re: Still seeing Failed assertion: "p[i] == 0" on armv7 buildworld [Notes from another example core dump: #1]

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm,gmane.os.freebsd.current
Message-ID <[email protected]>
[I misattributes a zero=flase to #15.]

On Nov 18, 2025, at 17:05, Mark Millard <[email protected]> wrote:

> [I came up with an addition type of note to have for these tests.]
> 
> On Nov 18, 2025, at 16:29, Mark Millard <[email protected]> wrote:
> 
>> I'm only sending notes from testing of how similar other failures appear
>> to the 2 lists. Folks can ask that I do otherwise for them if they want.
>> 
>> This one is for size 4096 (1 page). It looks like #0..#15 are similar to
>> the original report but #16 is not. #15 is for: arena_malloc
>> 
>> (gdb) bt
>> #0  thr_kill () at thr_kill.S:4
>> #1  0x2a08ef24 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:48
>> #2  0x2a145f38 in abort () at /usr/src/lib/libc/stdlib/abort.c:61
>> #3  0x2a196128 in ehooks_debug_zero_check (addr=addr@entry=0x2a80d000, size=size@entry=4096) at /usr/src/contrib/jemalloc/include/jemalloc/internal/ehooks.h:170
>> #4  0x2a191f60 in ehooks_alloc (tsdn=0x2a2e4060, ehooks=0x2a600080, new_addr=0x0, size=<optimized out>, alignment=4096, zero=0xffff7b87, commit=<optimized out>)
>>   at /usr/src/contrib/jemalloc/include/jemalloc/internal/ehooks.h:208
>> #5  __je_extent_alloc_wrapper (tsdn=tsdn@entry=0x2a2e4060, pac=0x2a601810, ehooks=<optimized out>, new_addr=<optimized out>, size=4096, alignment=4096, zero=true, commit=0xffff7be7, 
>>   growing_retained=<optimized out>) at jemalloc_extent.c:1003
>> #6  0x2a1916e0 in __je_ecache_alloc_grow (tsdn=<optimized out>, tsdn@entry=0x2a2e4060, pac=pac@entry=0x2a601810, ehooks=ehooks@entry=0x2a600080, ecache=<optimized out>, ecache@entry=0x2a603dd0, 
>>   expand_edata=0x0, size=4096, alignment=4096, zero=<optimized out>, guarded=<optimized out>) at jemalloc_extent.c:126
>> #7  0x2a1c9680 in pac_alloc_real (tsdn=0x2a2e4060, pac=0x2a601810, ehooks=0x2a600080, size=4096, alignment=4096, zero=<optimized out>, guarded=false) at jemalloc_pac.c:124
>> #8  pac_alloc_impl (tsdn=tsdn@entry=0x2a2e4060, self=0x2a601810, size=size@entry=4096, alignment=4096, zero=<optimized out>, guarded=false, frequent_reuse=<optimized out>, 
>>   deferred_work_generated=<optimized out>) at jemalloc_pac.c:178
>> #9  0x2a1c7ae8 in pai_alloc (tsdn=0x2a2e4060, self=0x0, size=4096, alignment=2147483615, zero=<optimized out>, guarded=false, frequent_reuse=true, deferred_work_generated=<optimized out>)
>>   at /usr/src/contrib/jemalloc/include/jemalloc/internal/pai.h:43
>> #10 __je_pa_alloc (tsdn=tsdn@entry=0x2a2e4060, shard=shard@entry=0x2a601800, size=4096, alignment=<optimized out>, slab=true, szind=1, zero=<optimized out>, guarded=false, 
>>   deferred_work_generated=0xffff7caf) at jemalloc_pa.c:139
>> #11 0x2a16b9f8 in arena_slab_alloc (tsdn=tsdn@entry=0x2a2e4060, arena=0x2a600540, binind=1, binshard=0, bin_info=0x2a21fa8c <__je_bin_infos+48>) at jemalloc_arena.c:839
>> #12 0x2a16ac98 in __je_arena_cache_bin_fill_small (tsdn=0x2a2e4060, arena=0x2a600540, cache_bin=cache_bin@entry=0x2a2e42e8, cache_bin_info=0x2a6004c2, binind=1, nfill=100) at jemalloc_arena.c:1034
>> #13 0x2a1b5694 in __je_tcache_alloc_small_hard (tsdn=0x0, tsdn@entry=0x2a2e4060, arena=0x0, arena@entry=0x2a600540, tcache=tcache@entry=0x2a2e42c8, cache_bin=cache_bin@entry=0x2a2e42e8, binind=1, 
>>   tcache_success=0xffff7d5f) at jemalloc_tcache.c:238
>> #14 0x2a15e538 in tcache_alloc_small (tsd=0x2a2e4060, arena=0x2a600540, tcache=0x2a2e42c8, size=16, binind=1, zero=false, slow_path=<optimized out>)
>>   at /usr/src/contrib/jemalloc/include/jemalloc/internal/tcache_inlines.h:68
>> #15 arena_malloc (tsdn=<optimized out>, arena=<optimized out>, size=<optimized out>, ind=<optimized out>, zero=<optimized out>, tcache=<optimized out>, slow_path=<optimized out>)
>>   at /usr/src/contrib/jemalloc/include/jemalloc/internal/arena_inlines_b.h:151
>> #16 iallocztm (tsdn=tsdn@entry=0x2a2e4060, size=<optimized out>, size@entry=16, ind=ind@entry=1, zero=false, tcache=0x2a2e42c8, is_internal=false, arena=0x0, slow_path=<optimized out>)
>>   at /usr/src/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h:55
>> #17 0x2a164df4 in imalloc_no_sample (sopts=0xffff7dfc, dopts=0xffff7ddc, tsd=0x2a2e4060, size=16, usize=16, ind=<optimized out>) at jemalloc_jemalloc.c:2402
>> #18 imalloc_body (sopts=0xffff7dfc, dopts=0xffff7ddc, tsd=0x2a2e4060) at jemalloc_jemalloc.c:2577
>> #19 0x2a156188 in imalloc (sopts=sopts@entry=0xffff7dfc, dopts=<optimized out>, dopts@entry=0xffff7ddc) at jemalloc_jemalloc.c:2693
>> #20 0x2a156000 in __je_malloc_default (size=16) at jemalloc_jemalloc.c:2726
>> #21 0x29e61990 in operator_new_impl (size=16) at /usr/src/contrib/llvm-project/libcxx/src/new.cpp:34
>> #22 operator new (size=<optimized out>) at /usr/src/contrib/llvm-project/libcxx/src/new.cpp:47
>> #23 0x27e101d0 in __libcpp_operator_new<unsigned int> () at /usr/obj/usr/src/arm.armv7/tmp/usr/include/c++/v1/new:265
>> #24 __libcpp_allocate () at /usr/obj/usr/src/arm.armv7/tmp/usr/include/c++/v1/new:289
>> #25 allocate () at /usr/obj/usr/src/arm.armv7/tmp/usr/include/c++/v1/__memory/allocator.h:118
>> #26 __allocate_at_least<std::__1::allocator<char> > () at /usr/obj/usr/src/arm.armv7/tmp/usr/include/c++/v1/__memory/allocate_at_least.h:41
>> #27 __init () at /usr/obj/usr/src/arm.armv7/tmp/usr/include/c++/v1/string:2336
>> #28 basic_string () at /usr/obj/usr/src/arm.armv7/tmp/usr/include/c++/v1/string:1078
>> #29 str () at /usr/src/contrib/llvm-project/llvm/include/llvm/ADT/StringRef.h:217
>> #30 str () at /usr/src/contrib/llvm-project/llvm/lib/Support/Twine.cpp:29
>> #31 0x294076d0 in SetNamePrefix () at /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp:502
>> #32 visit () at /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp:2734
>> #33 0x293f4938 in rewritePartition () at /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp:4893
>> #34 splitAlloca () at /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp:5284
>> #35 0x293f04ec in runOnAlloca () at /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp:5485
>> #36 0x293ebfc0 in runSROA () at /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp:5596
>> #37 0x293eba80 in run () at /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp:5637
>> #38 0x27b9b32c in llvm::detail::PassModel<llvm::Function, llvm::SROAPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) ()
>>   at /usr/src/contrib/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90
>> #39 0x276eef80 in run () at /usr/src/contrib/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:81
>> #40 0x2217fd38 in llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) () at /usr/src/contrib/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90
>> #41 0x276f30e4 in run () at /usr/src/contrib/llvm-project/llvm/lib/IR/PassManager.cpp:124
>> #42 0x22178b88 in llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) ()
>>   at /usr/src/contrib/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90
>> #43 0x276ee244 in run () at /usr/src/contrib/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:81
>> #44 0x22174ffc in RunOptimizationPipeline () at /usr/src/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1114
>> #45 0x2216cfb8 in EmitAssembly () at /usr/src/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1179
>> --Type <RET> for more, q to quit, c to continue without paging--
>> #46 EmitBackendOutput () at /usr/src/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1341
>> #47 0x225cbca0 in HandleTranslationUnit () at /usr/src/contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:354
>> #48 0x22cff8e4 in ParseAST () at /usr/src/contrib/llvm-project/clang/lib/Parse/ParseAST.cpp:184
>> #49 0x22b5a7b8 in Execute () at /usr/src/contrib/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1078
>> #50 0x22adb800 in ExecuteAction () at /usr/src/contrib/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1061
>> #51 0x22bf6a90 in ExecuteCompilerInvocation () at /usr/src/contrib/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:280
>> #52 0x0002afc8 in cc1_main () at /usr/src/contrib/llvm-project/clang/tools/driver/cc1_main.cpp:284
>> #53 0x00038548 in ExecuteCC1Tool () at /usr/src/contrib/llvm-project/clang/tools/driver/driver.cpp:215
>> #54 0x227877ec in operator() () at /usr/src/contrib/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68
>> #55 operator() () at /usr/src/contrib/llvm-project/clang/lib/Driver/Job.cpp:440
>> #56 callback_fn<(lambda at /usr/src/contrib/llvm-project/clang/lib/Driver/Job.cpp:440:22)>(void) () at /usr/src/contrib/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45
>> #57 0x27d88624 in operator() () at /usr/src/contrib/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68
>> #58 RunSafely () at /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:426
>> #59 0x22786e90 in Execute () at /usr/src/contrib/llvm-project/clang/lib/Driver/Job.cpp:440
>> #60 0x22748074 in ExecuteCommand () at /usr/src/contrib/llvm-project/clang/lib/Driver/Compilation.cpp:199
>> #61 0x227483d0 in ExecuteJobs () at /usr/src/contrib/llvm-project/clang/lib/Driver/Compilation.cpp:253
>> #62 0x22765bb8 in ExecuteCompilation () at /usr/src/contrib/llvm-project/clang/lib/Driver/Driver.cpp:1943
>> #63 0x00037ba4 in clang_main () at /usr/src/contrib/llvm-project/clang/tools/driver/driver.cpp:391
>> #64 0x000363a8 in main () at /usr/src/usr.bin/clang/clang/clang-driver.cpp:17
>> 
>> 0x2a80cfd0: 0x000013f2 0x00000079 0xffffffff 0xa5a5a5a5
>> 0x2a80cfe0: 0xffffffff 0xa5a5a5a5 0xffffffff 0xa5a5a5a5
>> 0x2a80cff0: 0x000014a6 0x00000079 0xffffffff 0xa5a5a5a5
>> (gdb) x /1024x (size_t*)addr
>> 0x2a80d000: 0x5a5a5a5a 0x5a5a5a5a 0x5a5a5a5a 0x5a5a5a5a
>> 0x2a80d010: 0x5a5a5a5a 0x5a5a5a5a 0x5a5a5a5a 0x5a5a5a5a
>> 0x2a80d020: 0x5a5a5a5a 0x5a5a5a5a 0x5a5a5a5a 0x5a5a5a5a
>> . . .
>> 0x2a80dfd0: 0x5a5a5a5a 0x5a5a5a5a 0x5a5a5a5a 0x5a5a5a5a
>> 0x2a80dfe0: 0x5a5a5a5a 0x5a5a5a5a 0x5a5a5a5a 0x5a5a5a5a
>> 0x2a80dff0: 0x5a5a5a5a 0x5a5a5a5a 0x5a5a5a5a 0x5a5a5a5a
>> (gdb) x /1024x ((size_t*)addr)+1024
>> 0x2a80e000: 0x00000051 0x00000002 0x29e862b8 0xa5a5a5a5
>> 0x2a80e010: 0x7273752f 0x6372732f 0x766e692d 0x69747365
>> 0x2a80e020: 0x69746167 0x6c2f6e6f 0x632f6269 0x676e616c
>> 0x2a80e030: 0x636e692f 0x6564756c 0x745f5f2f 0x5f657079
>> 
>> So: All of the page was 0x5a5a5a5a repeated. Before and after
>> had some other values and were accessible.
>> 
> 
> For #0..#15: The original example and the above
> agree about:
> 
> #5  __je_extent_alloc_wrapper zero=true
> #14 tcache_alloc_small        zero=false
> #15 __je_extent_alloc_wrapper zero=false

#15 was actually optimized out. It was #16 that
was zero=false. (But that is outside the common
range #0..#15.)

> (The others are optimized out.)
> 



===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.