Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.1.3, 3.0.5
    • Component/s: Core
    • Labels:
    • Backport to Version:

      Description

      the codes doing stack dump may crash, in this case you will not able to get a core file, that will hide most of the rare issues.

        Activity

        Hide
        Leif Hedstrom added a comment -

        Moved to 3.1.4, please move bugs back to 3.1.3, which you will work on in the next 2 weeks.

        Show
        Leif Hedstrom added a comment - Moved to 3.1.4, please move bugs back to 3.1.3, which you will work on in the next 2 weeks.
        Hide
        weijin added a comment -

        By disassembly ink_restore_signal_handler_frame, I found it was not the base frame address but the function args stored in %rbp in release mode. The embedded assembly codes of getting base frame address is dangerous and have poor portability, so I remove them from the sources.

        Show
        weijin added a comment - By disassembly ink_restore_signal_handler_frame, I found it was not the base frame address but the function args stored in %rbp in release mode. The embedded assembly codes of getting base frame address is dangerous and have poor portability, so I remove them from the sources.
        Hide
        weijin added a comment - - edited
        Breakpoint 1, ink_stack_trace_get (stack=0x7fffffffb4d0, len=100, signalhandler_frame=2) at ink_stack_trace.cc:85
        85      {
        (gdb) n
        87        if ((btl = backtrace(stack, len)) > 0) {
        (gdb) 
        88          if (signalhandler_frame)
        (gdb) 
        89            ink_restore_signal_handler_frame(stack, btl, signalhandler_frame + 1);
        (gdb) s
        ink_restore_signal_handler_frame (stack=0x7fffffffb4d0, len=<value optimized out>, signalhandler_frame=2) at ink_stack_trace.cc:63
        63        asm volatile ("mov %%rbp,%0":"=r" (fp));
        (gdb) info reg rbp
        rbp            0x2      0x2
        (gdb) n
        67        for (i = 0; i < signalhandler_frame; i++)
        (gdb) 
        68          fp = (void **) (*fp);
        (gdb) 
        
        Program received signal SIGSEGV, Segmentation fault.
        
        Show
        weijin added a comment - - edited Breakpoint 1, ink_stack_trace_get (stack=0x7fffffffb4d0, len=100, signalhandler_frame=2) at ink_stack_trace.cc:85 85 { (gdb) n 87 if ((btl = backtrace(stack, len)) > 0) { (gdb) 88 if (signalhandler_frame) (gdb) 89 ink_restore_signal_handler_frame(stack, btl, signalhandler_frame + 1); (gdb) s ink_restore_signal_handler_frame (stack=0x7fffffffb4d0, len=<value optimized out>, signalhandler_frame=2) at ink_stack_trace.cc:63 63 asm volatile ( "mov %%rbp,%0" : "=r" (fp)); (gdb) info reg rbp rbp 0x2 0x2 (gdb) n 67 for (i = 0; i < signalhandler_frame; i++) (gdb) 68 fp = (void **) (*fp); (gdb) Program received signal SIGSEGV, Segmentation fault.
        Hide
        Zhao Yongming added a comment -

        git hash ad6c4ab97ff150727660f66aa64b0fb57fd3d3f7

        Show
        Zhao Yongming added a comment - git hash ad6c4ab97ff150727660f66aa64b0fb57fd3d3f7
        Hide
        Brian Geffon added a comment -

        Backport to 3.0.x in e626f8c4fcdd829fd3e5b4e75384fe4025622236

        Show
        Brian Geffon added a comment - Backport to 3.0.x in e626f8c4fcdd829fd3e5b4e75384fe4025622236

          People

          • Assignee:
            Brian Geffon
            Reporter:
            Zhao Yongming
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development