From owner-freebsd-hackers Fri Jul 21 14:49:15 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from 200-191-156-142-as.acessonet.com.br (bsa-1-as02-7-a01.gd.uol.com.br [200.197.118.65]) by hub.freebsd.org (Postfix) with ESMTP id F2F0C37B76B for ; Fri, 21 Jul 2000 14:48:50 -0700 (PDT) (envelope-from lioux@uol.com.br) Received: (qmail 61280 invoked by uid 1001); 21 Jul 2000 20:58:19 -0000 From: "Mario Sergio Fujikawa Ferreira" Date: Fri, 21 Jul 2000 17:57:57 -0300 To: freebsd-hackers@freebsd.org Subject: sysutils/memtest and FreeBSD Message-ID: <20000721175757.B319@Fedaykin.here> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I just added sysutils/memtest to the FreeBSD ports tree a couple of days ago. It is a utility to test for faulty memory subsystem. However, I've been having some problems with it. They are not fatal, but really annoying. I am in contact with the author to try working them out. Nonetheless, I would like to see if ppl on the -hackers forum could help me out with the following problem: I noticed that using 'memtest all' would produce core dump on my -stable as of 18/07/2000. Backtracing showed that the problem was due to the malloc function inside the get_mem function. get_mem() is used to find out the largest possible memory segment. It incrementaly reduces the segment passed to malloc to alloc. It is the malloc function allright. It core dumps on the 1st pass on get_mem(), there is no time to do_reduce. Very weird. ;( #0 0x280dda41 in isatty () from /usr/lib/libc.so.4 #1 0x280ddd91 in isatty () from /usr/lib/libc.so.4 #2 0x280de4c5 in malloc () from /usr/lib/libc.so.4 #3 0x8049427 in get_mem () at memtest.c:338 #4 0x8048bc5 in main (argc=2, argv=0xbfbff62c) at memtest.c:175 #5 0x80488e1 in _start () Instead of just returning a null pointer, it core dumps. I am not using any /etc/malloc.conf options at all. I know that 'A' could produce this. Following some instructions from the author, I tried an odd change ... since that is his baby not mine. However, it did not work. On Thu, Jul 20, 2000 at 08:12:12PM -0600, Charles Cazabon wrote: > Mario Sergio Fujikawa Ferreira wrote: > > Try changing line 103 to allocate a buffer of 256 bytes instead of 100 bytes. > I haven't looked at that line in a long time. The output messages may be > longer than that now. > > If that's not it, it's crashing during the memory allocation phase. I twould > take some additional debugging to figure out where. It did not work. 'memtest all' still core dumps. By the way, one bug that is not FreeBSD related though, whenever I try 'memtest 4G': --- ./memtest 4G memtest v. 2.93.1 (C) 2000 Charles Cazabon Original v.1 (C) 1999 Simon Kirby ./memtest: amount of memory to allocate too small. --- Nonetheless, using 1G, 2G, 3G and 5G work. Just to mention. Don't worry about it. I am not touching the bit wise code now. I am leaving that to the author. I am worried about the core dump amongst other projects now. Regards, Mario Ferreira To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message