[Bug 1764] RTEMS shell not always waiting for termination

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Tue Mar 15 03:33:09 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1764

--- Comment #1 from Chris Johns <chrisj at rtems.org> 2011-03-14 22:33:08 CDT ---
(In reply to comment #1)
> Sometimes two shells startup at the console and they get every other character
> of input. 

With 2 shells running the input effect is expected. There are 2 threads blocked
in the read call.

> Observe, this is after a reset:
> 
> RTEMS SHELL (Ver.1.0-FRC):/dev/console. Mar 11 2011. 'help' to list commands.   
> [/] #                                                                           
> RTEMS SHELL (Ver.1.0-FRC):/dev/console. Mar 11 2011. 'help' to list commands.   
> [/] # eecchhoo  121212                                                          
> 111                                                                             
> [/] #                                                                           
> 222                                                                             
> [/] # 
> [/] # ttaasskk                                                                  
>   ID       NAME           PRI  STATE MODES   EVENTS    WAITID  WAITARG  NOTES   
> ------------------------------------------------------------------------------  
> 0a010001   ntwk           100 READY  P:T:nA    NONE   1a01000b 0x210a28a8       
> 0a010002   DCrx           100 Wevnt  P:T:nA    NONE   1a01000b 0x210a28a8       
> 0a010003   DCtx           100 Wevnt  P:T:nA    NONE   1a01000b 0x210a28a8       
> 0a010004   TNTD           100 Wevnt  P:T:nA    NONE   55655191 0x210a28a8       
> 0a010005   RPCd           100 Wevnt  P:T:nA    NONE   1fb05ea2 0x210a28a8       
> 0a010006   SHLC           100 READY  P:T:nA    NONE   1a010004 0x210a28a8       
> 0a010007   SHLC           100 READY  P:T:nA    NONE   1a010004 0x210a28a8       
> 
> I start the shell up like this, so it shouldn't return until it terminates:
> 
>     while(1) {
>         rtems_shell_init(
>             "SHLC",                       /* task name */
>             RTEMS_MINIMUM_STACK_SIZE * 16, /* task stack size */
>             100,                          /* task priority */
>             "/dev/console",               /* device name */
>             false,                        /* run forever */
>             true,                         /* wait for shell to terminate */
>             0                             /* login check function,
>                                            * use NULL to disable 
>                                            * login check
>                                            */
>         );

That look fine.

> This is a problem because I typically start my applications with a shell with
> an optional startup file, and when this happens my application doesn't start
> right, and it sometimes fails in the field.  It happens very rarely.  This is
> happening in 4.11, but it also happened in 4.10.

I am not sure I follow this so this is what I understand.

When you run with no startup script you do not see a problem how-ever when you
run a startup script you something see a problem of the shell that runs the
script does not terminate and you then create a new shell.

> I know this isn't much to go on, I'll try to watch for more clues.

Thanks for hammering away with this code and providing these reports.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list