Your message dated Tue, 25 Jan 2005 14:40:32 +0100
with message-id <[EMAIL PROTECTED]>
and subject line Fixed for quite some time
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 10 May 2004 17:07:58 +0000
>From [EMAIL PROTECTED] Mon May 10 10:07:58 2004
Return-path: <[EMAIL PROTECTED]>
Received: from producer.newsnow.co.uk (fw-2.webcluster.newsnow.co.uk)
[217.204.41.131]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1BNEFx-0005Xs-00; Mon, 10 May 2004 10:07:57 -0700
Received: from www-1.webcluster.newsnow.co.uk ([192.168.2.1])
by fw-2.webcluster.newsnow.co.uk with esmtp (Exim 3.35 #1 (Debian))
id 1BNEFu-0002kz-00; Mon, 10 May 2004 18:07:54 +0100
Received: from root by www-1.webcluster.newsnow.co.uk with local (Exim 3.35 #1
(Debian))
id 1BNEFr-00051J-00; Mon, 10 May 2004 18:07:51 +0100
From: root <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: watchdog: Setting 'min-memory=<x>' on a system with > 2G causes reboot
shortly after startup
X-Mailer: reportbug 1.50
Date: Mon, 10 May 2004 18:07:51 +0100
Message-Id: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-7.0 required=4.0 tests=BAYES_00,HAS_PACKAGE
autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level:
X-CrossAssassin-Score: 1
Package: watchdog
Version: 5.2-0.2
Severity: important
Tags: patch
As the subject says, setting 'min-memory=<x>' on a system with > 2G causes
watchdog to misinterpret the amount of free memory, causing a reboot. See the
following syslog message for an example:
May 10 17:18:01 www-1 watchdog[184]: memory 2278732 kB is less than 2560 pages
On an i386 system, 2560 pages is 10240kB, so this message is nonsensical.
I believe the problem to lie in the use of 'int' in the watchdog userspace code
to compute the amount of free memory, which causes an overflow on a system with
>2G of memory. Here is a patch to fix the problem:
*** memory.c-orig Mon May 10 18:01:55 2004
--- memory.c Sun Mar 25 13:11:41 2001
***************
*** 78,88 ****
#if USE_SYSLOG
if (verbose)
syslog(LOG_INFO, "currently there are %d kB of free memory available",
free);
#endif /* USE_SYSLOG */
! if ((unsigned long long)free * 1024ULL < (unsigned long long)minpages *
EXEC_PAGESIZE) {
#if USE_SYSLOG
syslog(LOG_ERR, "memory %d kB is less than %d pages", free, minpages);
#endif /* USE_SYSLOG */
return (ENOMEM);
}
--- 78,88 ----
#if USE_SYSLOG
if (verbose)
syslog(LOG_INFO, "currently there are %d kB of free memory available",
free);
#endif /* USE_SYSLOG */
! if (free * 1024 < minpages * EXEC_PAGESIZE) {
#if USE_SYSLOG
syslog(LOG_ERR, "memory %d kB is less than %d pages", free, minpages);
#endif /* USE_SYSLOG */
return (ENOMEM);
}
I have tested this patch and found it to work. There may be a better
declaration to use than 'unsigned long long' (size_t?).
-- System Information
Debian Release: stable
Architecture: i386
Kernel: Linux www-1 2.4.23 #1 SMP Wed Dec 3 14:43:10 GMT 2003 i686
Locale: LANG=C, LC_CTYPE=C
Versions of packages watchdog depends on:
ii libc6 2.2.5-14.3 GNU C Library: Shared libraries an
ii makedev 2.3.1-62 Creates device files in /dev.
---------------------------------------
Received: (at 248343-done) by bugs.debian.org; 25 Jan 2005 13:40:43 +0000
>From [email protected] Tue Jan 25 05:40:43 2005
Return-path: <[email protected]>
Received: from credativ.com (curie.credativ.org) [217.160.209.18]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1CtQvz-00075b-00; Tue, 25 Jan 2005 05:40:43 -0800
Received: from localhost (localhost [127.0.0.1])
by curie.credativ.org (Postfix) with ESMTP id 7186755A93
for <[EMAIL PROTECTED]>; Tue, 25 Jan 2005 14:40:40 +0100 (CET)
Received: from www.credativ.de (pD9501088.dip0.t-ipconnect.de [217.80.16.136])
(using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits))
(No client certificate requested)
by curie.credativ.org (Postfix) with ESMTP id DE7CD55A8E
for <[EMAIL PROTECTED]>; Tue, 25 Jan 2005 14:40:38 +0100 (CET)
Received: from feivel (feivel.credativ.de [172.26.14.57])
by www.credativ.de (Postfix) with ESMTP id E8A3F1C000B
for <[EMAIL PROTECTED]>; Tue, 25 Jan 2005 14:40:32 +0100 (CET)
Received: by feivel (Postfix, from userid 1000)
id 694014AB80; Tue, 25 Jan 2005 14:40:32 +0100 (CET)
Date: Tue, 25 Jan 2005 14:40:32 +0100
From: Michael Meskes <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Fixed for quite some time
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
X-Virus-Scanned: by AMaViS at credativ.com
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no
version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level:
Sorry, I forgot to close the report. This bug was fixed with the latest
upstream version about one year ago.
Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: [EMAIL PROTECTED]
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]