All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Charles Kiorpes <ckiorpes@gmail.com>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Segfaults and ENOMEM during rt_event_create()
Date: Thu, 13 Aug 2015 18:21:32 +0200	[thread overview]
Message-ID: <55CCC40C.3060105@xenomai.org> (raw)
In-Reply-To: <CAHoW4hFqOT=o10R8w-qxoHti1=aE5HLOohQvk7xk-PGD+_=XKQ@mail.gmail.com>

On 08/13/2015 01:39 PM, Charles Kiorpes wrote:
> Hello Philippe,
> I have spent the past few days stressing my application and trying to
> get the problem to reproduce, so that I could better debug it and
> provide more information.  However, my current configuration seems to
> be fixed.
> 
> I made three changes (still using rc6):
> 1 - Fixed the small bug mentioned in your first patch in this thread
> 2 - Reordered event creation logic so that rt_event_bind() is used to
> check existence before rt_event_create() is called
> 3 - Increased the heap sizes in the kernel configuration again
> (system=1024, shared=256, private=256)
> 

I'd be interested to know whether the bug re-appears when this latter
increase is not done, only keeping #1 and #2.

> These changes have me up and running on an x86 system.
> 
>> You should retry with the current head of the -next branch with Cobalt.
> I'll switch to the -next branch and continue testing.  I'm also doing
> an ARM port of the app, and was having some small problems with shared
> heap initialization, so maybe I can resume work there.

It's great that you made some progress. Meanwhile, I reviewed the shared
heap management lately and some stuff there wasn't quite right. This is
the list of recent commits in the -next tree that may/might concern your
application, with some notes:

{rpm@raven} git log --reverse --oneline -13
23bb315 lib/cobalt: fix private event state accessor

This commit contains the patch mentioned in #1.

fab0540 kernel/cobalt: Add reason to gorelax trace point
6dfdc69 cobalt/arm: Detect software breakpoints

Unrelated stuff.

033976a lib/cobalt/heapobj: pshared: allow group access to heap

You need this one to bind several processes with different euids to a
single session, provided they all belong to a common gid.

fa3092a copperplate/semobj: add uninit cleanup helper
824d831 copperplate/eventobj: add uninit cleanup helper
9e3cbdb alchemy/event: prevent double-free on error path
ac6fb1c alchemy/sem: prevent double-free on error path

The four commits above fix the double deletion bug occurring upon an
attempt to create a sema4 or an event with a conflicting name, using the
Alchemy API. This may certainly have caused havoc in the heap when
happening. This should allow you to drop the work around based on
rt_event_bind() mentioned in #2.

f333317 vxworks/memPartLib: fix invalid status from addToPool
f928e4d vxworks/memPartLib: do not account for failed alloc

Some fixups for the Vxworks API users who depend on memory partitions.

65f16f4 copperplate/heapobj-pshared: fix and sanitize extent management

This one is addresses several issues in the shared heap management,
particularly when extending embedded heaps (like the VxWorks API does).
Alchemy did not use the extension service, but I would recommend to pull
those sanitizing changes nevertheless.

0da6b0d boilerplate/ancillaries: add routine to parse mem size
b151d3b copperplate/init: disambiguate --mem-pool-size argument

Not directly related. This said, this commit clarifies the argument to
--mem-pool-size. You probably want to pass --mem-pool-size=400k with
this patch in.

> 
> Thanks for all your help!
> 
> -Charles
> 


-- 
Philippe.


  reply	other threads:[~2015-08-13 16:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05 13:09 [Xenomai] Segfaults and ENOMEM during rt_event_create() Charles Kiorpes
2015-08-05 15:42 ` Philippe Gerum
2015-08-05 16:34   ` Charles Kiorpes
2015-08-06  7:42     ` Philippe Gerum
2015-08-05 17:24   ` Gilles Chanteperdrix
2015-08-06  7:40     ` Philippe Gerum
2015-08-06  7:49       ` Gilles Chanteperdrix
2015-08-06  8:00         ` Philippe Gerum
2015-08-06  9:25           ` dietmar.schindler
2015-08-06 15:12             ` Philippe Gerum
     [not found]   ` <CAHoW4hHS2QS1td6mUiWid-unDrMDZaQMo3vkYsDynNze5YsaSw@mail.gmail.com>
     [not found]     ` <55C326C5.4070608@xenomai.org>
2015-08-06 15:00       ` Charles Kiorpes
2015-08-06 15:23         ` Philippe Gerum
2015-08-06 15:26           ` Philippe Gerum
2015-08-10 13:52           ` Charles Kiorpes
2015-08-10 15:01             ` Philippe Gerum
2015-08-10 15:17               ` Charles Kiorpes
2015-08-10 15:40                 ` Philippe Gerum
2015-08-13 11:14                 ` Philippe Gerum
2015-08-13 11:39                   ` Charles Kiorpes
2015-08-13 16:21                     ` Philippe Gerum [this message]
2015-08-10 15:50             ` Philippe Gerum
2015-08-11 15:17             ` Philippe Gerum
2015-08-11 15:14         ` Philippe Gerum

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=55CCC40C.3060105@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=ckiorpes@gmail.com \
    --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.