2010-05-27 04:50:53     Run traps_test for all exception in bf516 v0.1,but watchdogd cannot reset system

Document created by Aaronwu Employee on Aug 21, 2013
Version 1Show Document
  • View in full screen mode

2010-05-27 04:50:53     Run traps_test for all exception in bf516 v0.1,but watchdogd cannot reset system

Bill Xie (CHINA)

Message: 89910   

 

Hi,

 

    When I test watchdog in bf516 by traps_test program.

 

root:/dev> ps

  PID USER       VSZ STAT COMMAND

    1 root       108 S    /init

    2 root         0 SW<  [kthreadd]

    3 root         0 SW<  [ksoftirqd/0]

    4 root         0 SW<  [watchdog/0]

    5 root         0 SW<  [events/0]

    6 root         0 SW<  [khelper]

   36 root         0 SW<  [kblockd/0]

   43 root         0 SW<  [kmmcd]

   61 root         0 SW   [pdflush]

   62 root         0 SW   [pdflush]

   63 root         0 SW<  [kswapd0]

  107 root         0 SW<  [mtdblockd]

  109 root         0 SW<  [bfin-spi.0]

  131 root         0 SW<  [krxrpcd/0]

  136 root         0 SW<  [mmcqd]

  166 root         0 SWN  [jffs2_gcd_mtd2]

  168 root        40 S    inetd

  169 root       456 S    -/bin/sh

  170 root        32 S    /bin/watchdogd -f -s

  282 root       344 R    ps

 

root:/dev> traps_test 0 54

 

Running test 0 for exception 0x01: EXCPT 0x01

... PASS (test failed, as expected by signal 5: Trace/breakpoint trap)

 

Running test 1 for exception 0x02: EXCPT 0x02

... Unimplmented exception occured

- Maybe you forgot to install a custom exception handler?

Deferred Exception context

CURRENT PROCESS:

COMM=traps_test PID=175

 

        .........................

 

Return addresses in stack:

   frame  1 : <0x007d0994> [ traps_test + 0x954 ]

    address : <0x007d3e48> [ traps_test + 0x3e08 ]

   frame  2 : <0x007d2f50> [ traps_test + 0x2f10 ]

   frame  3 : <0x007c25ca> [ traps_test + 0x25ca ]

    address : <0x007d04ec> [ traps_test + 0x4ac ]

    address : <0x007d8f9e> [ traps_test + 0x8f9e ]

    address : <0x007d8fa6> [ traps_test + 0x8fa6 ]

PASS (test failed, as expected by signal 7: Bus error)

 

55/55 tests passed

 

But when test over, the system is not reset by watchdogd. How to solve this problem?

 

Thank you.

 

Regards

 

-Bill

QuoteReplyEditDelete

 

 

2010-05-27 14:04:40     Re: Run traps_test for all exception in bf516 v0.1,but watchdogd cannot reset system

Mike Frysinger (UNITED STATES)

Message: 89923   

 

why would the system reset via watchdog ?  the traps_test should not cause the watchdog to trigger.

QuoteReplyEditDelete

 

 

2010-05-27 21:43:51     Re: Run traps_test for all exception in bf516 v0.1,but watchdogd cannot reset system

Bill Xie (CHINA)

Message: 89932   

 

Mike,

 

    Thank you .I aim to do that  if my program die, let watchdog can catch the exception to rest system  in order to my program restart. My program may be appear exception like traps_test. If it happens to lead program

 

died, I want to program auto restart not by handle way. So I want the watchdog to do this work.

 

Regards

 

-Bill

QuoteReplyEditDelete

 

 

2010-05-27 22:44:58     Re: Run traps_test for all exception in bf516 v0.1,but watchdogd cannot reset system

Mike Frysinger (UNITED STATES)

Message: 89933   

 

exceptions do not cause the watchdog to fire.  there is no code in the kernel to do this kind of thing.

 

if you want your system to reboot when your application dies, then write your own watchdog daemon.  when your app it isnt running, have it reboot the system directly and/or not pet the watchdog.

QuoteReplyEditDelete

 

 

2010-05-27 23:55:18     Re: Run traps_test for all exception in bf516 v0.1,but watchdogd cannot reset system

Bill Xie (CHINA)

Message: 89937   

 

Mike,

 

    Thank you, I ask you a question about watchdog.

 

       docs.blackfin.uclinux.org/doku.php?id=watchdog. This doc talk about watchdog:

 

    A watchdog timer is a hardware device that will reset the system when certain fault conditions are met.

 

  What is certain fault conditions ?

 

 

 

Best Regards

 

-Bill

QuoteReplyEditDelete

 

 

2010-05-28 00:41:09     Re: Run traps_test for all exception in bf516 v0.1,but watchdogd cannot reset system

Mike Frysinger (UNITED STATES)

Message: 89938   

 

whatever you define it as.  from the hardware perspective, it means the watchdog timer wasnt reset.  it is up to software to reset it.

Attachments

    Outcomes