All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: "Alessio Margan @ IIT" <alessio.margan@iit.it>
Cc: xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] segfault using rt_printf service
Date: Fri, 14 Sep 2012 17:11:57 +0200	[thread overview]
Message-ID: <5053493D.3040000@xenomai.org> (raw)
In-Reply-To: <5053404B.9000006@iit.it>

On 09/14/2012 04:33 PM, Alessio Margan @ IIT wrote:
> Hi all,
> 
> I'm switching from xenomai 2.5.6 to 2.6.1 using 
> adeos-ipipe-2.6.38.8-x86-2.11-01.patch
> In this test I have 2 threads :
> - rx_udp receive udp packets from dsp boards at 1kHz
> - boards_test send udp packets at 1kHz
> 
> I got segfault in printer_loop thread, the point is that if I change env 
> var RT_PRINT_PERIOD to about 10 or 1000 (default is 100 ms) I do not 
> have segfault.
> 
> Any suggestion ?
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xb7d1ab70 (LWP 5998)]
> 0xb7d7cb0c in fwrite () from /lib/i686/cmov/libc.so.6
> (gdb) bt
> #0  0xb7d7cb0c in fwrite () from /lib/i686/cmov/libc.so.6
> #1  0xb7fccbf9 in print_buffers () from /usr/xenomai/lib/libxenomai.so.0
> #2  0xb7fcd867 in printer_loop () from /usr/xenomai/lib/libxenomai.so.0
> #3  0xb7fb5955 in start_thread () from /lib/i686/cmov/libpthread.so.0
> #4  0xb7dec5ee in clone () from /lib/i686/cmov/libc.so.6

Since you seem to be able to catch the error with gdb, maybe try and
understand the reason for the segfault? The first, quick check, is to
type "info register", type cat /proc/pid/maps in another terminal, and
check that the stack pointer is in a valid mapping, to check if we do
not have a stack overflow.

If you fail to find the error, please try and reduce the test program to
a simple test case, as simple as needed for the bug to happen and post
it on this mailing list, this would allow us to reproduce the issue.

-- 
					    Gilles.


  reply	other threads:[~2012-09-14 15:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 14:33 [Xenomai] segfault using rt_printf service Alessio Margan @ IIT
2012-09-14 15:11 ` Gilles Chanteperdrix [this message]
2012-09-14 15:41   ` Alessio Margan @ IIT
2012-09-14 16:54     ` Gilles Chanteperdrix
2012-09-14 18:41 ` Gilles Chanteperdrix
2012-09-18 20:22   ` Gilles Chanteperdrix
2012-09-19  8:21     ` Alessio Margan @ IIT

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=5053493D.3040000@xenomai.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=alessio.margan@iit.it \
    --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.