public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] cyg_thread_delay on ARM7 crashes randomly
@ 2006-05-01 17:52 Brett Delmage
  2006-05-01 17:54 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Brett Delmage @ 2006-05-01 17:52 UTC (permalink / raw)
  To: ECOS mailing list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1341 bytes --]

I have a simple test program, a simplification of the TwoThreads program. 
All it does is initialize and resume one thread. The single thread calls 
cyg_thread_delay(1) in a loop.

The target is a minor variation of the Philips LPC 2106, running on a 
Philips LPC2114 ARM7. Compiler is GCC 3.4.2

The program crashes after a random period of time, ranging from almost 
immediately to maybe tens of seconds. But when I enable tracing, dumping 
trace messages to serial port 0 at 9600 baud, the program has run for over 
half an hour without crashing.

There is no other I/O or source of interrupts occuring other than the real 
time clock, that I am aware of.

When the program crashes, my JTAG debugger shows the 
PC at ffff ffd7, and all other registers = ffff ffff

Putting breakpoints on all the vectors except IRQ doesn't trigger when the 
crash occurs. A breakpoint at the IRQ does trigger, indicating the clock 
interrurpt is occurring, and also triggering the debugger breakpoint.

This looks like an interrupt occurring when it shouldn't but who knows.

I'm have no idea why my debugger (Ashling PFARM and Opella) stops when the 
program crashes.

All ideas, including debugging suggestions very much welcomed.

Finally, A big thanks to Daniel Néri whose advise helped me get the LPC 
serial port working great last week.

Brett


[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] cyg_thread_delay on ARM7 crashes randomly
  2006-05-01 17:52 [ECOS] cyg_thread_delay on ARM7 crashes randomly Brett Delmage
@ 2006-05-01 17:54 ` Andrew Lunn
  2006-05-01 18:52   ` Brett Delmage
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Lunn @ 2006-05-01 17:54 UTC (permalink / raw)
  To: Brett Delmage; +Cc: ECOS mailing list

On Mon, May 01, 2006 at 01:52:26PM -0400, Brett Delmage wrote:
> I have a simple test program, a simplification of the TwoThreads program. 
> All it does is initialize and resume one thread. The single thread calls 
> cyg_thread_delay(1) in a loop.
> 
> The target is a minor variation of the Philips LPC 2106, running on a 
> Philips LPC2114 ARM7. Compiler is GCC 3.4.2
> 
> The program crashes after a random period of time, ranging from almost 
> immediately to maybe tens of seconds. But when I enable tracing, dumping 
> trace messages to serial port 0 at 9600 baud, the program has run for over 
> half an hour without crashing.
> 
> There is no other I/O or source of interrupts occuring other than the real 
> time clock, that I am aware of.
> 
> When the program crashes, my JTAG debugger shows the 
> PC at ffff ffd7, and all other registers = ffff ffff
> 
> Putting breakpoints on all the vectors except IRQ doesn't trigger when the 
> crash occurs. A breakpoint at the IRQ does trigger, indicating the clock 
> interrurpt is occurring, and also triggering the debugger breakpoint.
> 
> This looks like an interrupt occurring when it shouldn't but who knows.
> 
> I'm have no idea why my debugger (Ashling PFARM and Opella) stops when the 
> program crashes.
> 
> All ideas, including debugging suggestions very much welcomed.

Do you have CYGPKG_INFRA_DEBUG enabled? Enabling it might give some
interesting results.

            Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] cyg_thread_delay on ARM7 crashes randomly
  2006-05-01 17:54 ` Andrew Lunn
@ 2006-05-01 18:52   ` Brett Delmage
  2006-05-02  8:55     ` Nick Garnett
  0 siblings, 1 reply; 4+ messages in thread
From: Brett Delmage @ 2006-05-01 18:52 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ECOS mailing list

On Mon, 1 May 2006, Andrew Lunn wrote:

> Do you have CYGPKG_INFRA_DEBUG enabled? Enabling it might give some
> interesting results.

Yes, with all assert options enabled. Nothing is reported. I only see 
output when I also have CYGDBG_USE_TRACING enabled, but then that seems to 
mask the problem. Heisenbug.


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] cyg_thread_delay on ARM7 crashes randomly
  2006-05-01 18:52   ` Brett Delmage
@ 2006-05-02  8:55     ` Nick Garnett
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2006-05-02  8:55 UTC (permalink / raw)
  To: Brett Delmage; +Cc: Andrew Lunn, ECOS mailing list

Brett Delmage <Brett.Delmage@twobikes.ottawa.on.ca> writes:

> On Mon, 1 May 2006, Andrew Lunn wrote:
> 
> > Do you have CYGPKG_INFRA_DEBUG enabled? Enabling it might give some
> > interesting results.
> 
> Yes, with all assert options enabled. Nothing is reported. I only see 
> output when I also have CYGDBG_USE_TRACING enabled, but then that seems to 
> mask the problem. Heisenbug.

Since this problem is timing based, using tracing is not going to
help. You could try turning on instrumentation and when the crash
occurs take a look at the instrumentation buffer from JTAG and see
what was happening just before.

Given that eCos doesn't exhibit this problem on other platforms, the
most likely cause of this is a bug in the LPC2xxx HAL. So you should
probably concentrate your efforts there. 


-- 
Nick Garnett                                 eCos Kernel Architect
http://www.ecoscentric.com            The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

end of thread, other threads:[~2006-05-02  8:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-01 17:52 [ECOS] cyg_thread_delay on ARM7 crashes randomly Brett Delmage
2006-05-01 17:54 ` Andrew Lunn
2006-05-01 18:52   ` Brett Delmage
2006-05-02  8:55     ` Nick Garnett

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).