Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 2000 17:57:57 -0300
From:      "Mario Sergio Fujikawa Ferreira" <lioux@uol.com.br>
To:        freebsd-hackers@freebsd.org
Subject:   sysutils/memtest and FreeBSD
Message-ID:  <20000721175757.B319@Fedaykin.here>

next in thread | raw e-mail | index | archive | help
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 <lioux@uol.com.br> 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 <memtest@discworld.dyndns.org>
Original v.1 (C) 1999 Simon Kirby <sim@stormix.com> <sim@neato.org>

./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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000721175757.B319>