[RTEMS Project] #4270: A failing task extension produces zombi objects and resource leaks

RTEMS trac trac at rtems.org
Fri Feb 26 07:51:50 UTC 2021


#4270: A failing task extension produces zombi objects and resource leaks
-----------------------------+------------------------------
 Reporter:  Sebastian Huber  |       Owner:  Sebastian Huber
     Type:  defect           |      Status:  assigned
 Priority:  normal           |   Milestone:  6.1
Component:  score            |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |  Blocked By:
 Blocking:                   |
-----------------------------+------------------------------
Description changed by Sebastian Huber:

Old description:

> In _Thread_Initialize() we have this code:
> {{{
>   _Objects_Open_u32( &information->Objects, &the_thread->Object,
> config->name );
>
>   /*
>    *  We assume the Allocator Mutex is locked and dispatching is
>    *  enabled when we get here.  We want to be able to run the
>    *  user extensions with dispatching enabled.  The Allocator
>    *  Mutex provides sufficient protection to let the user extensions
>    *  run safely.
>    */
>   extension_status = _User_extensions_Thread_create( the_thread );
>   if ( extension_status )
>     return true;
> }}}
> If an extension fails, then the thread object is not closed. Also the
> terminate and delete extensions are not called.

New description:

 In _Thread_Initialize() we have this code:
 {{{
   _Objects_Open_u32( &information->Objects, &the_thread->Object,
 config->name );

   /*
    *  We assume the Allocator Mutex is locked and dispatching is
    *  enabled when we get here.  We want to be able to run the
    *  user extensions with dispatching enabled.  The Allocator
    *  Mutex provides sufficient protection to let the user extensions
    *  run safely.
    */
   extension_status = _User_extensions_Thread_create( the_thread );
   if ( extension_status )
     return true;
 }}}
 If an extension fails, then the thread object is not closed. Also the
 delete extensions are not called. If a later create extension fails, the
 earlier create extensions may have allocated resources which could be
 freed by a corresponding delete extension.

--

--
Ticket URL: <http://devel.rtems.org/ticket/4270#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list