Sunday, February 25th 2018, 2:56pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

wella-tabor

Beginner

Date of registration: Nov 26th 2012

Posts: 20

1

Friday, October 11th 2013, 1:49pm

Linux Jlink GDBServer - SO_REUSEADDR

Hello,

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...).

ref: http://serverfault.com/questions/329845/…et-in-time-wait


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 127.0.0.1
Segmentation fault (core dumped)
/var/log/syslog
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 ***
/var/log/syslog
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.


Best
Martin

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

2

Monday, October 14th 2013, 10:05am

Hi Martin,

Should already be done for most threads in GDBServer that are listening.
Anyhow, we will check. We will also check regarding the seg fault you reported.
Anything special we need to do not reproduce this seg fault?


Best regards
Alex

wella-tabor

Beginner

Date of registration: Nov 26th 2012

Posts: 20

3

Monday, October 14th 2013, 7:15pm

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) 7.4.50.20120716-cvs

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


Best
Martin