andremussche / scalemm

Fast scaling memory manager for Delphi
https://code.google.com/p/scalemm/
Other
98 stars 22 forks source link

Critical Access_Violation in XE2 64bits when #Threads >=8 #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set console application with 64-bit Windows compiler on Delphi XE2
2. Create an array with 8 or more threads of same type
3. Set the threads into an infinite loop (While True do)
4. Run!

What is the expected output? What do you see instead?
XE2 64bits there is a crash when the number of threads is equal to or higher 
than 8. In particularly, the Debugger notify the exception:
"C0000005 ACCESS_VIOLATION", and point line 231 of smmFunctions.pas (lock 
cmpxchg16b [r8])

The expected output, which is observed with Win32bit/ScaleMM or 
Win64bit/No-ScaleMM, is all processors running at full speed.

What version of the product are you using? On what operating system?
Windows 7 Ultimate, 64bit
Delphi XE2
ScaleMM_v215

Please provide any additional information below.
I am guessing it is something really stupid from my side, as I do not believe 
that a critical bug like that would not have been detected before. Anyway, I 
have been stuck with this bug for days now...

I would appreciate any help!

My system is a Dell Precision R5500, equipped with dual six-core Xeon 
processors, 64GB RAM.

Original issue reported on code.google.com by tf.ran...@gmail.com on 5 Mar 2013 at 6:18

Attachments:

GoogleCodeExporter commented 9 years ago
thanks for the test program, I could reproduce and fix it.
(already had a pending change open for a similar problem but could not test it).
It had no proper alignment 16byte in 64bit, added checks too (in debug mode) so 
it won't happen again :)
See subversion for latest version, will update .zip later

Original comment by andre.mussche on 6 Mar 2013 at 7:50

GoogleCodeExporter commented 9 years ago
Hi,

Thanks a lot for you time and effort put into ScaleMM.

It is a FANTASTIC piece of software, and has been playing a very important
role in my research (I am a professor of Ecology).

Best!

Thiago

Original comment by tf.ran...@gmail.com on 7 Mar 2013 at 2:59