From: Jan Kiszka <jan.kiszka@domain.hid>
To: Roderik_Wildenburg@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: AW: [Xenomai-help] memset of heap crashes Xenomai-Task
Date: Tue, 11 Jul 2006 08:22:39 +0200 [thread overview]
Message-ID: <44B343AF.2030706@domain.hid> (raw)
In-Reply-To: <5D63919D95F87E4D9D34FF7748CE2C2A3F9204@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 2129 bytes --]
Roderik_Wildenburg@domain.hid wrote:
>> First of all, I'm not sure if that 8K of stack is enough on
>> PPC with 2.4, on x86 over 2.6 it isn't. The native skin picks
>> PTHREAD_STACK_MIN*4 for you by default. Is this too much?
>> Unless dealing with dozens of
>> *simple* threads, reducing this makes no sense to me.
>
> ?? Greping for PTHREAD_STACK_MIN xenomai/posix/pthread.h tells me,
> it is 1024. 1024*4=4096. This is less than 8192 ;-)
That's for the kernel-space usage of the posix skin. In user-space you
have to look at /usr/include:
/usr/include/bits/local_lim.h:#define PTHREAD_STACK_MIN 16384
(glibc-2.4, x86 of course)
> Is there a differnce between x86 and PPC.
> (I simply did not realize that there is a default value for
> the stacksize. Therfore I choose my own value, which was based on my
> vxWorks experince)
Again, that /might/ be fine on PPC, cannot tell.
>
>
>> Then there was this bug:
>>
>> @@ -168,13 +169,13 @@
>> void root_thread_exit(void)
>> {
>> int i;
>> - RT_HEAP_INFO *hpinfo;
>> + RT_HEAP_INFO hpinfo;
>>
>> printf("UDP->root_thread_exit\n");
>>
>> for(i=0;i<MAXHEAPBLOCKS;i++)
>> {
>> - if( !rt_heap_inquire(&bigheap[i],hpinfo) )
>> + if( !rt_heap_inquire(&bigheap[i],&hpinfo) )
>> rt_heap_delete(&bigheap[i]);
>> }
>
> Thank you ! 4 eyes see more than 2.
> (but this is probably not the reason for the segmentation fault, as
> this routine is called for exit only !?)
True.
> But even after correcting this error, I get segmentation faults (not
> with
> the first start but with the second or third)
>
>
>> Now I get some other strange effects (e.g. kernel oopses after OOM
>> oopses) that need a closer look under qemu later.
>
I re-tried the setup, but was "only" able to find a 2.6-kernel bug in
the OOM roll-back path of vmalloc (2.4 is unaffected). The other issue,
totally failing rt_heap_alloc, was not reproducable. I must have messed
something up on the test box at work.
So this means I cannot trigger your problem here on x86/2.6, sorry.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]
next prev parent reply other threads:[~2006-07-11 6:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-11 6:09 AW: [Xenomai-help] memset of heap crashes Xenomai-Task Roderik_Wildenburg
2006-07-11 6:22 ` Jan Kiszka [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-07-11 6:25 Roderik_Wildenburg
2006-07-11 8:09 ` Wolfgang Grandegger
2006-07-11 8:22 ` Jan Kiszka
2006-07-11 8:42 ` Wolfgang Grandegger
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=44B343AF.2030706@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=Roderik_Wildenburg@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.