Bug 13765

Summary: memory problem: compilation of emacs dies during dumping
Product: Base System Reporter: j-lien <j-lien>
Component: i386Assignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description j-lien 1999-09-15 19:00:02 UTC
compilation of emacs 20.4 from gnu archive dies.  When emacs is compiled
a lot of modules are loaded, and then dumped as "emacs".  This is when
FreeBSD totally hangs.  All other virtual consoles are frozen.  It dies
repeatedly at the same point.

The machine is a 486sx 25 mhz with 8 mb of memory.  This indicates that
it is a memory management problem in FreeBSD.  Note:  same emacs compiles
and dumps with no problems, on the same computer, using OpenBSD 2.5.
So it is not a hardware problem.

Fix: 

Use another machine with more memory to compile.  "make" finishes with
no problems there, using the same emacs.
How-To-Repeat: "make"   Dumping of emacs always stops, at the same point.  I can
send you a copy of the emacs in question, but that would not help.

If you tell me exactly what to do to extract more information, I can 
repeat the problem on my machine.
Comment 1 Sheldon Hearn 1999-09-16 09:16:43 UTC
On Wed, 15 Sep 1999 10:59:36 MST, j-lien@lazy.joss.com wrote:

> compilation of emacs 20.4 from gnu archive dies.  When emacs is compiled
> a lot of modules are loaded, and then dumped as "emacs".  This is when
> FreeBSD totally hangs.  All other virtual consoles are frozen.  It dies
> repeatedly at the same point.

Have you tried either of these two options:

	a) Install from the ports tree
	b) Install the package

If the ports tree supports software which you want to install, but you
try to build it outside the ports mechanism, then you should contact the
emacs people. :-)

Let me know.

Ciao,
Sheldon.
Comment 2 Sheldon Hearn 1999-09-17 13:37:12 UTC
On Fri, 17 Sep 1999 12:22:57 -0400, "J. Lien" wrote:

> I reported a memory bug in FreeBSD.

No, you reported a problem you were having compiling emacs on FreeBSD.

I understand that your machine locked up, but we're talking about a 486,
here. How long did you leave it alone before deciding it had locked up.

> It is up to you if you are interested in bugs,

Of course, but since it's not easy to reproduce, it's probably not worth
pursuing, given the level of detail you've provided.

> But it is definetly a bug in FreeBSD when I can compile the same
> software on the same machine using OpenBSD, or compile the same
> software on another FreeBSD machine with more memory.

I understand that what you're seeing makes you think that, but I just
compiled emacs20.4 downloaded from the GNU site on my own box.

Basically, you're using an inredibly complicated How-To-Repeat to decide
that FreeBSD has a memory management problem. I'm pretty sure there are
numerous factors that could be causing the symptoms you're seeing.

Ciao,
Sheldon.
Comment 3 j-lien 1999-09-17 17:22:57 UTC
>> compilation of emacs 20.4 from gnu archive dies.  When emacs is compiled
>> a lot of modules are loaded, and then dumped as "emacs".  This is when
>> FreeBSD totally hangs.  All other virtual consoles are frozen.  It dies
>> repeatedly at the same point.

> Have you tried either of these two options:
>
>	a) Install from the ports tree
>	b) Install the package
>
> If the ports tree supports software which you want to install, but you
> try to build it outside the ports mechanism, then you should contact the
> emacs people. :-)

I reported a memory bug in FreeBSD.  I did not ask for help on compiling
emacs.  The compilation worked with another computer with more memory.
I have solved my problem myself, but I have not attempted to fix the
bug in FreeBSD.

It is up to you if you are interested in bugs, I can forget them and
use some other os.  But it is definetly a bug in FreeBSD when I can
compile the same software on the same machine using OpenBSD, or compile 
the same software on another FreeBSD machine with more memory.  It is
not an emacs or user or configure or hardware problem.

/Jan Lien
Comment 4 j-lien 1999-09-21 00:57:24 UTC
> I understand that what you're seeing makes you think that, but I just
> compiled emacs20.4 downloaded from the GNU site on my own box.

Did you use only 8 megs of memory?  If not, it works for me as well.
That is how I dumped emacs, I put the disk drive in another machine with
more memory.

> Of course, but since it's not easy to reproduce, it's probably not worth
> pursuing, given the level of detail you've provided.

Ah!  But it IS easy to reproduce!  For me, I can do it any time!
I have saved the non-dumped compiled emacs, so I just have to type
"make" to freeze the computer.  After that, it switches between 
virtual consoles, but I am unable to log in or get any response from
any other console.

To make it easier to repat and debug:  Tell me exactly what to do,
what to load, etc, and I will give you exact debugging info.  That
is since I know it is difficult to reproduce on other machines.
I could possibly even set the machine up on-line and let you remotely
log in and run the same thing.  That is if you really have an interest.

I can most likely also borrow more memory and try with more memory,
or different 8 meg memory, but only if you are interested.

It reproduces every time here.  The same physical machine compiled 
exactly the same emacs running OpenBSD.  The same machine running the
now installed FreeBSD compiled bash without problems.  So, it must be
a memory management bug, or possibly a very strange hardware error
that only affects emacs-loading-and-dumping under FreeBSD...

Anyway, Thanks for your replies!

/Jan Lien
Comment 5 nbm freebsd_committer freebsd_triage 2000-08-05 23:38:01 UTC
State Changed
From-To: open->feedback

Does this problem persist in later versions? (particularly 4.0's 
improved memory management)
Comment 6 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2001-03-13 02:16:09 UTC
State Changed
From-To: feedback->closed

Feedback timeout.