All of lore.kernel.org
 help / color / mirror / Atom feed
From: at91_enthus <nwromania@domain.hid>
To: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Xenomai 2.6.0 - kernel seg faults on AT91
Date: Sun, 06 Nov 2011 14:37:14 -0600	[thread overview]
Message-ID: <4EB6EFFA.6060103@domain.hid> (raw)
In-Reply-To: <4EB6EDBB.1060707@domain.hid>

On 11/06/2011 02:27 PM, Gilles Chanteperdrix wrote:
> On 11/06/2011 09:23 PM, at91_enthus wrote:
>> On 11/06/2011 02:02 PM, Gilles Chanteperdrix wrote:
>>> On 11/06/2011 08:54 PM, at91_enthus wrote:
>>>> On 11/06/2011 01:03 PM, Gilles Chanteperdrix wrote:
>>>>> On 11/06/2011 08:00 PM, at91_enthus wrote:
>>>>>> On 11/06/2011 12:32 PM, Gilles Chanteperdrix wrote:
>>>>>>> On 11/06/2011 07:25 PM, at91_enthus wrote:
>>>>>>>> On 11/06/2011 12:10 PM, at91_enthus wrote:
>>>>>>>>> On 11/06/2011 12:01 PM, Gilles Chanteperdrix wrote:
>>>>>>>>>> On 11/06/2011 06:56 PM, at91_enthus wrote:
>>>>>>>>>>> Hi.
>>>>>>>>>>>
>>>>>>>>>>> I gave Xenomai 2.6.0 a try and installed a newly patched kernel on my
>>>>>>>>>>> AT91SAM9G20 board.
>>>>>>>>>>>
>>>>>>>>>>> Here is my setup:
>>>>>>>>>>>
>>>>>>>>>>> proc:   AT91SAM9G20
>>>>>>>>>>> kernel: 2.6.35.9
>>>>>>>>>>> OS: embedded Debian Squeeze
>>>>>>>>>>>
>>>>>>>>>>> The board boots fine up to stage 2 (user terminal). Sometimes, I am able
>>>>>>>>>>> to get a login terminal, despite seg fault messages.
>>>>>>>>>>>
>>>>>>>>>>> A similar behavior occurs in a Xenomai capable 2.6.37 kernel, only
>>>>>>>>>>> without the fault messages. In this case the board simply freezes.
>>>>>>>>>>>
>>>>>>>>>>> I included the files (.config and fault messages) in the attachments.
>>>>>>>>>>>
>>>>>>>>>> You enabled CONFIG_FCSE_GUARANTEED, I do not think Debian squeeze can
>>>>>>>>>> boot with that, you need a real embedded filesystem, or use
>>>>>>>>>> CONFIG_FCSE_BEST_EFFORT.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> Since I've started looking in to Xenomai, I have been using FCSE
>>>>>>>>> "guaranteed" and "best efort"  along with both Debian Squeeze and Lenny
>>>>>>>>> (Xenomai 2.5 series) without any issues.
>>>>>>>>>
>>>>>>>>> I'll change the FCSE setting to see if I get a different behavior.
>>>>>>>>>
>>>>>>>>> Regards.
>>>>>>>> I put the results for CONFIG_FCSE_BEST_EFFORT in the attachment.
>>>>>>> Unusable. To make it usable, the following options are lacking:
>>>>>>> CONFIG_FCSE_MESSAGES
>>>>>>> CONFIG_FRAME_POINTER
>>>>>> I couldn't find this option.
>>>>> You need to disable STACK_UNWIND. Without it, some stack traces are
>>>>> unreadable such as the one you keep sending.
>>>>>
>>>> rc.local looked suspicious in the debug messages.
>>>>
>>>> To be more exact, it contained the following lines:
>>>>
>>>> #! /bin/sh
>>>> chmod 777 /proc/xenomai/latency
>>>> echo "1000" > /proc/xenomai/latency
>>>> exit 0
>>>>
>>>> The setting came from the previous installation, because I kept getting
>>>> negative values for latencies.
>>> Note that you can hardwire a value for the latency in the kernel
>>> configuration.
>>>
>>>> Anyway, I removed the offending lines and my system boots correctly. If
>>>> I enter the lines by hand, I get no segfaults. However, if I try to
>>>> execute /etc/rc.local (with the two lines uncommented) by hand, the
>>>> kernel seg faults and the system freezes.
>>>>
>>>>  Odd.
>>> Yes, really odd. I am unable to reproduce this issue.
>>>
>>> What was the last version known to be working?
>>>
>> I think I found the main culprit, although I can't figure out the mechanism.
>>
>> In an earlier post, I stated that the contents in rc.local crashed the
>> system and if I entered the lines manually nothing happened.
>>
>> BASH is used at console level, sh in rc.local.
>>
>> If I set "sh" in the console and execute the two lines manually, the
>> system locks. Therefore, for some strange reason, sh is detrimental to
>> xenomai.
>>
>> The question is why this happens in 2.6 and not 2.5.*.
> The bug you have is a fault during a copy_from_user made by xenomai when
> writing to /proc/xenomai/latency, it probably has nothing to do with sh.
> I am simply trying to understand how this could happen, as on my AT91
> board there is no such behaviour (as should be).
>
>>  
>>
>> _______________________________________________
>> Xenomai-help mailing list
>> Xenomai-help@domain.hid
>> https://mail.gna.org/listinfo/xenomai-help
>>
>
Just switched "sh" to "bash" in rc.local.
It simply works. I booted the board 3 times with no issues.


  reply	other threads:[~2011-11-06 20:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 17:56 [Xenomai-help] Xenomai 2.6.0 - kernel seg faults on AT91 at91_enthus
2011-11-06 18:01 ` Gilles Chanteperdrix
2011-11-06 18:10   ` at91_enthus
2011-11-06 18:14     ` Gilles Chanteperdrix
2011-11-06 18:25     ` at91_enthus
2011-11-06 18:32       ` Gilles Chanteperdrix
2011-11-06 19:00         ` at91_enthus
2011-11-06 19:03           ` Gilles Chanteperdrix
2011-11-06 19:54             ` at91_enthus
2011-11-06 20:02               ` Gilles Chanteperdrix
2011-11-06 20:08                 ` at91_enthus
2011-11-06 20:21                   ` Gilles Chanteperdrix
2011-11-06 20:23                 ` at91_enthus
2011-11-06 20:27                   ` Gilles Chanteperdrix
2011-11-06 20:37                     ` at91_enthus [this message]
2011-11-06 20:43                       ` Gilles Chanteperdrix
2011-11-06 19:39 ` Gilles Chanteperdrix

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=4EB6EFFA.6060103@domain.hid \
    --to=nwromania@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.