H8SX port having problems in _User_extensions_Thread_create()

Joel Sherrill joel.sherrill at OARcorp.com
Thu Aug 21 16:54:29 UTC 2008


Steven Grunza wrote:
> There's a line in cpukit/score/src/userextthreadcreate.c in the function
> _User_extensions_Thread_create() that reads:
>
>       status = (*the_extension->Callouts.thread_create)(
> _Thread_Executing, the_thread );
>
> This appears to be calling _libc_create_hook() with the first argument
> set to 0x00487eb0 and the second argument set to 0.
>
>   
It looks like you are being invoked during initialization
since _Thread_Executing is the IDLE thread.  Priority is
255 below.

the_thread should not be 0 in this case.  Did the create work?

Do you have valid parameters back the stack trace?

Something looks very broken.
> 0x00487eb0 is the value of the_thread and appears to be somewhat sane.
> A dump of the structure is below.
>
>
> Where can I find the documentation on _libc_create_hook()?  I'm not
> certain it should be getting called at this point (the crash happens
> early in the startup process somewhere between the calling of this
> function and it's return.
>
>   
It looks like it is being called when the init task is created.

Without more of a trace,  I guess you might have blown
the initialization stack or have the initialization stack
and workspace area (or C program heap) overlapping.
> Any help appreciated.
>
>
>
>
> Here's the dump.  It looks better on-screen but inserting graphics into
> e-mail doesn't always work well for communities with *nix, Windows, and
> Mac members.
>
>
>
>
>
> the_thread      0x00487eb0 { ER5 }      (Thread_Control*)
>         *        { 00487EB0 }   (Thread_Control)
>                 Object   { 00487EB0 }   (Objects_Control)
>                 current_state   H'00000001 { 00487EC0 } (States_Control)
>                 current_priority        H'000000ff { 00487EC4 }
> (Priority_Control)
>                 real_priority   H'000000ff { 00487EC8 }
> (Priority_Control)
>                 resource_count  H'00000000 { 00487ECC } (uint32_t)
>                 Wait     { 00487ED0 }   (Thread_Wait_information)
>                 Timer    { 00487EF8 }   (Watchdog_Control)
>                 suspend_count   H'00000000 { 00487F20 } (uint32_t)
>                 is_global       H'b0b0b0b0 { 00487F24 } (boolean)
>                 do_post_task_switch_extension   H'b0b0b0b0 { 00487F28 }
> (boolean)
>                 is_preemptible  H'b0b0b0b0 { 00487F2C } (boolean)
>                 rtems_ada_self  0x00000000 { 00487F30 } (void*)
>                 cpu_time_budget H'b0b0b0b0 { 00487F34 } (uint32_t)
>                 budget_algorithm        H'b0b0 { 00487F38 }
> (Thread_CPU_budget_algorithms)()
>                 budget_callout   { 00487F3C }
> (Thread_CPU_budget_algorithm_callout)
>                 cpu_time_used    { 00487F40 }   (struct timespec)
>                 ready   0x00487e84 { 00487F48 } (Chain_Control*)
>                 Priority_map     { 00487F4C }   (Priority_Information)
>                 Start    { 00487F58 }   (Thread_Start_information)
>                 Registers        { 00487F8C }   (Context_Control)
>                 libc_reent      0x00000000 { 00487FB4 } (struct _reent*)
>                 API_Extensions   { 00487FB8 }   (void[3]*)
>                 extensions      0x00000000 { 00487FC4 } (void**)
>                 task_variables  0xb0b0b0b0 { 00487FC8 }
> (rtems_task_variable_t*)
>
>
> ------------------------------------------------------------
> "Unix is user friendly, it's just  Steven Grunza
> particular about with whom it      voice: (856) 787 - 2759
> makes friends."                    fax:   (856) 866 - 2033
> - Unknown                          mailto:grunza at ulticom.com
>                                    flames:/dev/null
> ------------------------------------------------------------
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list