All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] tcb alloc fail in main_overlay
@ 2018-07-30 20:32 Steve Freyder
  2018-08-02 15:18 ` Philippe Gerum
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Freyder @ 2018-07-30 20:32 UTC (permalink / raw)
  To: xenomai@xenomai.org

With 3.0.7, it seems that I'm still doing something bad to the pshared
heap.  I haven't gotten to a trimmed-down test case yet, but
I'm seeing this:

    0"033.613| BUG in main_overlay(): [main] failed to allocate main tcb

Is there any kind of pshared heap analyzer I can use to check for
corruption?

I don't see any status display that shows utilization for
the pshared heap (like /proc/xenomai/heap does for other kinds of heaps),
is there some debug I need to enable?

Best regards,
Steve



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Xenomai] tcb alloc fail in main_overlay
  2018-07-30 20:32 [Xenomai] tcb alloc fail in main_overlay Steve Freyder
@ 2018-08-02 15:18 ` Philippe Gerum
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2018-08-02 15:18 UTC (permalink / raw)
  To: Steve Freyder, xenomai@xenomai.org

On 07/30/2018 10:32 PM, Steve Freyder wrote:
> With 3.0.7, it seems that I'm still doing something bad to the pshared
> heap.  I haven't gotten to a trimmed-down test case yet, but
> I'm seeing this:
> 
>    0"033.613| BUG in main_overlay(): [main] failed to allocate main tcb
> 

You may want to use gdb to debug this, setting a breakpoint in the
overlay routine where the assertion trips. The first hit is ok, this
should be the main() context creating its own tcb. Any subsequent call
of the overlay routine for the same process would be wrong. Dumping the
stack backtrace at this point should point at the offender.

> Is there any kind of pshared heap analyzer I can use to check for
> corruption?
> 

Nope. But you may want to build with --enable-debug=full to enable all
internal checks (caution: this may slow execution significantly).

> I don't see any status display that shows utilization for
> the pshared heap (like /proc/xenomai/heap does for other kinds of heaps),
> is there some debug I need to enable?
> 

/proc exports the status of kernel objects created by Cobalt, the shared
heap is merely a userland beast in this respect. AFAIR, the fuse-based
registry should expose this information for your process.

-- 
Philippe.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-02 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-30 20:32 [Xenomai] tcb alloc fail in main_overlay Steve Freyder
2018-08-02 15:18 ` Philippe Gerum

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.