Skip to contentSkip to conversation

Gdb freezes when stepping through rt_task_spawn.

Xenomai Marco Tessore 3 participants 9 messages Jun 10, 2014 – Jun 13, 2014

lore
Share & tools
lore
#0 lore raw

Hello,
I have a problem, you've probably already dealt with in the past:
when I debug with gdb / gdbserver, if I execute step by step while I invoke the call rt_task_spawn, gdb freezes with no chance of recovery.

Since I have seen that you have already faced the problem a few years ago, I was wondering if you had found a solution.

kind regards
Marco Tessore

#1 lore raw
Quoted 7 lines · Marco Tessore

Hello,
I have a problem, you've probably already dealt with in the past:
when I debug with gdb / gdbserver, if I execute step by step while I invoke the call rt_task_spawn, gdb freezes with no chance of recovery.

Since I have seen that you have already faced the problem a few years ago, I was wondering if you had found a solution.

Did you try xenomai 2.6 git? An issue was fixed very recently with regard to gdb (it is actually the latest commit on this branch).

Signature · 1 line
                                                                Gilles.
#2 lore raw

Thank you, I will try that commit.
But I have another question about it:
does the commit involve the patch to the kernel?
Since my kernel was patched using i-pipe git for the vanilla 3.10, but applied to a customized version of 3.11, if the commit involves the kernel patch, it can be difficult for me to upgrade.

I have found another problem with gdb:
when I have multiple tasks pending on rt_sem_p,
if I change the state of breakpoints, the function can return error code -38. May be that the same commit can resolve both problems.

Thank you very much
Marco Tessore

Il 10/06/2014 22:02, Gilles Chanteperdrix ha scritto:

Quoted 12 lines · Marco Tessore
Quoted 7 lines

Hello,
I have a problem, you've probably already dealt with in the past:
when I debug with gdb / gdbserver, if I execute step by step while I invoke the call rt_task_spawn, gdb freezes with no chance of recovery.

Since I have seen that you have already faced the problem a few years ago, I was wondering if you had found a solution.

Did you try xenomai 2.6 git? An issue was fixed very recently with regard to gdb (it is actually the latest commit on this branch).

#3 lore raw
Quoted 3 lines · Marco Tessore

Thank you, I will try that commit.
But I have another question about it:
does the commit involve the patch to the kernel?

Yes.

Quoted 5 lines

Since my kernel was patched using i-pipe git for the vanilla 3.10, but applied to a customized version of 3.11,
if the commit involves the kernel patch, it can be difficult for me to upgrade.

There is no other option.

Quoted 5 lines

I have found another problem with gdb:
when I have multiple tasks pending on rt_sem_p,
if I change the state of breakpoints, the function can return error code -38.
May be that the same commit can resolve both problems.

It most likely does.

Quoted 24 lines

Thank you very much
Marco Tessore

Il 10/06/2014 22:02, Gilles Chanteperdrix ha scritto:

Quoted 6 lines · Marco Tessore
Quoted 5 lines

Hello,
I have a problem, you've probably already dealt with in the past:
when I debug with gdb / gdbserver, if I execute step by step while I invoke the call rt_task_spawn, gdb freezes with no chance of recovery.

Quoted 6 lines
Quoted 2 lines

Since I have seen that you have already faced the problem a few years ago, I was wondering if you had found a solution.

Did you try xenomai 2.6 git? An issue was fixed very recently with regard to gdb (it is actually the latest commit on this branch).

_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Signature · 1 line
Philippe.
#4 lore raw
In reply to Marco Tessore
Quoted 7 lines · Marco Tessore

Thank you, I will try that commit.
But I have another question about it:
does the commit involve the patch to the kernel?
Since my kernel was patched using i-pipe git for the vanilla 3.10, but applied to a customized version of 3.11,
if the commit involves the kernel patch, it can be difficult for me to upgrade.

If you kept the ipipe kernel separated from Xenomai kernel sources, the change is a change in xenomai sources, so the update should be painless. If you put the xenomai-patched kernel under source control, then it will be harder.

Signature · 1 line
                                                                Gilles.
#5 lore raw
Quoted 9 lines · Gilles Chanteperdrix
Quoted 7 lines · Marco Tessore

Thank you, I will try that commit.
But I have another question about it:
does the commit involve the patch to the kernel?
Since my kernel was patched using i-pipe git for the vanilla 3.10, but applied to a customized version of 3.11,
if the commit involves the kernel patch, it can be difficult for me to upgrade.

Quoted 5 lines

If you kept the ipipe kernel separated from Xenomai kernel sources, the change is a change in xenomai sources, so the update should be painless. If you put the xenomai-patched kernel under source control, then it will be harder.

ENOSYS would rather be symptomatic of this bug which is ARM-specific:
http://git.xenomai.org/ipipe.git/commit/?h=ipipe-3.10&id=e410a5e77323d53277d625e5dafe166cdcd64afb

OTOH, the patch below fixes a spurious EINTR error within the task creation syscall, which may well end up in a lockup:
http://git.xenomai.org/xenomai-2.6.git/commit/?id=589882956280d5cb4fdc181a5fcd5ae1188ab6ed

This is one of the situations where knowing the CPU architecture involved would help a lot.

Signature · 1 line
Philippe.
#6 lore raw
Quoted 10 lines · Philippe Gerum
Quoted 9 lines · Gilles Chanteperdrix
Quoted 7 lines · Marco Tessore

Thank you, I will try that commit.
But I have another question about it:
does the commit involve the patch to the kernel?
Since my kernel was patched using i-pipe git for the vanilla 3.10, but applied to a customized version of 3.11,
if the commit involves the kernel patch, it can be difficult for me to upgrade.

Quoted 8 lines
Quoted 5 lines

If you kept the ipipe kernel separated from Xenomai kernel sources, the change is a change in xenomai sources, so the update should be painless. If you put the xenomai-patched kernel under source control, then it will be harder.

ENOSYS would rather be symptomatic of this bug which is ARM-specific:
http://git.xenomai.org/ipipe.git/commit/?h=ipipe-3.10&id=e410a5e77323d53277d625e5dafe166cdcd64afb

Indeed. This fix for 3.10 does not seem right though. The real fix is to move the local_restart jump label, as in:

http://git.xenomai.org/ipipe.git/commit/?h=ipipe-3.14&id=d7a5e4762535f55bfff8eafbf1c1dde214d09bd6

Quoted 7 lines

OTOH, the patch below fixes a spurious EINTR error within the task creation syscall, which may well end up in a lockup:
http://git.xenomai.org/xenomai-2.6.git/commit/?id=589882956280d5cb4fdc181a5fcd5ae1188ab6ed

This is one of the situations where knowing the CPU architecture involved would help a lot.

Yes, indeed, should have directed to the "Request for information" page.

Signature · 1 line
                                                                Gilles.
#7 lore raw
Quoted 17 lines · Gilles Chanteperdrix
Quoted 16 lines · Philippe Gerum
Quoted 14 lines · Gilles Chanteperdrix
Quoted 7 lines · Marco Tessore

Thank you, I will try that commit.
But I have another question about it:
does the commit involve the patch to the kernel?
Since my kernel was patched using i-pipe git for the vanilla 3.10, but applied to a customized version of 3.11,
if the commit involves the kernel patch, it can be difficult for me to upgrade.

If you kept the ipipe kernel separated from Xenomai kernel sources, the change is a change in xenomai sources, so the update should be painless. If you put the xenomai-patched kernel under source control, then it will be harder.

Quoted 7 lines
Quoted 2 lines

ENOSYS would rather be symptomatic of this bug which is ARM-specific:
http://git.xenomai.org/ipipe.git/commit/?h=ipipe-3.10&id=e410a5e77323d53277d625e5dafe166cdcd64afb

Indeed. This fix for 3.10 does not seem right though. The real fix is to move the local_restart jump label, as in:

http://git.xenomai.org/ipipe.git/commit/?h=ipipe-3.14&id=d7a5e4762535f55bfff8eafbf1c1dde214d09bd6

Will you issue a supplemental patch?

Signature · 1 line
Philippe.
#8 lore raw
Quoted 21 lines · Philippe Gerum
Quoted 20 lines · Gilles Chanteperdrix
Quoted 18 lines · Philippe Gerum
Quoted 9 lines · Gilles Chanteperdrix
Quoted 7 lines · Marco Tessore

Thank you, I will try that commit.
But I have another question about it:
does the commit involve the patch to the kernel?
Since my kernel was patched using i-pipe git for the vanilla 3.10, but applied to a customized version of 3.11,
if the commit involves the kernel patch, it can be difficult for me to upgrade.

Quoted 5 lines

If you kept the ipipe kernel separated from Xenomai kernel sources, the change is a change in xenomai sources, so the update should be painless. If you put the xenomai-patched kernel under source control, then it will be harder.

ENOSYS would rather be symptomatic of this bug which is ARM-specific:
http://git.xenomai.org/ipipe.git/commit/?h=ipipe-3.10&id=e410a5e77323d53277d625e5dafe166cdcd64afb

Quoted 7 lines
Quoted 4 lines

Indeed. This fix for 3.10 does not seem right though. The real fix is to move the local_restart jump label, as in:

http://git.xenomai.org/ipipe.git/commit/?h=ipipe-3.14&id=d7a5e4762535f55bfff8eafbf1c1dde214d09bd6

Will you issue a supplemental patch?

Done, I have pushed my branch which has other changes, merged with the current state of the ipipe-3.10 branch.

Signature · 1 line
                                                                Gilles.