Lock Assertion in Capture Engine

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Apr 11 13:43:01 UTC 2014


Hello Joel,

the interrupt enable/disable must be replaced with ISR lock acquire/release for 
SMP support.  Please have a look at the attached patch.

On 2014-04-11 15:18, Joel Sherrill wrote:
> Hi
>
> I thought it would be quicker to simply ask and get insight than bang
> heads on a Friday. Building RTEMS with debug enabled, running the
> sample/capture, you get an assertion on a lock inconsistency.
>
> Since Sebastian did the lock checking and Chris wrote this code, I was
> hoping one of you would have a quick answer.
>
> (gdb) r
> Starting program:
> /home/joel/rtems-4.11-work/b-sis/./sparc-rtems4.11/c/sis/testsuites/samples/capture/capture.exe
>
>
>
> *** BEGIN OF TEST CAPTURE ENGINE ***
> Press any key to start capture engine (20s remaining)
> Press any key to start capture engine (19s remaining)
> Press any key to start capture engine (18s remaining)
> Press any key to start capture engine (17s remaining)
> Press any key to start capture engine (16s remaining)
> Press any key to start capture engine (15s remaining)
>
> Monitor ready, press enter to login.
>
> 1-rtems $ cwceil 100
> watch ceiling is 100.
> 1-rtems $ cwfloor 102
> watch floor is 102.
> 1-rtems $ cwglob on
> assertion "_Debug_Is_owner_of_giant()" failed: file
> "../../../../../../rtems/c/src/../../cpukit/libmisc/capture/capture.c",
> line 1372, function: rtems_capture_watch_global
>
> Breakpoint 1, _Terminate
> (the_source=the_source at entry=RTEMS_FATAL_SOURCE_ASSERT,
>      is_internal=is_internal at entry=false, the_error=the_error at entry=33825456)
>      at ../../../../../../rtems/c/src/../../cpukit/score/src/interr.c:36
> 36    {
> (gdb) bt
> #0  _Terminate (the_source=the_source at entry=RTEMS_FATAL_SOURCE_ASSERT,
>      is_internal=is_internal at entry=false, the_error=the_error at entry=33825456)
>      at ../../../../../../rtems/c/src/../../cpukit/score/src/interr.c:36
> #1  0x02010aa0 in rtems_fatal
> (source=source at entry=RTEMS_FATAL_SOURCE_ASSERT,
>      error=error at entry=33825456) at
> ../../../../../../rtems/c/src/../../cpukit/sapi/src/fatal2.c:34
> #2  0x0200a66c in __assert_func (
>      file=0x20331e0
> "../../../../../../rtems/c/src/../../cpukit/libmisc/capture/capture.c",
> line=1372,
>      func=func at entry=0x2033330 <__FUNCTION__.6346>
> "rtems_capture_watch_global",
>      failedexpr=failedexpr at entry=0x2032188 "_Debug_Is_owner_of_giant()")
>      at
> ../../../../../../rtems/c/src/../../cpukit/libcsupport/src/__assert.c:52
> #3  0x02007e28 in rtems_capture_watch_global (enable=enable at entry=true)
>      at
> ../../../../../../rtems/c/src/../../cpukit/libmisc/capture/capture.c:1383
> #4  0x02003d70 in rtems_capture_cli_watch_global (argc=2,
> argv=<optimized out>,
>      command_arg=<optimized out>, verbose=<optimized out>)
>      at
> ../../../../../../rtems/c/src/../../cpukit/libmisc/capture/capture-cli.c:939
> #5  0x02018574 in rtems_monitor_task (monitor_flags=0)
>      at
> ../../../../../../rtems/c/src/../../cpukit/libmisc/monitor/mon-editor.c:590
> #6  0x02020d48 in _Thread_Handler ()
>      at
> ../../../../../../rtems/c/src/../../cpukit/score/src/threadhandler.c:192
> #7  0x02020bdc in _Thread_Handler ()
>      at
> ../../../../../../rtems/c/src/../../cpukit/score/src/threadhandler.c:96
> (gdb) q
> A debugging session is active.
>
>      Inferior 1 [process 42000] will be killed.
>
> Quit anyway? (y or n) y
>


-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-capture-Use-ISR-lock-for-SMP-support.patch
Type: text/x-patch
Size: 14039 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20140411/580c9098/attachment.bin>


More information about the devel mailing list