On Thu, Aug 22, 2019 at 12:07 PM Rick Payne <[email protected]> wrote:
> On Thu, 2019-08-22 at 10:47 +0300, Nadav Har'El wrote: > > Do you know how to get a backtrace from gdb? > > Yes, see below. It wasn't running out of memory: > > (gdb) osv mem > Total Memory: 8589392896 Bytes > Mmap Memory: 2231259136 Bytes (25.98%) > Free Memory: 7464316928 Bytes (86.90%) > > This is the most recent one: > > (gdb) bt > #0 0x000000004022987e in abort (fmt=fmt@entry=0x406738f2 "exception > nested too deeply") at runtime.cc:121 > #1 0x0000000040397bf6 in sched::arch_cpu::enter_exception > (this=<optimized out>) at arch/x64/arch-cpu.cc:19 > #2 sched::exception_guard::exception_guard (this=<optimized out>) at > arch/x64/arch-cpu.cc:37 > #3 0x000000004039a97c in page_fault (ef=0xffff80000001c048) at > arch/x64/mmu.cc:22 > #4 <signal handler called> > #5 0x0000000040397d3b in safe_load<void*> (data=@0xffff8001032b13d0: > 0x0, potentially_bad_pointer=0x2000af800000) at arch/x64/safe-ptr.hh:33 > #6 backtrace_safe (pc=pc@entry=0xffff8001032b1330, nr=nr@entry=128) at > arch/x64/backtrace.cc:26 > #7 0x00000000402295a6 in print_backtrace () at runtime.cc:79 > #8 0x000000004022987c in abort (fmt=fmt@entry=0x40644c28 "Assertion > failed: %s (%s: %s: %d)\n") at runtime.cc:121 > #9 0x00000000402298eb in __assert_fail (expr=expr@entry=0x40658734 > "current_id < rings.size()", file=file@entry=0x40658810 > "include/lockfree/unordered_ring_mpsc.hh", > line=line@entry=111, > func=func@entry=0x40658840 <bool unordered_ring_mpsc<harvest, > 1024u>::emplace<unsigned long&, void const*&, unsigned int&, unsigned > int&, esource&>(unsigned long&, void const*&, unsigned int&, unsigned > int&, esource&)::__func__> "emplace") at runtime.cc:139 > #10 0x000000004029e027 in unordered_ring_mpsc<harvest, > 1024u>::emplace<unsigned long&, void const*&, unsigned int&, unsigned > int&, esource&> (this=<optimized out>) > at include/lockfree/unordered_ring_mpsc.hh:111 > #11 random_harvestq_internal (somecounter=<optimized out>, > entropy=<optimized out>, count=<optimized out>, bits=<optimized out>, > origin=<optimized out>) > at bsd/sys/dev/random/random_harvestq.cc:164 > #12 0x000000004039c02b in harvest_interrupt_randomness > (frame=0xffff8001032b2068, irq=32) at include/osv/intr_random.hh:22 > #13 interrupt (frame=0xffff8001032b2068) at arch/x64/exceptions.cc:259 > #14 <signal handler called> > #15 console::isa_serial_console::putchar (ch=97 'a') at drivers/isa- > serial.cc:108 > #16 console::isa_serial_console::write (this=<optimized out>, > str=0x409c00c3 <debug_ll::msg+35> > "ge_range_allocator::alloc_aligned(unsigned long, unsigned long, > unsigned long, bool)+550>\n", len=<optimized out>) at drivers/isa- > serial.cc:79 > #17 0x00000000403431d8 in console::console_multiplexer::drivers_write > (len=1, > str=0x409c00c2 <debug_ll::msg+34> > "age_range_allocator::alloc_aligned(unsigned long, unsigned long, > unsigned long, bool)+550>\n", this=0x409a97e0 <console::mux>) > at drivers/console-multiplexer.cc:49 > #18 console::console_multiplexer::<lambda(char const*, > size_t)>::operator() (len=1, > str=0x409c00c2 <debug_ll::msg+34> > "age_range_allocator::alloc_aligned(unsigned long, unsigned long, > unsigned long, bool)+550>\n", __closure=<optimized out>) > at drivers/console-multiplexer.cc:36 > #19 std::_Function_handler<void(char const*, long unsigned int), > console::console_multiplexer::start()::<lambda(char const*, size_t)> > >::_M_invoke(const std::_Any_data &, const char *&&, unsigned long &&) > (__functor=..., __args#0=<optimized out>, __args#1=<optimized out>) at > /usr/include/c++/7/bits/std_function.h:316 > #20 0x0000000040343d33 in std::function<void (char const*, unsigned > long)>::operator()(char const*, unsigned long) const > (__args#1=<optimized out>, __args#0=<optimized out>, > this=0x409a9840 <console::mux+96>) at > /usr/include/c++/7/bits/std_function.h:706 > #21 console::LineDiscipline::write(char const*, unsigned long, > std::function<void (char const*, unsigned long)>&) > (this=0xffffa001017d9900, > str=0x409c00c3 <debug_ll::msg+35> > "ge_range_allocator::alloc_aligned(unsigned long, unsigned long, > unsigned long, bool)+550>\n", len=<optimized out>, writer=...) > at drivers/line-discipline.cc:179 > #22 0x0000000040343571 in console::console_multiplexer::write_ll ( > this=this@entry=0x409a97e0 <console::mux>, str=str@entry=0x409c00a0 > <debug_ll::msg> "\n[backtrace]\n", > len=<optimized out>) at drivers/console-multiplexer.cc:71 > #23 0x0000000040342e33 in console::write_ll (msg=msg@entry=0x409c00a0 > <debug_ll::msg> "\n[backtrace]\n", len=<optimized out>) at > drivers/console.cc:63 > #24 0x00000000403d9b68 in debug_ll (fmt=fmt@entry=0x406740d1 "RIP: > 0x%016lx <%s>\n") at core/debug.cc:250 > #25 0x000000004039e752 in dump_registers (ef=ef@entry=0xffff80000001b04 > 8) at arch/x64/dump.cc:20 > #26 0x0000000040334a21 in mmu::vm_sigsegv (addr=<optimized out>, > ef=0xffff80000001b048) at core/mmu.cc:1314 > #27 0x000000004033723a in mmu::vm_fault (addr=<optimized out>, > addr@entry=18446603337326395384, ef=ef@entry=0xffff80000001b048) at > core/mmu.cc:1337 > #28 0x000000004039a9c1 in page_fault (ef=0xffff80000001b048) at > arch/x64/mmu.cc:38 > #29 <signal handler called> > #30 memory::page_range_allocator::insert<true> (pr=..., this=0x409c1300 > <memory::free_page_ranges>) at core/mempool.cc:578 > #31 > memory::page_range_allocator::<lambda(memory::page_range&)>::operator() > (header=..., __closure=<synthetic pointer>) at core/mempool.cc:751 > #32 > memory::page_range_allocator::for_each<memory::page_range_allocator::al > loc_aligned(size_t, size_t, size_t, > bool)::<lambda(memory::page_range&)> > (f=..., min_order=<optimized > out>, > this=0x409c1300 <memory::free_page_ranges>) at core/mempool.cc:809 > #33 memory::page_range_allocator::alloc_aligned (this=this@entry=0x409c > 1300 <memory::free_page_ranges>, size=size@entry=2097152, > offset=offset@entry=0, alignment=alignment@entry=2097152, > fill=fill@entry=true) at core/mempool.cc:736 > #34 0x00000000403e7414 in memory::alloc_huge_page (N=N@entry=2097152) > at core/mempool.cc:1601 > #35 0x000000004033c5ee in > mmu::uninitialized_anonymous_page_provider::map (this=0x40930030 > <mmu::page_allocator_init>, offset=56623104, ptep=..., pte=..., > write=<optimized out>) > ---Type <return> to continue, or q <return> to quit--- > at core/mmu.cc:1037 > #36 0x000000004033b919 in mmu::populate<(mmu::account_opt)0>::page<1> > (offset=56623104, ptep=..., this=0xffff8001032b5ba0) at core/mmu.cc:532 > #37 mmu::page<mmu::populate<(mmu::account_opt)0>, 1> (offset=56623104, > ptep=..., pops=...) at core/mmu.cc:311 > #38 mmu::map_level<mmu::populate<(mmu::account_opt)0>, 2>::operator() > (base_virt=35187316490240, parent=..., this=<synthetic pointer>) at > core/mmu.cc:437 > #39 mmu::map_level<mmu::populate<(mmu::account_opt)0>, 3>::map_range<2> > (this=<synthetic pointer>, base_virt=35186519572480, ptep=..., > slop=4096, page_mapper=..., size=2097152, > vcur=<optimized out>) at core/mmu.cc:399 > #40 mmu::map_level<mmu::populate<(mmu::account_opt)0>, 3>::operator() > (base_virt=35186519572480, parent=..., this=<synthetic pointer>) at > core/mmu.cc:449 > #41 mmu::map_level<mmu::populate<(mmu::account_opt)0>, 4>::map_range<3> > (this=<synthetic pointer>, base_virt=35184372088832, ptep=..., > slop=4096, page_mapper=..., size=2097152, > vcur=<optimized out>) at core/mmu.cc:399 > #42 mmu::map_level<mmu::populate<(mmu::account_opt)0>, 4>::operator() > (base_virt=35184372088832, parent=..., this=<synthetic pointer>) at > core/mmu.cc:449 > #43 mmu::map_range<mmu::populate<(mmu::account_opt)0> > (slop=4096, > page_mapper=..., size=<optimized out>, vstart=<optimized out>, > vma_start=<optimized out>) at core/mmu.cc:354 > #44 mmu::operate_range<mmu::populate<(mmu::account_opt)0> > > (size=<optimized out>, start=<optimized out>, vma_start=<optimized > out>, mapper=...) at core/mmu.cc:806 > #45 mmu::vma::operate_range<mmu::populate<(mmu::account_opt)0> > > (size=<optimized out>, addr=<optimized out>, mapper=..., > this=0xffffa00105ad2c00) at core/mmu.cc:1412 > #46 mmu::populate_vma<(mmu::account_opt)0> (write=<optimized out>, > size=<optimized out>, v=<optimized out>, vma=0xffffa00105ad2c00) at > core/mmu.cc:1206 > #47 mmu::vma::fault (this=0xffffa00105ad2c00, addr=<optimized out>, > ef=<optimized out>) at core/mmu.cc:1439 > #48 0x00000000403373e1 in mmu::vm_fault (addr=<optimized out>, > addr@entry=35187316490240, ef=ef@entry=0xffff8001032b6068) at > core/mmu.cc:1341 > #49 0x000000004039a9c1 in page_fault (ef=0xffff8001032b6068) at > arch/x64/mmu.cc:38 > So, we have a page_fault here, and most of the lines above are not interesting, additional bugs while printing the strack trace :-( It would be nice if we fixed those issues too, but it's less important than fixing the real bug. #50 <signal handler called> > #51 0x0000100005bc6d43 in ?? () > Please run "osv syms" to allow gdb to find your application object files, and show lines there. Perhaps it's a segfault inside your application, not the kernel? #52 0x00002000494ae438 in ?? () > #53 0x00000000061ec000 in ?? () > #54 0x0000200040f55ab0 in ?? () > #55 0x0000200040f55a98 in ?? () > #56 0x0000200040f55aa0 in ?? () > > > -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/CANEVyjvCUL4%3DFK1v4gYayY4UWPDSvM6C%2BFBOic9GRmR-4JjyUA%40mail.gmail.com.
