All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Philipp Keller <philipp.keller@domain.hid>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] troubles deleting tasks
Date: Fri, 10 Nov 2006 15:44:55 +0100	[thread overview]
Message-ID: <45549067.1070003@domain.hid> (raw)
In-Reply-To: <4554875A.9060401@domain.hid>

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

Philipp Keller wrote:
> Thank you Jan.
> 
> As to your answer:
> That must be a different issue. Check /proc/xenomai/rtdm/open_fildes for
> any leftover (CAN) file descriptor. Note that rt_dev_close() can fail if
> the descriptor is busy. And such thing can happen if you simply kill the
> task that currently blocks on a CAN device e.g.
> 
> The correct ordering is therefore: close the sockets, catch the failure
> in the blocking threads, and make them self-terminate. Granted, note the
> most comfortable situation, but I'm sure we can improve it in the future
> (e.g. via auto-cleanup also for RTDM file descriptors).
> 
> I am actually doing that quite defensively I think, as you see in the
> code snippet:
[...]

That code looks sane (for UP systems), and you are dumping all errors so
that I can assume a non-closed socket would have been detected.

So we now need more information on your precise issues, which are still
two as I see it: rt_task_delete(&main) (actually a non-issue as I
explained) and the failing re-opening of the CAN device.

What error codes do you get? Can you derive a simple demo program that
exposes the error and can be analysed by us?

Jan


PS: Yet another lacking reply-to-all...


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

      parent reply	other threads:[~2006-11-10 14:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-10 13:17 [Xenomai-help] troubles deleting tasks Philipp Keller
2006-11-10 13:31 ` Philippe Gerum
2006-11-11  9:31   ` Philippe Gerum
2006-11-10 13:38 ` Jan Kiszka
     [not found]   ` <4554875A.9060401@domain.hid>
2006-11-10 14:44     ` 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=45549067.1070003@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=philipp.keller@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.