Bug 141996 - CAN-2004-1237 instant kernel panic from one line perl program - BAD
CAN-2004-1237 instant kernel panic from one line perl program - BAD
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Peter Martuccelli
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-06 11:51 EST by ara howard
Modified: 2007-11-30 17:07 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-07 16:28:59 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)

  None (edit)
Description ara howard 2004-12-06 11:51:39 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1)
Gecko/20030225

Description of problem:
certain perl constructs (well, underlying system calls i'm sure) can
easily cause kernel panic when run under cron but NOT when run from
the command line.  this type of kernel panic is, of course, extremely
difficult to trace.

Version-Release number of selected component (if applicable):
Linux 2.4.21-20.EL i68

How reproducible:
Always

Steps to Reproduce:
1. create the following perl script as $HOME/kernel_panic.pl:

  #!/usr/bin/perl
  open ('kerel_panic');

obviously make this file executable

2. add a crontab line similar to following to run this program

  * * * * * $HOME/kernel_panic.pl


3. sit back and watch a userland crontab entry not only panic the
kernel, but make it almost impossible to reboot and, therefore, debug.
    

btw.  i'd reccomend cron'ing the above at a specific time so as NOT to
 render your machine useless

Actual Results:  instant kernel panic

Expected Results:  nothing - the file does not exist so the program
should have simply failed. 

Additional info:

note that this use of open in perl is not that common

  open 'file'

normally you'd see

  open FILE, '< file'

or something.  however this shoud NOT panic the kernel!
Comment 1 Ernie Petrides 2004-12-06 19:08:47 EST
I reproduced this crash under 2.4.21-27.EL (U4) by queuing the cron job
using the "crontab -u $user -l" command (and waiting for the minute to
roll over).  The oops is in the "audit" module at __audit_get_target+0x1ee.
The logical bottom-of-stack is syscall_trace_leave+0x58.
Comment 2 Ernie Petrides 2004-12-06 19:29:07 EST
If you don't heed the advice of scheduling the cron job for a specific
time (for a "one-shot" run), then your test system will continue to panic
during each reboot.  In order to recover, boot with "init=/bin/bash" added
to the kernel args, use "fsck" to fix up file systems, remount the root
file system (presuming it contains /var) read-write (with the command
"mount -n -o remount,rw /"), and then run "crontab -u $user -r"
to recover (and then reboot).
Comment 3 Ernie Petrides 2004-12-07 16:24:02 EST
The oops would be from EIP __audit_get_target+0x1f6 in a Beehive-built
kernel.  The +0x1ee offset I wrote in comment #1 was from a test build
using my local (older) compiler.
Comment 4 Ernie Petrides 2004-12-07 16:28:59 EST
A fix for this problem has already been committed to the RHEL3 U5
patch pool on 15-Nov-2004 (in kernel version 2.4.21-25.1.EL).

To work around this problem before U5 is released (a few months
from now), please disable auditing with the following commands:

    chkconfig audit off
    service audit stop


*** This bug has been marked as a duplicate of 132245 ***
Comment 5 Peter Martuccelli 2005-01-04 13:09:05 EST
*** Bug 143866 has been marked as a duplicate of this bug. ***
Comment 6 David Lawrence 2005-01-18 18:52:35 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-043.html

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