Bug 73625 - processes don't launch correctly with console redirected
Summary: processes don't launch correctly with console redirected
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: SysVinit
Version: 7.3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-06 23:45 UTC by jrjohns
Modified: 2014-03-17 02:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-01-28 06:08:09 UTC
Embargoed:


Attachments (Terms of Use)
Testcase script, Part 1 / 3 - /etc/rc.d/init.d/testcase (812 bytes, text/plain)
2002-09-06 23:47 UTC, jrjohns
no flags Details
Testcase script, Part 2/3 - /usr/bin/testcase_1 (164 bytes, text/plain)
2002-09-06 23:49 UTC, jrjohns
no flags Details
Testcase script, Part 3/3 - /usr/bin/testcase_2 (370 bytes, text/plain)
2002-09-06 23:50 UTC, jrjohns
no flags Details

Description jrjohns 2002-09-06 23:45:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020721

Description of problem:
I have have determined that the kernel's command-line parameter to redirect the
console will cause initscripts to function differently than expected when
executed under init.  When the console is redirected, backgrounded processes
will die when the launching parent script exits, rather than continuing to run
as they normally do.  If the processes are started manually, or if the console
is not redirected when init launches the scripts, the processes will continue to
run.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Set the boot parameter of the kernel to include "console=tty2 CONSOLE=/dev/tty2"
2.Boot the computer with initscripts that background processes (such as Tomcat;
see also attached simple testcase)
3.
	

Actual Results:  The process will die.

Expected Results:  The process should continue running in the background

Additional info:

This flaw affects some popular tools, such as Apache Tomcat
(http://jakarta.apache.org/tomcat/index.html), when the console is redirected.

The test case is composed of three scripts which I will add as an attachment. 
There are four use cases for the test case, and 1 of the four tests fails.

1) On a computer with with normal kernel boot parameters, reboot the system.  
When the system returns to operation, /usr/bin/testcase_2 should be 
operating in a permanent loop until killed ("service testcase stop" will 
kill it).  You can confirm that the logfile (/tmp/testcase.log) shows normal 
startups and shutdowns.  This is expected behavior (PASS).

2) If started manually ("service testcase start"), /usr/bin/testcase_2 
should again operate in a permanent loop in the background until terminated.
This is expected behavior (PASS).

3) On a computer with the console redirected in the boot parameters 
(console=tty2 CONSOLE=/dev/tty2), when the system is rebooted, 
/usr/bin/testcase_2 will begin running and then will die.  The logfile will 
show that when testcase_1 exited, testcase_2 stopped updating the logfile.  
It doesn't even get a nice SIGTERM.  This is UNEXPECTED behavior (FAIL).

4) On a computer with the console redirected in the boot parameters 
(console=tty2 CONSOLE=/dev/tty2), start the service manually as in test 2.  
Once more, /usr/bin/testcase_2 will operate in a loop in the background 
until terminated.  This is expected behavior (PASS).

Comment 1 jrjohns 2002-09-06 23:47:39 UTC
Created attachment 75384 [details]
Testcase script, Part 1 / 3 - /etc/rc.d/init.d/testcase

Comment 2 jrjohns 2002-09-06 23:49:38 UTC
Created attachment 75385 [details]
Testcase script, Part 2/3 - /usr/bin/testcase_1

Comment 3 jrjohns 2002-09-06 23:50:27 UTC
Created attachment 75386 [details]
Testcase script, Part 3/3 - /usr/bin/testcase_2

Comment 4 Bill Nottingham 2005-01-28 06:08:09 UTC
Closing out unresolved bugs on older, end-of-lifed releases.
Apologies for any lack of response.

Please reopen if the problem persists on a current release.


Note You need to log in before you can comment on or make changes to this bug.