public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Stack error...
@ 2001-07-19 17:20 Cristiano Ligieri Pereira
  2001-07-19 18:12 ` Jonathan Larmour
  0 siblings, 1 reply; 3+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-07-19 17:20 UTC (permalink / raw)
  To: ecos-discuss

I consistently getting this error in my application after it's running for
a while:

ASSERT FAIL: <4>[102]void Cyg_HardwareThread::check_stack() Stack base
corrupt

How could I corrupt the base of my stack? 

I'm using some debugging printf's within the kernel instead of TRACING
cause the TRACING messages are too big... Could it be a possible problem?

Thanks,
Cristiano.

PS: I'm running it using Linux-synthetic

------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira

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

* Re: [ECOS] Stack error...
  2001-07-19 17:20 [ECOS] Stack error Cristiano Ligieri Pereira
@ 2001-07-19 18:12 ` Jonathan Larmour
  2001-07-20 10:12   ` Cristiano Ligieri Pereira
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Larmour @ 2001-07-19 18:12 UTC (permalink / raw)
  To: Cristiano Ligieri Pereira; +Cc: ecos-discuss

Cristiano Ligieri Pereira wrote:
> 
> I consistently getting this error in my application after it's running for
> a while:
> 
> ASSERT FAIL: <4>[102]void Cyg_HardwareThread::check_stack() Stack base
> corrupt
> 
> How could I corrupt the base of my stack?

Something has scribbled over it. This generally means the stack has grown
until it's reached its limit at the bottom, indicating you either have
something looping accidentally, or need to increase your stack size.

> I'm using some debugging printf's within the kernel instead of TRACING
> cause the TRACING messages are too big... Could it be a possible problem?

printf() does kernel operations like lock mutexes and so on. If used from
_within_ the kernel I could easily imagine it causing you to fill up your
stack, due to effectively calling into itself again and again. Try
diag_printf() from <cyg/infra/diag.h> if you don't mind it being somewhat
simpler than standard printf().

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/

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

* Re: [ECOS] Stack error...
  2001-07-19 18:12 ` Jonathan Larmour
@ 2001-07-20 10:12   ` Cristiano Ligieri Pereira
  0 siblings, 0 replies; 3+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-07-20 10:12 UTC (permalink / raw)
  To: ecos-discuss

It seems to be working fine with the diag_printf instead of printf. At
least it has been run for several hours already without any crash.

Thanks,
Cristiano.

> > I'm using some debugging printf's within the kernel instead of TRACING
> > cause the TRACING messages are too big... Could it be a possible problem?
> 
> printf() does kernel operations like lock mutexes and so on. If used from
> _within_ the kernel I could easily imagine it causing you to fill up your
> stack, due to effectively calling into itself again and again. Try
> diag_printf() from <cyg/infra/diag.h> if you don't mind it being somewhat
> simpler than standard printf().

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

end of thread, other threads:[~2001-07-20 10:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-19 17:20 [ECOS] Stack error Cristiano Ligieri Pereira
2001-07-19 18:12 ` Jonathan Larmour
2001-07-20 10:12   ` Cristiano Ligieri Pereira

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).