All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Petr Cervenka <grugh@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Hang at glibc time() function call
Date: Sat, 29 Nov 2008 02:24:22 +0100	[thread overview]
Message-ID: <493099C6.1070807@domain.hid> (raw)
In-Reply-To: <200811281542.2528@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]

Petr Cervenka wrote:
> Hello,
> we have a problems with hanging of our real-time application. In fact, the computer stops to respond totally.
> I succeeded to find the exact hang position in couple of our tasks (but not all of them) by setting of some digital outputs of HW device:
> 1) The most real-time task with the highest priority is still running as it should be (100us period).
> 2) Some of the tasks are in "sleep" state. They are waiting on some event or timeout.
> 3) One low priority task seems to be blocked at glibc time() function call.

Is the low priority task also mapped as Xenomai task? In that case
calling standard Linux time services can be lethal:

If the Linux clocksource is TSC or HPET, glibc will use a syscall-less
variant for time of day reading. That variant has two properties:

A) It doesn't switch Xenomai task into secondary mode like ordinary
   syscalls do.

B) It can deadlock with the Linux kernel, leaving the caller spinning
   forever so that Linux is no longer executed.

The testsuite's clocktest used to have this issue as well (luckily, I
was able to analyze it over KVM with a source level debugger :) ).

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  parent reply	other threads:[~2008-11-29  1:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200811281535.7647@domain.hid>
     [not found] ` <200811281536.819@domain.hid>
     [not found]   ` <200811281537.16959@domain.hid>
     [not found]     ` <200811281538.1680@domain.hid>
     [not found]       ` <200811281539.441@domain.hid>
     [not found]         ` <200811281540.19192@domain.hid>
     [not found]           ` <200811281541.22553@domain.hid>
     [not found]             ` <200811281542.10754@domain.hid>
2008-11-28 14:42               ` [Xenomai-help] Hang at glibc time() function call Petr Cervenka
2008-11-28 16:01                 ` Gilles Chanteperdrix
2008-11-29  1:24                 ` Jan Kiszka [this message]
2008-12-01 10:28                   ` Petr Cervenka

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=493099C6.1070807@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=grugh@domain.hid \
    --cc=xenomai@xenomai.org \
    /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.