Bug 159261 - Sample crash.c doesn't compile on 2.6 kernels
Summary: Sample crash.c doesn't compile on 2.6 kernels
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: netdump   
(Show other bugs)
Version: 4.0
Hardware: i686 Linux
medium
low
Target Milestone: ---
: ---
Assignee: Dave Anderson
QA Contact:
URL:
Whiteboard:
Keywords:
: 120405 (view as bug list)
Depends On:
Blocks: 168429
TreeView+ depends on / blocked
 
Reported: 2005-06-01 00:04 UTC by Seva
Modified: 2007-11-30 22:07 UTC (History)
3 users (show)

Fixed In Version: RHBA-2006-0038
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-07 18:23:59 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Makefile (79 bytes, text/plain)
2005-06-01 00:05 UTC, Seva
no flags Details
crash.c (432 bytes, text/plain)
2005-06-01 00:06 UTC, Seva
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0038 qe-ready SHIPPED_LIVE netdump bug fix update 2006-03-06 05:00:00 UTC

Description Seva 2005-06-01 00:04:11 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041215 Firefox/1.0 Red Hat/1.0-12.EL4

Description of problem:
/usr/share/doc/netdump-0.7.4-2/README.client directs the user to:

Build the module with
 gcc -DKERNEL -DMODULE -I/lib/modules/$(uname -r)/build/include -c crash.c

While this command succeeds, it does not produce a valid kernel module:

# /sbin/insmod ./crash.o
insmod: error inserting './crash.o': -1 Invalid module format


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

How reproducible:
Always

Steps to Reproduce:
1. cd /usr/share/doc/netdump-0.7.4-2
2. gcc -DKERNEL -DMODULE -I/lib/modules/$(uname -r)/build/include -c crash.c
3. sbin/insmod ./crash.o
  

Actual Results:  insmod: error inserting './crash.o': -1 Invalid module format

Expected Results:  kernel panic

Additional info:

crash.c needs to be ported to 2.6 kernel build infrastructure

Comment 1 Seva 2005-06-01 00:05:13 UTC
Created attachment 115014 [details]
Makefile

2.6 kernel based build system Makefile

Comment 2 Seva 2005-06-01 00:06:13 UTC
Created attachment 115015 [details]
crash.c

crash.c ported to 2.6 kernel build system

Comment 3 Dave Anderson 2005-06-01 12:37:42 UTC
Thanks.  The sample crash module is pretty much fluff given
the far easier manner of force-crashing the kernel by
entering "Alt-syrq-c" or "echo c > /proc/sysrq-trigger".


Comment 4 Dave Anderson 2005-06-01 12:46:46 UTC
*** Bug 120405 has been marked as a duplicate of this bug. ***

Comment 5 Seva 2005-06-01 15:13:08 UTC
Perhaps the documentation needs to be updated a bit, I wasn't aware of the
sysrq-trigger /proc entry.


Comment 6 Dave Anderson 2005-06-01 15:57:17 UTC
Agreed...

Comment 7 Ken Hall 2005-11-18 18:41:49 UTC
The "c" option for sysrq-trigger seems to be disabled in the default kernel 
since the addition of the KEXEC patch.  This is in 2.6.14-1.1637_FC4.  Is there 
a new recommended method for testing netdump?

Comment 8 Dave Anderson 2005-11-18 19:04:51 UTC
> The "c" option for sysrq-trigger seems to be disabled in the default kernel 
> since the addition of the KEXEC patch.  This is in 2.6.14-1.1637_FC4.  Is
> there a new recommended method for testing netdump?

Probably not.  As you saw, the kexec patch in FC4 takes away the capability
of killing the system with alt-sysrq-c when a kexec kernel has NOT been loaded,
because crash_kexec() will just quietly return back to the sysrq-c handler.
I sent a patch to our Fedora kernel maintainer proposing a change to
sysrq_handle_crashdump() which will fall-back to our RHEL3/4 alt-sysrq-c
oops-generator, which would subsequently invoke netdump and/or diskdump if
enabled, or if nothing's enabled, still crash the system at will.  He indicated
that it won't be available until the FC5 time frame.




Comment 9 Dave Anderson 2006-01-17 18:20:19 UTC
The sample crash.c is deprecated. 

To force a crash, the README documentation has been updated re: the
usage of alt-sysrq-c or by doing an "echo c > /proc/sysrq-trigger".

Moving forward, we will ensure that the sysrq functionality continues
to force a crash.


Comment 14 Red Hat Bugzilla 2006-03-07 18:24:00 UTC
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/RHBA-2006-0038.html



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