INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Feb 20 14:13:05 UTC 2018



----- Am 19. Feb 2018 um 16:33 schrieb Matthew J Fletcher amimjf at gmail.com:

> For those interested the callstack looks like this;
> 
> bsp_fatal_extension() at bspclean.c:32 0x700d42ba
> _User_extensions_Iterate() at userextiterate.c:175 0x700ef42a
> _User_extensions_Fatal() at userextimpl.h:307 0x700eb9b2
> _Terminate() at interr.c:35 0x700eb9b2
> _Internal_error() at interr.c:52 0x700eb9e2
> _Thread_Do_dispatch() at threaddispatch.c:186 0x700edd0a
> _Thread_Dispatch_enable() at threaddispatch.h:227 0x700ef0f8
> _Thread_Change_life() at threadrestart.c:684 0x700ef0f8
> _Thread_Set_life_protection() at threadrestart.c:691 0x700ef10c
> _API_Mutex_Lock() at apimutexlock.c:29 0x700eae86
> _RTEMS_Lock_allocator() at allocatormutex.c:26 0x700eae6a
> _Region_Get_and_lock() at regionimpl.h:76 0x700e9cdc
> rtems_region_get_segment() at regiongetsegment.c:68 0x700e9cdc
> ...
> ... some of my code ...
> ...
> _Thread_Handler() at threadhandler.c:134 0x700edde2
> _Thread_Get() at threadget.c:38 0x700edda8
> 
> Its not clear to me what the issue might be.

You call rtems_regions_get_segment() at thread context with interrupts disabled.  This is potentially very bad for interrupt latency in general and undefined behaviour on ARMv7-M (thus the fatal error to avoid tedious debugging).



More information about the users mailing list