Bug 74538 - Bug in idle_timeout check
Summary: Bug in idle_timeout check
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: kernel   
(Show other bugs)
Version: 2.1
Hardware: All Linux
Target Milestone: ---
Assignee: Larry Woodman
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-09-26 10:29 UTC by Lars Ekman
Modified: 2007-11-30 22:06 UTC (History)
0 users

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

Attachments (Terms of Use)

Description Lars Ekman 2002-09-26 10:29:35 UTC
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:

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

Additional info:

This is due to a compare bug at line 375 in netconsole.c. Here is a patch;
< +                     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,

Comment 1 Lars Ekman 2002-09-26 10:55:03 UTC
The line number (350) was wrong. It was actually in the netdump.patch file not
netconsole.c. The correct line number in netconsole.c is; 169. 

Comment 2 Larry Woodman 2005-09-28 11:10:50 UTC
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.