Linux Jlink GDBServer - SO_REUSEADDR

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Linux Jlink GDBServer - SO_REUSEADDR


    could be possible to bind sockets with SO_REUSEADDR? Sometimes the Jlink GDBServer quits with Seg fault and I have to wait until the TIME_WAIT expires. (I do not want to restart my network...).


    Reading 64 bytes @ address 0x1000A3C0
    Reading 64 bytes @ address 0x1000A380
    Read 2 bytes @ address 0x0000432E (Data = 0x48AC)
    Read 2 bytes @ address 0x00004330 (Data = 0xF003)
    Read 2 bytes @ address 0x00004C94 (Data = 0xF04F)
    GDB closed TCP/IP connection
    Connected to
    Segmentation fault (core dumped)
    Oct 11 12:56:09 ubuntu kernel: [369167.324070] JLinkGDBServer[19062]: segfault at 5257d949 ip 0807161d sp aeec1300 error 4 in JLinkGDBServer[8048000+36000]
    Oct 11 13:35:52 ubuntu kernel: [371551.040183] JLinkGDBServer[24214]: segfault at ffffffff ip 08071121 sp af6f7240 error 5 in JLinkGDBServer[8048000+36000]

    /////////GDBServer launched again

    ERROR: Failed to bind address (Err = 98)
    ERROR: Failed to open listener port 2331

    *** J-Link GDB Server V4.78a Error ***
    Failed to open listener port. GDBServer will be closed.
    *** J-Link GDB Server V4.78a Error ***
    Oct 11 13:36:28 ubuntu USBBULK[24254]: *** J-Link GDB Server V4.78a
    Error *** | Failed to open listener port. GDBServer will be closed.

    I cannot provide more details about seg fault, the Valgrind is reports
    ==24299== More than 10000000 total errors detected. I'm not reporting any more.
    ==24299== Final error counts will be inaccurate. Go fix your program!
    ==24299== Rerun with --error-limit=no to disable this cutoff. Note
    ==24299== that errors may occur in your program without prior warning from
    ==24299== Valgrind, because errors are no longer being displayed.

  • Hi,

    it happens sometimes (the seg fault), I cannot say exactly what steps are done.

    I can only post my configuration:
    uname -a : Linux ubuntu 3.2.0-54-generic-pae #82-Ubuntu SMP Tue Sep 10 20:29:22 UTC 2013 i686 i686 i386 GNU/Linux

    /etc/issue:Ubuntu 12.04.3 LTS \n \l

    arm-none-eabi-gdb -v: GNU gdb (Sourcery CodeBench 2013.05-53)

    Eclipse: Version: Juno Service Release 2, Build id: 20130225-0426
    Zylin Embedded CDT 4.18.1