Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Jan 2002 18:35:02 +0300
From:      "Vladimir B.Grebenschikov" <vova@sw.ru>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/33535: invalid kernel diagnostic while writing dump on machine with more than 2 Gb RAM
Message-ID:  <E16MWN4-0001fL-00@vbook.express.ru>

next in thread | raw e-mail | index | archive | help

>Number:         33535
>Category:       kern
>Synopsis:       invalid kernel diagnostic while writing dump on machine with more than 2 Gb RAM
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 04 07:40:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Vladimir B. Grebenschikov
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
SWsoft
>Environment:
FreeBSD vbook.express.ru 5.0-CURRENT FreeBSD 5.0-CURRENT #10: Fri Dec 28 19:17:02 MSK 2001 root@walder.asplinux.ru:/usr/obj/ext/current/src/sys/VBOOK  i386
also checed on 4.4-RELEASE and RELENG_4
>Description:
	while dumping core ( dumpsys() from kernel ) progress indicator
shows negative values, than positive:
  -1024 .. -2047, 2047 .. 0
>How-To-Repeat:
	from DDB:
db> call dumpsys()

dumping to dev #da/0x20007, offset 3948672
dump -1024 -1025 -1026 -1027 -1028 -1029 -1030 -1031 -1032 -1033 -1034 -1035
-1036 -1037 -1038 -1039 -1040 -1041 -1042 -1043 -1044 -1045 -1046 -1047 -1048 -1049		
...
-2042 -2043 -2044 -2045 -2046 -2047 2047 2046 2045 2044 2043 2042 2041 2040 2039 2038
...
10 9 8 7 6 5 4 3 2 1 0 succeeded

>Fix:

Index: sys/cam/scsi/scsi_da.c
===================================================================
RCS file: /ext/vcvs/src/sys/cam/scsi/scsi_da.c,v
retrieving revision 1.42.2.12
diff -u -r1.42.2.12 scsi_da.c
--- sys/cam/scsi/scsi_da.c	2001/07/30 00:48:20	1.42.2.12
+++ sys/cam/scsi/scsi_da.c	2002/01/04 15:15:40
@@ -739,7 +739,7 @@
 			return(EIO);
 		}
 		
-		if (dumpstatus(addr, (long)(num * softc->params.secsize)) < 0)
+		if (dumpstatus(addr, (unsigned long)(num * softc->params.secsize)) < 0)
 			return (EINTR);
 
 		/* update block count */
Index: sys/dev/ata/ata-disk.c
===================================================================
RCS file: /ext/vcvs/src/sys/dev/ata/ata-disk.c,v
retrieving revision 1.60.2.16
diff -u -r1.60.2.16 ata-disk.c
--- sys/dev/ata/ata-disk.c	2001/08/28 17:56:14	1.60.2.16
+++ sys/dev/ata/ata-disk.c	2002/01/04 15:15:41
@@ -329,7 +329,7 @@
 	    DELAY(20);
 	}
 
-	if (dumpstatus(addr, (long)(count * DEV_BSIZE)) < 0)
+	if (dumpstatus(addr, (unsigned long)(count * DEV_BSIZE)) < 0)
 	    return EINTR;
 
 	blkno += blkcnt * dumppages;
Index: sys/kern/kern_shutdown.c
===================================================================
RCS file: /ext/vcvs/src/sys/kern/kern_shutdown.c,v
retrieving revision 1.72.2.8
diff -u -r1.72.2.8 kern_shutdown.c
--- sys/kern/kern_shutdown.c	2001/08/23 10:32:29	1.72.2.8
+++ sys/kern/kern_shutdown.c	2002/01/04 15:15:44
@@ -394,7 +394,7 @@
  */
 static u_long const	dumpmag = 0x8fca0101UL;	
 
-static int	dumpsize = 0;		/* also for savecore */
+static unsigned int	dumpsize = 0;		/* also for savecore */
 
 static int	dodump = 1;
 
@@ -406,7 +406,7 @@
 	dev_t dev;
 {
 	int psize;
-	long newdumplo;
+	unsigned long newdumplo;
 
 	if (dev == NODEV) {
 		dumpdev = dev;
@@ -523,7 +523,7 @@
 }
 
 int
-dumpstatus(vm_offset_t addr, long count)
+dumpstatus(vm_offset_t addr, unsigned long count)
 {
 	int c;
 
@@ -532,7 +532,7 @@
 		if (wdog_tickler)
 			(*wdog_tickler)();
 #endif   
-		printf("%ld ", count / (1024 * 1024));
+		printf("%lu ", count / (1024 * 1024));
 	}
 
 	if ((c = cncheckc()) == 0x03)
Index: sys/sys/systm.h
===================================================================
RCS file: /ext/vcvs/src/sys/sys/systm.h,v
retrieving revision 1.111.2.8
diff -u -r1.111.2.8 systm.h
--- sys/sys/systm.h	2001/07/30 23:28:01	1.111.2.8
+++ sys/sys/systm.h	2002/01/04 15:15:45
@@ -101,7 +101,7 @@
 struct uio;
 
 void	Debugger __P((const char *msg));
-int	dumpstatus __P((vm_offset_t addr, long count));
+int	dumpstatus __P((vm_offset_t addr, unsigned long count));
 int	nullop __P((void));
 int	eopnotsupp __P((void));
 int	einval __P((void));

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E16MWN4-0001fL-00>