Openwings Home
Introduction
Search
In the News
Frequently Asked Questions
Registration
Open Forum
Openwings Tutorial
Bug Database
Openwings API
Download
Expert Teams
Process Management Office
Projects
Links
Terms of Use
Comment on this bug

03610:

Container Lockup (due to reading from System.in)

Category: Container
Status: Closed

Severity: HIGHEST
Reported against release: 0.8
Fixed in release: 0.8.1 (Beta Refresh)

PROBLEM:

The Container implementation sometimes locks up. This lockup occurs  
most often during startup, but can happen later as well. This behavior 
may have several different symptoms to the end user:

- The user gets "unable to install" messages from the shell
- The Hello world user panel freezes and won't go away (defect exists 
for this problem)

The problem appears to occur when the container implementation or 
processes running inside the container attempt to read from System.in.

ANALYSIS:

This problem occurs at different times on different platforms. Windows 
2000 users often experience container lockup at startup.

Several Windows NT users have reported the Hello World User panel 
freezing.

The Container program does some initialization on startup. Then it 
prints out "Press any key to exit" and then blocks on System.in.read() 
until it receives input, at which point it shuts down. This was a 
debugging feature that was used during development to provide a clean 
way to shut down a container that was started in a console window

The problem is that in the release, containers are started by the 
container manager using Runtime.exec(). Because of how Runtime.exec() 
handles the standard I/O streams, reading from standard in can 
intermittently cause the container's JVM to hang. This explains the 
nondeterministic behavior of this error and the fact that it varies 
from platform to platform. For example, it appears that containers on 
NT usually don't hang until the Hello World user program is started - 
the second call to System.in.read().

The suggested solution is to eliminate the easy shutdown feature since 
that is not how containers will be used in deployed systems.

In addition, the container needs a safeguard so that processes that run 
inside it can't hang the container by reading from standard in.

Finally, the documentation on the website needs to be modified to 
indicate that programs that run in containers may not read from 
standard input.

back to top

home | vision | search | in the news | faq | registration | open forum | tutorial | bug database
 API | download | expert teams | process management office | projects | links | terms of use

© Copyright 2001-2006 General Dynamics C4 Systems. All rights reserved.