All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helder Daniel <hdaniel@ualg.pt>
To: Philippe Gerum <rpm@xenomai.org>
Cc: "Xenomai@xenomai.org" <Xenomai@xenomai.org>
Subject: Re: [Xenomai] Xenomai/cobalt: low_init(): binding failed: Function not implemented error issued when trting to run latency app on xeno 3.x-rc3
Date: Wed, 4 Mar 2015 23:30:47 +0000	[thread overview]
Message-ID: <CAKk99t0z4Tq==LTzFK_9cmbrDTZ+RFt2vo=ur56VbVG3sso_iQ@mail.gmail.com> (raw)
In-Reply-To: <54F73E7A.2070100@xenomai.org>

ok.
Here is the backtrace of "binder" process with gdb:

root@debian:~/xenomaiRegistryCheck# gdb binder
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/xenomaiRegistryCheck/binder...done.
(gdb) r
Starting program: /root/xenomaiRegistryCheck/binder
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
[New Thread 0xb7fdeb70 (LWP 4409)]
[New Thread 0xb7cb5b70 (LWP 4410)]

Program received signal SIGSEGV, Segmentation fault.
0xb76cdc10 in ?? ()
(gdb) bt
#0  0xb76cdc10 in ?? ()
#1  0xb7fafa29 in hash_search (t=0xb7cd9110, key=key@entry=0xb7fca217,
len=12)
    at hash.c:193
#2  0xb7fa5015 in cluster_init (c=c@entry=0xb7fcddfc,
    name=name@entry=0xb7fca217 "alchemy.task") at cluster.c:118
#3  0xb7fa526a in syncluster_init (sc=0xb7fcddfc,
    name=name@entry=0xb7fca217 "alchemy.task") at cluster.c:214
#4  0xb7fc25c9 in alchemy_init () at init.c:102
#5  0xb7fa6ea3 in copperplate_init (argcp=argcp@entry=0xbffffc10,
    argvp=argvp@entry=0xbffffc14) at init.c:635
#6  0xb7fa75d3 in copperplate_main (argc=1, argv=0xbffffcb4) at main.c:27
#7  0xb7df8e46 in __libc_start_main ()
   from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#8  0x080484f1 in _start ()
(gdb)




On 4 March 2015 at 17:18, Philippe Gerum <rpm@xenomai.org> wrote:

> On 03/04/2015 04:26 PM, Helder Daniel wrote:
> > I reinstall xenomai enabling debug support:
> >
> > /usr/xenomai/sbin/version -a
> > Xenomai/mercury v3.0-rc3 --
> > Target: i686-pc-linux-gnu
> > Compiler: gcc version 4.7.2 (Debian 4.7.2-5)
> > Build args:  '--with-core=mercury' '--enable-registry'
> > '--enable-pshared' '--prefix=/usr/xenomai' '--enable-debug'
> >
>
> Looks good.
>
> > Then I removed all the code from the second process (binder.c), now
> > main() its empty.
> >
> > Running binder.c while creator.c is running, still gives a segmentation
> > fault.
> >
> > Since now there is no code in binder.c I compile it with no Xenomai
> > support, just gcc binder.c -o binder.
> > This way it runs (of course does nothing) without segmentation fault.
> >
> > So it must be something in the initialization of the Xenomai app.
>
> Ack.
>
> > And only happens when another Xenomai app (creator.c) is running.
> >
>
> In shared mode, it seems.
>
> > I did not backtrace it with gdbg yet, but I recompile it (main() still
> > empty) with Xenomai support and make an strace -f (while creator.c is
> > still running).
>
> gdb will pinpoint the exact location of this fault.
>
> > It seems that the segmentation fault happens when trying to lock memory
> > pages in RAM (called by the initialization code):
> >
> > [pid  3907] mlockall(MCL_CURRENT|MCL_FUTURE) = 0
> > [pid  3907] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> > [pid  3908] +++ killed by SIGSEGV +++
> > [pid  3909] +++ killed by SIGSEGV +++
>
> strace only reports system calls, with mlockall returning a success
> status, so the segfault happens later.
>
> I'll build your test case and dig this issue tomorrow. Thanks for your
> patient reports, this will help fixing up the rough edges.
>
> --
> Philippe.
>



-- 
Helder Daniel
UALG - FCT
DEEI

http://w3.ualg.pt/~hdaniel

  reply	other threads:[~2015-03-04 23:30 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03  8:49 [Xenomai] Xenomai/cobalt: low_init(): binding failed: Function not implemented error issued when trting to run latency app on xeno 3.x-rc3 Helder Daniel
2015-03-03 10:17 ` Philippe Gerum
     [not found]   ` <CAKk99t3_g0ZODEe32KGAzfHckWC=-Gqr6CrFa5yRh-hLF5Ttow@mail.gmail.com>
2015-03-03 13:59     ` Philippe Gerum
2015-03-03 14:07       ` Philippe Gerum
2015-03-03 14:58         ` Helder Daniel
2015-03-03 15:03           ` Helder Daniel
2015-03-03 15:03           ` Philippe Gerum
2015-03-03 15:40             ` Helder Daniel
2015-03-03 15:44               ` Philippe Gerum
2015-03-03 16:38                 ` Helder Daniel
2015-03-03 17:03                   ` Philippe Gerum
2015-03-03 17:06                     ` Philippe Gerum
2015-03-03 17:23                       ` Helder Daniel
2015-03-03 19:24                         ` Philippe Gerum
2015-03-03 19:31                           ` Philippe Gerum
2015-03-03 19:50                             ` Helder Daniel
2015-03-03 20:09                               ` Philippe Gerum
     [not found]                                 ` <CAKk99t0Xh01uxG7jd=oEDD71LBHvTnbCnejwiP2bzGN63Yo-ZA@mail.gmail.com>
2015-03-04  8:40                                   ` Philippe Gerum
2015-03-04 11:21                                     ` Helder Daniel
2015-03-04 11:40                                       ` Philippe Gerum
2015-03-04 14:25                                         ` Helder Daniel
2015-03-04 14:29                                           ` Philippe Gerum
2015-03-04 15:26                                             ` Helder Daniel
2015-03-04 17:18                                               ` Philippe Gerum
2015-03-04 23:30                                                 ` Helder Daniel [this message]
2015-03-15 16:20                                                   ` Philippe Gerum
2015-03-16 18:58                                                     ` Helder Daniel
2015-03-16 19:21                                                       ` Philippe Gerum
2015-03-17 15:30                                                         ` Philippe Gerum
     [not found]                                                         ` <CAKk99t2ZsNmY4myJAF+H3hWNpHN4bVm255QEsU6Nu+ytG-B0dA@mail.gmail.com>
     [not found]                                                           ` <550837E2.9050701@xenomai.org>
     [not found]                                                             ` <CAKk99t2eGYME0BsLCjJV7VMm8VU_2okmpd8sYfMb_02sTvOfLQ@mail.gmail.com>
     [not found]                                                               ` <55083DA4.3080201@xenomai.org>
     [not found]                                                                 ` <CAKk99t0pG6HWOucFXDw1-_5-=EGQ7faqA22yVog6Ye6TcGjevA@mail.gmail.com>
     [not found]                                                                   ` <550850D5.9060207@xenomai.org>
     [not found]                                                                     ` <CAKk99t0q3iNcah1Us79hJUjjHQCr2rEPu9gukSNjO2a6+Gk3sg@mail.gmail.com>
     [not found]                                                                       ` <CAKk99t3wP-WLemoO_bbsvE4uwh-Sh-5eGPJrM=6cAc5edyQW5Q@mail.gmail.com>
     [not found]                                                                         ` <5508600D.4020500@xenomai.org>
2015-03-17 17:19                                                                           ` Helder Daniel
2015-03-19 17:23                                                                             ` Philippe Gerum
2015-03-19 18:29                                                                               ` Philippe Gerum
2015-03-23 10:59                                                                                 ` Helder Daniel
2015-03-23 11:01                                                                                   ` Helder Daniel
2015-03-23 11:16                                                                                   ` Philippe Gerum
2015-03-23 11:47                                                                                     ` Helder Daniel
2015-03-23 11:47                                                                                       ` Helder Daniel
2015-03-23 12:11                                                                                         ` Helder Daniel
2015-03-23 13:21                                                                                         ` Philippe Gerum
2015-03-23 13:55                                                                                           ` Helder Daniel
2015-03-30 16:51                                                                                             ` Helder Daniel
2015-03-31  7:27                                                                                               ` Philippe Gerum
2015-03-31 10:04                                                                                                 ` Helder Daniel

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='CAKk99t0z4Tq==LTzFK_9cmbrDTZ+RFt2vo=ur56VbVG3sso_iQ@mail.gmail.com' \
    --to=hdaniel@ualg.pt \
    --cc=Xenomai@xenomai.org \
    --cc=rpm@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.