All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Christensen <jbc@domain.hid>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] kernel threads crash
Date: Tue, 12 Apr 2011 16:09:19 +0200	[thread overview]
Message-ID: <4DA45D0F.4090501@domain.hid> (raw)
In-Reply-To: <4DA45660.4000003@domain.hid>

Speaking of rtpc, could there be a race condition when using a
rtdm_lock_t to synchronize between a linux thread and a xenomai thread?

/Jesper


On 2011-04-12 15:40, Jan Kiszka wrote:
> On 2011-04-12 15:31, Jesper Christensen wrote:
>   
>>  
>>
>> I have managed to print the stack of a faulting thread:
>>
>> Xenomai: suspending kernel thread b911f518 ('rtnet-rtpc') at
>> nip=0xb911f940, lr=0xb911f940, r1=0xaf2c4580 after exception #1792
>>
>> Xenomai: dumping stack at af2c4600
>> Xenomai: 0xaf2c45ec - 0xaf2c45fc:       00000000 af2c4600 8009a334
>> 00000000 00000000
>> Xenomai: 0xaf2c45d8 - 0xaf2c45e8:       00000000  0 00000000 00000000
>> 00000000
>> Xenomai: 0xaf2c45c4 - 0xaf2c45d4:       b911f518  0 00000000 af2c45f0
>> 8009a364
>> Xenomai: 0xaf2c45b0 - 0xaf2c45c0:       00000000  0 00000000 00000000
>> 00000000
>> Xenomai: 0xaf2c459c - 0xaf2c45ac:       00000000  0 00000000 b911f518
>> 8009a334
>> Xenomai: 0xaf2c4588 - 0xaf2c4598:       00000000 b911f4e0 af2c45d0
>> b911649c 00000000
>> Xenomai: 0xaf2c4574 - 0xaf2c4584:       805e3988 8000000 805a89f0
>> 00000001 b911f940
>> Xenomai: 0xaf2c4560 - 0xaf2c4570:       b911f940 20000000 22000022
>> b911ebb8 00000700
>> Xenomai: 0xaf2c454c - 0xaf2c455c:       805a89f0 b911f940 00029000
>> ffffffff 8009b2e4
>> Xenomai: 0xaf2c4538 - 0xaf2c4548:       00000000 b911ebb8 805e50c4
>> 805e3988 805a89f0
>> Xenomai: 0xaf2c4524 - 0xaf2c4534:       00100100 ffffffff 00000000
>> af2c4580 8000bf48
>> Xenomai: 0xaf2c4510 - 0xaf2c4520:       00000000  0 00000000 00000000
>> 00200200
>> Xenomai: 0xaf2c44fc - 0xaf2c450c:       805e3988 22000022 00000000
>> 00000000 00000000
>>
>> Manually decoded link register words:
>> ---------------------------------------------------------------------------------------------------------
>> 8009a334:
>> $ powerpc-linux-gnu-addr2line -e vmlinux 0x8009a334
>> linux-2.6.29.6/arch/powerpc/include/asm/xenomai/bits/pod.h:168
>>
>> 8009a364:
>> $ powerpc-linux-gnu-addr2line -e vmlinux 0x8009a364
>> linux-2.6.29.6/arch/powerpc/include/asm/xenomai/bits/pod.h:172
>>
>> b911649c:
>> $ powerpc-linux-gnu-addr2line -e
>> ../3rd_party/XM-Linux/rtnet_build/stack/rtnet.ko 0x249c
>> rtnet_build/stack/rtnet_rtpc.c:201
>>
>> 8000bf48:
>> $ powerpc-linux-gnu-addr2line -e vmlinux 0x8000bf48
>> linux-2.6.29.6/arch/powerpc/kernel/ipipe.c:429  
>> (ipipe_trigger_irq(unsigned irq) at local_irq_restore_hw(flags);)
>>
>> ---------------------------------------------------------------------------------------------------------
>>
>> Notice the "r1" register in the first line i assume should point to a
>> back chain word, but the value is 00000001 and the "link register" word
>> immediately after is b911f940 which points to:
>> # grep b911f940 /proc/kallsyms
>> b911f940 b pending_calls_lock   [rtnet]
>>
>>
>> I'm not sure of the significance of the stack frame after that one.
>>
>>     
> IIRC, you said that you are using rtnet-rtpc for a special use case.
> Given the fact that this interface very well documented and highly
> intuitive to use ;), I wouldn't be too surprised if you ran into a race
> or an invalid use case.
>
> Is the rtpc-using code part of your tarball? If so, can you break it out
> and explain on it how you use rtpc?
>
> Jan
>
>   



  parent reply	other threads:[~2011-04-12 14:09 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 12:58 [Xenomai-core] kernel threads crash Jesper Christensen
2011-04-08 13:12 ` Philippe Gerum
2011-04-08 13:20   ` Jesper Christensen
2011-04-08 13:39     ` Philippe Gerum
2011-04-08 13:47       ` Jesper Christensen
2011-04-08 14:33       ` Jesper Christensen
2011-04-11 14:13   ` Jesper Christensen
2011-04-11 14:18     ` Philippe Gerum
2011-04-11 14:20       ` Jesper Christensen
2011-04-11 14:27         ` Philippe Gerum
2011-04-11 14:32           ` Jesper Christensen
2011-04-11 14:39             ` Philippe Gerum
2011-04-11 14:49               ` Jesper Christensen
2011-04-11 15:31                 ` Jesper Christensen
2011-04-12 13:31                   ` Jesper Christensen
2011-04-12 13:39                     ` Gilles Chanteperdrix
2011-04-12 13:40                       ` Jesper Christensen
2011-04-12 13:40                     ` Jan Kiszka
2011-04-12 13:45                       ` Jesper Christensen
2011-04-12 14:09                       ` Jesper Christensen [this message]
2011-04-12 14:14                         ` Jan Kiszka
2011-04-12 14:21                           ` Jesper Christensen
2011-04-12 15:24                             ` Jan Kiszka
2011-04-12 15:50                               ` Jesper Christensen
2011-04-19  7:26                             ` Jesper Christensen
2011-04-19  7:39                               ` Philippe Gerum
2011-04-19  7:58                                 ` Jesper Christensen
2011-04-19  8:02                                   ` Philippe Gerum
2011-04-19  8:42                                     ` Gilles Chanteperdrix
2011-04-19  9:29                                       ` Philippe Gerum
2011-04-19  9:30                                         ` Philippe Gerum
2011-04-19  9:34                                           ` Jesper Christensen
2011-04-11 14:34         ` Philippe Gerum
2011-04-11 14:35           ` Jesper Christensen
2011-04-11 14:23       ` Philippe Gerum
2011-04-11 14:36     ` Gilles Chanteperdrix
2011-04-08 19:15 ` Richard Cochran
2011-04-11  6:52   ` Jesper Christensen
2011-04-11  6:55     ` Richard Cochran
2011-04-11  6:59       ` Jesper Christensen
2011-04-11  9:18         ` Jan Kiszka
2011-04-11  9:26           ` Jesper Christensen

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=4DA45D0F.4090501@domain.hid \
    --to=jbc@domain.hid \
    --cc=jan.kiszka@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.