[erlang-bugs] Runtime memory leak on Windows 2003. (beam.dll)

Jan Jacobs hpjcon@REDACTED
Thu Jul 26 22:31:20 CEST 2007


Hi,

I have an application and traffic generator which work on Windows 200 and XP.

When I do the same tests on Windows 2003 it stops working with out generating a erl_crash.dump. The only indication to the 
problem is from the windows event viewer which gives the following result:

Windows Event viewer:
Event Type: Information
Event Source: Application Error
Event Category: (100)
Event ID: 1004
Date:  2007/07/23
Time:  08:09:10 PM
User:  N/A
Computer: DFG-SRV
Description:
Reporting queued error: faulting application erl.exe, version 0.0.0.0, faulting module beam.dll, version 0.0.0.0, fault address 0x0003c4d5.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 41 70 70 6c 69 63 61 74   Applicat
0008: 69 6f 6e 20 46 61 69 6c   ion Fail
0010: 75 72 65 20 20 65 72 6c   ure  erl
0018: 2e 65 78 65 20 30 2e 30   .exe 0.0
0020: 2e 30 2e 30 20 69 6e 20   .0.0 in 
0028: 62 65 61 6d 2e 64 6c 6c   beam.dll
0030: 20 30 2e 30 2e 30 2e 30    0.0.0.0
0038: 20 61 74 20 6f 66 66 73    at offs
0040: 65 74 20 30 30 30 33 63   et 0003c
0048: 34 64 35                  4d5    


I then downloaded the source ad recompiled for win32 with debugging as per directions in the Readme file.  Copied new executables and dlls to The Windows 2003 server.
And ran the test again, with the following result:

Test 1:
bin\erl.exe -sname maxman -setcookie maxman -config data/maxman.config +P 65536 -env ERL_MAX_PORTS 5000 -env ERL_MAX_ETS_TABLES 3000 -env ERL_FULLSWEEP_AFTER 0 -yaws embedded true -mnesia dir '"c:/Program Files/ecs/MaxMan/data"'

Error 1:
Type:      Access violation 
File:      external.c
Fuction:   dec_term
Line 935:  next = (Eterm *) (*objp); 

Test 2:
bin\erl.exe -sname maxman -setcookie maxman -config data/maxman.config +P 65536 -env ERL_MAX_PORTS 5000 -env ERL_MAX_ETS_TABLES 3000 -yaws embedded true -mnesia dir '"c:/Program Files/ecs/MaxMan/data"'

Error 2:
Type:      Access violation 
File:      external.c
Fuction:   dec_term
Line 935:  next = (Eterm *) (*objp); 

Test Box Info:
OS Name Microsoft(R) Windows(R) Server 2003, Enterprise Edition
Version 5.2.3790  Build 3790
OS Manufacturer Microsoft Corporation
System Name DFG-SRV
System Model 662/1066T-M2
System Type X86-based PC
Processor x86 Family 15 Model 6 Stepping 5 GenuineIntel ~2998 Mhz
Processor x86 Family 15 Model 6 Stepping 5 GenuineIntel ~2999 Mhz
Hardware Abstraction Layer Version = "5.2.3790.0 (srv03_rtm.030324-2048)"

Erlang Runtime:
"Erlang (BEAM) emulator version 5.5.5 [source] [async-threads:0] [type-assertions] [debug-compiled] [lock-checking]\n"

Summary:
- Test 1 runs longer before it gives the access violation.
- This happens when I send continuous stream of data via the TCP/IP
- If no data is send via TCP/IP the application runs with out any problems.
- I have noticed the erl.exe process allocates memory but never release memory when viewing the process on the Task Manager.

!! The same application and test cases works on My other XP test box with out any problems (24H continuous) !!

I do not know the internals of the memory allocations in erlang. Can somebody explain it to me so that I can try and find what is causing it?
Any suggestions?

It looks like erlang is not 2003 friendly!

Thanks
Jan Jacobs



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20070726/4610dde2/attachment.htm>


More information about the erlang-bugs mailing list