Skip to contentSkip to conversation

mmap() segfaults

Xenomai John Morris 2 participants 2 messages Jan 18, 2013

lore
Share & tools
lore
#0 lore raw

Hi list,

The linux 3.5.7/i-ipipe ipipe-gch for-core-3.5.7/xenomai master packages haven't been tested much yet, but both el6 and deb packages seem to be working great. Those will be available in the next day or so.

For the use of others, I prefer the linux 3.5.3/xenomai 2.6.2 combination, since it has undergone more testing. There's a problem mixing the 3.5.3 kernel with xenomai-2.6.git master. The mprotect regression is failing again, but in a different way.

Details follow, but the thing I've lost track of is which version of Xenomai the kernel was prepared with, 2.6.2 (/proc/xenomai/version says 2.6.2) or git master. Is it a rule that the kernel must be prepared from the same Xenomai source tree as the installed runtime tools? In that case, the packages must be modified with the proper dependency information. Otherwise, here's the report:

First run:

++ /usr/lib64/xenomai/regression/posix/mprotect memory read
memory write after exec enable
memory write after write enable
memory read/write after access enable
FAILURE main:102: read zero returned 255 instead of 0

Second and subsequent runs slightly different:

++ /usr/lib64/xenomai/regression/posix/mprotect memory read
FAILURE main:69: read mem returned 255 instead of 0

Then curiously, some non-xenomai applications that work fine before the regression test begin to segfault in mmap() when run after the test; a simple example is 'git fetch'. Nothing funny in dmesg; kernel .config and strace linked below.

After a reboot, everything is normal again until the regression test is rerun.

The released 2.6.2 tools work fine with the same kernel, and the i-pipe

John

http://www.zultron.com/static/2013/01/xenomai/3.5.3-mmap-segfault/kernel.config.txt

http://www.zultron.com/static/2013/01/xenomai/3.5.3-mmap-segfault/strace.log

#1 lore raw
Quoted 10 lines · John Morris

Hi list,

The linux 3.5.7/i-ipipe ipipe-gch for-core-3.5.7/xenomai master packages haven't been tested much yet, but both el6 and deb packages seem to be working great. Those will be available in the next day or so.

For the use of others, I prefer the linux 3.5.3/xenomai 2.6.2 combination, since it has undergone more testing. There's a problem mixing the 3.5.3 kernel with xenomai-2.6.git master. The mprotect regression is failing again, but in a different way.

That is expected, you need a fix in the I-pipe kernel. 2.6.2.1 will be released using the 3.5.7 kernel, containing the fix for this issue. 3.5.3 is a dead end now.

Quoted 4 lines

Then curiously, some non-xenomai applications that work fine before the regression test begin to segfault in mmap() when run after the test; a simple example is 'git fetch'. Nothing funny in dmesg; kernel .config and strace linked below.

That is expected.

Signature · 1 line
                                                                Gilles.