Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jun 2015 17:42:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 197842] kernel memory leak
Message-ID:  <bug-197842-8-XvBznkd58g@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-197842-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-197842-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197842

John Refling <netbsdrat@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |netbsdrat@gmail.com

--- Comment #1 from John Refling <netbsdrat@gmail.com> ---
I have this problem NOW on 10.1-RELEASE.

I am using memtest to test the RAM.  It seems to me that I had this problem a
long time ago, and there was bad RAM, and replacing that made the problem go
away.

That was a different machine from this one.  I've made 2 passes of memtest
without errors, however I'll let it run for a few more days to try to duplicate
the temperature extremes.

Anyhow, I have a program that I wrote that copies a lot of files to multiple
disks, like 17,000 files.  I ran it several days ago, and system crashes with
the error in the original poster's post.

I ran the program yesterday, and it ran to completion, no problem.  Could be a
temperature thing + RAM.

I also put in some diagnostics on each loop of the program:

char *delete = malloc(100);
fprintf(stdout, "%p\n", delete);
system("sysctl vm.kvm_free vm.kvm_size");
free(delete);

The loop enters for each directory on the disk, not for each file, so there
might be 900 loop entries.

Now the vm.kvm_free and vm.kvm_size remain mostly constant.

BUT the pointer to the delete is malloc()ed at 1000 (hex?) bytes greater each
time the loop enters !!!

I don't do any malloc()s after main().  This is probably not a reliable way to
test things, but it looks suspicious.  !!!

Is there a better way to get the amount of free memory at any instant, probably
another sysctl parameter.

Anyhow this is just very frustrating and hard to track down.

I had another issue that never got sorted out after years, on 9.1:

http://lists.freebsd.org/pipermail/freebsd-questions/2013-November/254450.html

Thanks,

John Refling

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-197842-8-XvBznkd58g>