Bug 74538 - Bug in idle_timeout check
Bug in idle_timeout check
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: kernel (Show other bugs)
2.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Larry Woodman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-09-26 06:29 EDT by Lars Ekman
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version: RHEL2.1-U7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-28 07:10:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Lars Ekman 2002-09-26 06:29:35 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.9-31 i686; Nav)

Description of problem:
The netdump-client hangs for a long time even when idle_timeout is specified.


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


How reproducible:
Always

Steps to Reproduce:
1. Load the netconsole.o module with an idle_timeout specified
2. Stop the netdump-server
3. Force a kernel crash
	

Actual Results:  The netdump-client waits for a very long time (probably years)


Expected Results:  The netdump-client should timeout, and the machine should
reboot.

Additional info:

This is due to a compare bug at line 375 in netconsole.c. Here is a patch;
375c375
< +                     if (((t1 - t0) >> 20) > mhz_cycles * (unsigned long
long)idle_timeout) {
---
> +                     if (((t1 - t0) >> 20) > (unsigned long long)(mhz *
idle_timeout)) {

The time difference is divided by ~1000000 to get MHz AND the mhz_cycles
is the clock in MHz timer 1000000 to get Hz. Either one of these should be done,
not both. In the correction above I use the original clock in mhz.

A printk in this code gives;
idle_timeout = 5, t0 = 33318304946, t1 = 37590067912 (4073) > (1750000000)
where the last numbers is used in the compare. My machine was 350Mhz,
350*5*1000000=1750000000
Comment 1 Lars Ekman 2002-09-26 06:55:03 EDT
The line number (350) was wrong. It was actually in the netdump.patch file not
in
netconsole.c. The correct line number in netconsole.c is; 169. 
Comment 2 Larry Woodman 2005-09-28 07:10:50 EDT
This problem was fixed long ago in AS2.1.

Larry Woodman

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