All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Russell Johnson <russell.johnson@kratosdefense.com>
Cc: "xenomai@lists.linux.dev" <xenomai@lists.linux.dev>
Subject: Re: Weird debugger behavior with events
Date: Sun, 24 Jul 2022 10:39:53 +0200	[thread overview]
Message-ID: <87h736rj6a.fsf@xenomai.org> (raw)
In-Reply-To: <87sfmsmc9h.fsf@xenomai.org>


Philippe Gerum <rpm@xenomai.org> writes:

> Russell Johnson <russell.johnson@kratosdefense.com> writes:
>
>> [[S/MIME Signed Part:Undecided]]
>> I ended up adding an xbuf and another thread to better replicate what I was 
>> seeing and exacerbate the issue. I can verify that all 3 threads show up as 
>> expected under "evl ps -l". You can just run the debugger with no breakpoints, 
>> and you should see the "-1 error occurred" message printed to the console at 
>> least once. You can also put a breakpoint on that print after the 
>> evl_timedwait_event call, and the breakpoint should get hit just about every 
>> time. Lastly, you can run the compiled app outside of gdb, and see that the 
>> error message is never printed out.
>>
>>
>> // g++ -Wall -g -o test 
>> test.cpp -I/opt/evl/include -L/opt/evl/lib -levl -lpthread
>>
>
> Ack. Working on this shortly. Thanks for the test code.

Please pull these kernel patches:
https://source.denx.de/Xenomai/xenomai4/linux-evl/-/commit/0d2d4fbfe3311a3ef419864cd4f1c6ddfd017a2c
https://source.denx.de/Xenomai/xenomai4/linux-evl/-/commit/6dd3b2e4c3a535f49595cb2463aadefec7f8670d

You may also want this one from libevl, although it is not required (but
recommended nevertheless):
https://source.denx.de/Xenomai/xenomai4/libevl/-/commit/c55ea95fdd4a790cf3905a2660d458e0cb518516

In short, the issue was due to unwanted syscall restart upon
signal. Fixing this was the opportunity to straighten the behavior of
the event mechanism upon interrupted wait.

The test code made it possible to spot the issue quickly, thanks.

-- 
Philippe.

  reply	other threads:[~2022-07-24  8:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21 15:40 Weird debugger behavior with events Russell Johnson
2022-07-23  9:02 ` Philippe Gerum
2022-07-24  8:39   ` Philippe Gerum [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-07-20 14:49 Russell Johnson
2022-07-20 17:33 ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h736rj6a.fsf@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=russell.johnson@kratosdefense.com \
    --cc=xenomai@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.