[riot-devel] [riot-users] Segmentation fault on example

Ludwig Ortmann ludwig.ortmann at fu-berlin.de
Sun Feb 23 11:24:29 CET 2014


Hi Janos,

as you might have noticed, I opened a PR that addresses the problem:
https://github.com/RIOT-OS/RIOT/pull/762

Please check if it works for you:
$ git remote add ludwig https://github.com/LudwigOrtmann/RIOT
$ git fetch ludwig
$ git checkout issue_741

Build your application, run it, post a comment (preferably in github) 
whether it fixes the problem.

Once the PR has been merged, go back to master:
$ git checkout master

Cheers, Ludwig

On 02/17/2014 09:11 PM, Janos Kutscherauer wrote:
> Hi Ludwig,
>
> concerning this issue from the users list, i though with these new clues
> it's more a developer thing?
>
> I tracked down the commit, after which things don't work for me, on both
> my ubuntu machines (although almost identical setup, except hardware).
>
> when i do
>      $ git log
> i get, among others:
>
>      commit 4939473afbcfe981b6411595a3b73e792ae28775
>      Author: Ludwig Ortmann <ludwig.ortmann at fu-berlin.de>
>      Date:   Fri Jan 24 17:03:01 2014 +0100
>
>          guard malloc/free family
>
>      commit 5566734575084cc58e45d7320ffbab15e0efddba
>      Merge: 5c013e1 7148f1d
>      Author: Ludwig Ortmann <ludwig.ortmann at fu-berlin.de>
>      Date:   Thu Jan 23 08:35:01 2014 -0800
>
>          Merge pull request #555 from LudwigOrtmann/tap_error
>
>          improve error messages when tap ioctls fail
>
> when i do
>      $ git checkout 4939473afbcfe981b6411595a3b73e792ae28775
>      $ cd examples/hello-world
>      $ make -B clean all
>      $ make term
> /home/janos/src/riot-os/RIOT/examples/hello-world/bin/native//hello-world.elf
>
>      make: *** [term] Segmentation fault (core dumped)
>
> but with the previous commit
>      $ git checkout 5566734575084cc58e45d7320ffbab15e0efddba
>      $ cd examples/hello-world/
>      $ make -B clean all
>      $ make
> term/home/janos/src/riot-os/RIOT/examples/hello-world/bin/native//hello-world.elf
>
>      RIOT native interrupts/signals initialized.
>      LED_GREEN_OFF
>      LED_RED_ON
>      RIOT native board initialized.
>      RIOT native hardware initialization complete.
>
>      kernel_init(): This is RIOT! (Version: 2014.01-24-g5566-HEAD)
>      Scheduler...[OK]
>      kernel_init(): jumping into first task...
>      Hello World!
>
> So commit "4939473afbcfe981b6411595a3b73e792ae28775" seems to be
> interesting to investigate on, i just don't know yet how to run a diff.
> All pretty new to me...
>
> Oh, and get better soon!
>
> Cheers
> Janos
>
>
>
>
> On 02/17/2014 08:00 PM, Janos Kutscherauer wrote:
>> One more info:
>> my native GCC version is
>> $gcc --version
>> gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
>>
>> Cheers
>> Janos
>>
>>
>>
>> On 02/17/2014 07:08 PM, Janos Kutscherauer wrote:
>>> Hi Ludwig,
>>>
>>> i am having the same problem as reported below by Victor.
>>>
>>> I did:
>>> $ git clone https://github.com/RIOT-OS/RIOT.git
>>> $ cd RIOT/examples/hello-world
>>> $ make -B clean all
>>> $ make term
>>> /home/***/RIOT/examples/hello-world/bin/native/hello-world.elf
>>> make: *** [term] Segmentation fault (core dumped)
>>>
>>> A couple of weeks ago (before the announcement of release 2014.01), i
>>> already had a go on RIOT, and i am pretty sure - yet without proof! -
>>> that i was able to run the hello world example on the native build.
>>> Now i did a git clone again.
>>>
>>> My system is:
>>> - Ubuntu 12.04.4 LTS, x86/32bit
>>> - As cross compiler i use the binaries from
>>> https://launchpad.net/gcc-arm-embedded, version
>>> gcc-arm-none-eabi-4_8-2013q4
>>>
>>> For the versions i'm not so sure, so i try to give some hints:
>>>
>>> GCC-Version:
>>> $ cd
>>>  ./gcc-arm-none-eabi-4_8-2013q4/bin/arm-none-eabi-gcc --version
>>> arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.8.3
>>> 20131129 (release) [ARM/embedded-4_8-branch revision 205641]
>>> Copyright (C) 2013 Free Software Foundation, Inc.
>>> This is free software; see the source for copying conditions. There
>>> is NO
>>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>>> PURPOSE.
>>>
>>> For the libc, i really don't know(, also not much about it!). When i
>>> run as proposed in
>>> http://stackoverflow.com/questions/9705660/check-glibc-version-for-a-particular-gcc-compiler
>>> to find out the version,
>>> $ gcc glibc-version.c -o glibc-version
>>> $ ./glibc-version
>>> GNU libc version: 2.15
>>>
>>> But, compiling it with the cross-compiler (above), doesn't work
>>> $ ~/gcc-arm-none-eabi-4_8-2013q4/arm-none-eabi/bin/gcc
>>> glibc-version.c -o glibc-version
>>> gcc: error trying to exec 'cc1': execvp: No such file or directory
>>>
>>> and also
>>> $ ~/gcc-arm-none-eabi-4_8-2013q4/bin/arm-none-eabi-gcc
>>> glibc-version.c -o glibc-version
>>> glibc-version.c:3:30: fatal error: gnu/libc-version.h: No such file
>>> or directory
>>>  #include <gnu/libc-version.h>
>>>                               ^
>>> compilation terminated.
>>>
>>> Looks like either
>>> - i don't have libc ready for cross-compiling...?
>>> - Don't know how to use my cross-compiler...
>>>
>>>
>>> Do you have any suggestions?
>>>
>>> Thanks,
>>> Janos
>>>
>>>
>>>
>>>
>>>
>>> On 02/13/2014 03:53 PM, Ludwig Ortmann wrote:
>>>> Hi Victor,
>>>>
>>>> which versions of gcc, libc and Linux are you using, and on which
>>>> architecture are you running it?
>>>>
>>>> With current master I don't have any trouble with:
>>>>      cd examples/hello-world
>>>>      make -B clean all
>>>>      make term
>>>>
>>>> Cheers, Ludwig
>>>>
>>>> On Thu, Feb 13, 2014 at 06:42:49AM -0800, Victor Pangaldus wrote:
>>>>> Hi all,
>>>>>
>>>>>
>>>>> I recently found RIOT OS and decide to give it a try. However, I
>>>>> got segmentation fault when I tried to run the example. Here is the
>>>>> step I take:
>>>>> * clone the RIOT source
>>>>>    git clone https://github.com/RIOT-OS/RIOT.git
>>>>> * compile the example for linux machine (I already have the GCC
>>>>> toolchains installed)
>>>>>    cd examples/hello-world
>>>>>   make
>>>>> * run theexample (the .elf file)
>>>>>
>>>>>   ./bin/native/hello-world.elf
>>>>>   Segmentation fault
>>>>> I also tried other example (default) without luck. Is there
>>>>> something that I miss? I have not changed anything on the makefile,
>>>>> and I check that the BOARD is native, which is the correct target
>>>>> (according to the RIOT wiki)  if I want to run it on linux machine.
>>>>>
>>>>>
>>>>> Thanks.
>>>>> Regards,
>>>>> _______________________________________________
>>>>> users mailing list
>>>>> users at riot-os.org
>>>>> http://lists.riot-os.org/mailman/listinfo/users
>>>> _______________________________________________
>>>> users mailing list
>>>> users at riot-os.org
>>>> http://lists.riot-os.org/mailman/listinfo/users
>>>
>>> _______________________________________________
>>> users mailing list
>>> users at riot-os.org
>>> http://lists.riot-os.org/mailman/listinfo/users
>>
>> _______________________________________________
>> users mailing list
>> users at riot-os.org
>> http://lists.riot-os.org/mailman/listinfo/users
>
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> http://lists.riot-os.org/mailman/listinfo/devel


More information about the devel mailing list