Failure in cpukit/score/src/rbtreeextract.c if RTEMS_DEBUG is defined

Heinz Junkes junkes at fhi-berlin.mpg.de
Thu Feb 13 16:25:36 UTC 2020


Using qoriq_e500 BSP
if configured with --enable-rtems-debug :

../../rtems-5.0.0-m1912/configure --enable-maintainer-mode --prefix=/home/epics/MVME2500/RTEMS/5.0.0-m1912 --target=powerpc-rtems5 --enable-rtemsbsp=qoriq_e500 --enable-posix --enable-cxx --disable-networking --enable-pci --enable-rtems-debug BSP_CONSOLE_BAUD=9600

Booting fails with
…
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 03ff9000, end 03fff04a ... OK
assertion "_RBTree_Find_root( the_node ) == _RBTree_Root( the_rbtree )" failed: file "../../../../../../rtems-5.0.0-m1912/c/src/../../cpukit/score/src/rbtreeextract.c", line 40, function: _RBTree_Extract

*** FATAL ***
fatal source: 7 (RTEMS_FATAL_SOURCE_ASSERT)
fatal code: 35124824 (0x0217f658)
RTEMS version: 5.0.0-m1912.31caabffdc8d155913422d99a648297bebd83831-modified
RTEMS tools: 7.5.0 20191114 (RTEMS 5, RSB 31caabffdc8d155913422d99a648297bebd83831-modified, Newlib d14714c69)
executing thread ID: 0x08b010002


The addressed file looks like this:

epics at epics:~/MVME2500/RTEMS_DEV/rtems-5.0.0-m1912$ cat -n cpukit/score/src/rbtreeextract.c
     1	/*
     2	 *  Copyright (c) 2010 Gedare Bloom.
     3	 *
     4	 *  The license and distribution terms for this file may be
     5	 *  found in the file LICENSE in this distribution or at
     6	 *  http://www.rtems.org/license/LICENSE.
     7	 */
     8
     9	#if HAVE_CONFIG_H
    10	#include "config.h"
    11	#endif
    12
    13	#include <rtems/score/rbtreeimpl.h>
    14
    15	RB_GENERATE_REMOVE_COLOR( RBTree_Control, RBTree_Node, Node, static )
    16
    17	RB_GENERATE_REMOVE( RBTree_Control, RBTree_Node, Node, static )
    18
    19	#if defined(RTEMS_DEBUG)
    20	static const RBTree_Node *_RBTree_Find_root( const RBTree_Node *the_node )
    21	{
    22	  while ( true ) {
    23	    const RBTree_Node *potential_root;
    24
    25	    potential_root = the_node;
    26	    the_node = _RBTree_Parent( the_node );
    27
    28	    if ( the_node == NULL ) {
    29	      return potential_root;
    30	    }
    31	  }
    32	}
    33	#endif
    34
    35	void _RBTree_Extract(
    36	  RBTree_Control *the_rbtree,
    37	  RBTree_Node    *the_node
    38	)
    39	{
    40	  _Assert( _RBTree_Find_root( the_node ) == _RBTree_Root( the_rbtree ) );
    41	  RB_REMOVE( RBTree_Control, the_rbtree, the_node );
    42	  _RBTree_Initialize_node( the_node );
    43	} 

In Release RTEMS_5.0.0-m2002, the corresponding file is the same.

Gruss Heinz


More information about the users mailing list