Closed manuel-serrano closed 6 years ago
Oops. And I have forgotten to mention: the benchmark is single-threaded...
Please retry with the single-threaded collector and GC source from master branch. It should be deterministic provided the OS is deterministic (regarding mmap'ed memory block addresses).
Hi Ivan,
Thanks for your response.
Please retry with the single-threaded collector and GC source from master branch. It should be deterministic provided the OS is deterministic (regarding mmap'ed memory block addresses). Sorry for the confusion. As I have said, this is already a single-threaded collector. The version I'm currently using is 7.5.0 released 27may2016. I will try with a newest version as soon as I have some spare time.
For your information, I have noticed this undeterministic behavior on many benchmarks...
-- Manuel
@manuel-serrano Check whether your OS is configured to use ASLR. ASLR necessarily causes the kind of nondeterminism you are seeing.
Thanks for your answer.
I have tried to disable PIE using standard gcc option but maybe this is not enough. I will investigate more as soon as I have some spare time.
-- Manuel
----- Original Message -----
From: "Jesin" notifications@github.com To: "ivmai/bdwgc" bdwgc@noreply.github.com Cc: "manuel-serrano" Manuel.Serrano@inria.fr, "Mention" mention@noreply.github.com Sent: Tuesday, November 7, 2017 10:58:39 PM Subject: Re: [ivmai/bdwgc] Undeterministic GC behavior (#189)
@manuel-serrano Check whether your OS is uses ASLR . ASLR necessarily causes the kind of nondeterminism you are seeing.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or mute the thread .
Dear Ivan,
I have recently observed a strange (at least to me) behavior that I would like to share with you, mostly to know if, i) you understand it, ii) it is the sign of something going wrong, iii) it impacts performance.
On several deterministic benchmars that are GC intensive, I have observed that succesive runs produce different GC execution traces. More precisely, I have observed that running succesively the same (deterministic) program with the same inputs on the same computer does not necessarily yield to the same number of collections and the semae memory occupation. Here is an example of two traces (I have instrumented the collector so that at each collection, it displays the heap size, the number of allocations since the last collection, and the live space). Here are two observed traces:
For some runs, the traces may even be much more different. For instance the number of executed collections might different by a factor of 2 or 3.
These traces correspond to the execution of a test that mostly allocates lisp pairs, i.e., a C struct containing exactly two pointers. List pairs are tagged with p & 0x3, that is the collector uses
GC_REGISTER_DISPLACEMENT( 0x3 )
These traces have been collected on a Linux x86 (32bit) machine. I have compiled with -fpie and I have disable memory randomization with
sudo echo 0 > /proc/sys/kernel/randomize_va_space
My questions are then:
Thanks in advance for your lights on that matter.
Sincerely,