xenomai.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Heber, Stefan" <Stefan.Heber@zwickroell.com>,
	"xenomai@lists.linux.dev" <xenomai@lists.linux.dev>
Subject: Re: Sporadic segfault upon start of Linux app while Xenomai app is running
Date: Thu, 31 Aug 2023 10:01:09 +0200	[thread overview]
Message-ID: <f81a2ae7-f859-4da7-8135-ef25db5acadf@siemens.com> (raw)
In-Reply-To: <FR2P281MB26546E4A8786BBB886160D45FCE6A@FR2P281MB2654.DEUP281.PROD.OUTLOOK.COM>

On 30.08.23 11:41, Heber, Stefan wrote:
> Hello Jan,
> 
> we see that the standard application always seems to crash very soon,
> at least main() does not (yet?) appear in backtrace. We have only 2 frames
> in the backtrace without any debug info, not even function names.
> We don't know if this problem occurs with standard x86 image because we
> don't use xenomai in qemu images. We don't think it has anything to do
> with the kernel config.
> As you will probably anyway have a standard image running it will be
> easy to find out whether it is reproducible, with our script you will, 
> if reproducible, see segfaults within seconds.

Confirmed, also with the most recent ipipe-core-5.4.253-x86-14 and my
local config. Debugging.

Jan

> 
> Stefan
> 
> -----Original Message-----
> From: Jan Kiszka <jan.kiszka@siemens.com> 
> Sent: Monday, August 28, 2023 6:29 PM
> To: Heber, Stefan <Stefan.Heber@zwickroell.com>; xenomai@lists.linux.dev
> Subject: Re: Sporadic segfault upon start of Linux app while Xenomai app is running
> 
> On 28.08.23 15:40, Heber, Stefan wrote:
>> Dear list,
>>
>> we again have some trouble with xenomai (x64 / 3.2.3 / ipipe /
>> linux 5.4.105): If we start a simple non-xenomai program while a xenomai
>> program running a thread in SCHED_FIFO (in our case prio 99) and getting
>> scheduled frequently, we sometimes (in our case with a probability of
>> 0.2%) experience a segfault upon start of the simple program.
>>
>> We reduced this case to a very simple xenomai app that endlessly runs a
>> loop with only nanosleep and a simple "hello world" non-xenomai app. The
>> sources of both you can find attached to this email, together with a
>> Makefile and a bash script that starts helloworld 1000000 times and
>> counts errors. Additionally you can find the config of our xenomai build
>> there.
>>
>> We also experimented with xenomai versions a bit:
>> - xenomai 3.2.3 ipipe with linux 5.4.105 shows the problem
>> - xenomai 3.2.2 ipipe with linux 5.4.105 shows the problem
>>   => it isn't a side effect of the patch you developed for us a while ago
>>   and that is included in 3.2.3
>> - xenomai 3.2.3 dovetail with linux 5.10.127 is clean.
>>
>> Could you please have a look into that?
>>
> 
> Is this reproducible with a standard x86 image, maybe even qemu, which
> we generate from xenomai-images? Or does it need specific kernel config
> settings?
> 
> Did you already try to find out more about the crash of that standard
> application? Does it always fail over the same instruction or same type
> of operation?
> 
> Jan
> 
> --
> Siemens AG, Technology
> Linux Expert Center
> 

-- 
Siemens AG, Technology
Linux Expert Center


      reply	other threads:[~2023-08-31  8:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-28 13:40 Sporadic segfault upon start of Linux app while Xenomai app is running Heber, Stefan
2023-08-28 16:28 ` Jan Kiszka
2023-08-30  9:41   ` Heber, Stefan
2023-08-31  8:01     ` Jan Kiszka [this message]

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=f81a2ae7-f859-4da7-8135-ef25db5acadf@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=Stefan.Heber@zwickroell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).