Bug 73625 - processes don't launch correctly with console redirected
processes don't launch correctly with console redirected
Status: CLOSED DEFERRED
Product: Red Hat Linux
Classification: Retired
Component: SysVinit (Show other bugs)
7.3
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-09-06 19:45 EDT by jrjohns
Modified: 2014-03-16 22:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-28 01:08:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description jrjohns 2002-09-06 19:45:06 EDT
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 19:47:39 EDT
Created attachment 75384 [details]
Testcase script, Part 1 / 3 - /etc/rc.d/init.d/testcase
Comment 2 jrjohns 2002-09-06 19:49:38 EDT
Created attachment 75385 [details]
Testcase script, Part 2/3 - /usr/bin/testcase_1
Comment 3 jrjohns 2002-09-06 19:50:27 EDT
Created attachment 75386 [details]
Testcase script, Part 3/3 - /usr/bin/testcase_2
Comment 4 Bill Nottingham 2005-01-28 01:08:09 EST
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.