[Glass] OutOfMemoryError ...
James Foster
james.foster at gemtalksystems.com
Tue Mar 25 15:26:16 PDT 2014
Okay. I think I have some ideas.
When you do a file-in, we do some analysis on the client (in Jade) and then for each Topaz command we do at least one server round-trip. (Obviously, this isn’t very efficient, but its been working okay so far.) With each server round-trip we fork a background process to talk to the server while we manage the client UI in the foreground. Because the walkback happens in that place I investigated the possibility that lots of forks can cause a problem. It turns out that the following code can reproduce the problem pretty consistently, and uncommenting the MemoryManager lines can fix it. If you run the code and then look at the stack you can see the Dolphin stack corruption that occurs at the Process class>>#’new’ call. (The stack makes it look like an instance of SmallInteger is the receiver when Process class>>#’new’ sends a message to ‘self’.)
"MemoryManager current collectGarbage; compact."
1 to: 10000 do: [:i |
| semaphore |
semaphore := Semaphore new.
[
(Delay forMilliseconds: 1) wait.
semaphore signal.
] fork.
semaphore wait.
"i \\ 1000 == 0 ifTrue: [MemoryManager current collectGarbage; compact]."
].
I’ve added some code to do a full GC after each thousand server calls. Version 1.037 of Jade has this change. Let me know if that improves things!
James
On Mar 25, 2014, at 12:10 PM, itlists at schrievkrom.de wrote:
> It happens both in the Development IDE and in the standalone tool.
>
> Memory use is very low - 53 to 75 MByte RAM. The system has 16GByte and
> it's Windows 7/64.
>
> Marten
>
>
> Am 25.03.2014 19:32, schrieb James Foster:
>> Marten,
>>
>> My first reading of this was that the problem was the
>> typical GEM_TEMPOBJ_CACHE_SIZE problem, but as Martin McClure points out
>> the stack is in Dolphin, not in GemStone.
>>
>> Are you running Jade.exe or are you running in the Dolphin development
>> environment? When this happens, what does the Task Manager show as the
>> memory usage for the process (on the Processes tab)? What does the Task
>> Manager show as the memory usage (Performance tab)? How much RAM on your
>> machine? From my reading it appears that each process has 4 GB of
>> virtual address space. How much virtual memory does your Windows machine
>> have
>> (see http://windows.microsoft.com/en-us/windows/change-virtual-memory-size#1TC=windows-7)?
More information about the Glass
mailing list