Skip to contentSkip to conversation

rt,Heap segfault with unittest

Xenomai Benjamin ROUZAUD 2 participants 3 messages Dec 1, 2016 – Dec 27, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello,

We made a new 32 bits system with xeno v3.0.3 .
first question, do we need to switch to git/next branch or keep it ?

During the execution of program using the library xenomai, we met a
problem about allocation memory between two process. Indeed, with a same
session, one program create the differents areas of memories but the
next try and fail. We create a unittest case that reproduces the bug between the
two process. But , since the problem has happened "randomly", depending on running context, we hope you will be able to reproduce it.

Xenomai is configure with this flags : --enable-smp, --enable-pshared --enable-dlopen-libs --enable-tls

You will found the differents files at google drive (cf https://drive.google.com/drive/folders/0B7MmKH2j6iMYWjJfTzVOcFVTRDQ?usp=sharing).

You will find modification of /alchemy/heap.c file trying to search for the error at processing time. (cf enclosed heap.txt file)

You will find too the two tests programs with a makefile in enclosed heaptest.tar.gz file. The process B create differents allocation areas and pauses.

projetB --session=t

the process C tries to create or link differents allocation areas but it crashes with segfault after many creation.

projetC --session=t

Cordially,
B. Rouzaud
R&D Numalliance

#2 lore raw
Quoted 4 lines · Benjamin ROUZAUD

the process C tries to create or link differents allocation areas but it crashes with segfault after many
creation.

Then you may want to run your test application over GDB, and inspect the stack backtrace for locating the offending code. You could also build it for Mercury in debug mode (--enable-debug=full) instead of Cobalt, and use Valgrind to detect memory errors.

Signature · 1 line
Philippe.
#3 lore raw
In reply to Benjamin ROUZAUD
Quoted 5 lines · Benjamin ROUZAUD

Hello,

We made a new 32 bits system with xeno v3.0.3 .
first question, do we need to switch to git/next branch or keep it ?

-next branch contains bleeding edge material scheduled for the next major Xenomai release.

Since you are running the 3.0.x series, please check any issue against the stable-3.0.x branch from the xenomai-3 repository first, before reporting to the list if it did not go away.

http://xenomai.org/getting-the-xenomai-code/

Signature · 1 line
Philippe.