2.6.12-rc3 mmap lack of consistency among runs
As a way to freeze then restart processes,
the first shot of the process calls 'mmap' with NULL as 'start', then restarts of the process will call 'mmap' with the value received at the first shot, and expect to be assigned the requested area.
This used to work perfectly with 2.6.11 and all previous kernels (unless some shared libraries have been upgraded in the mean time),
but with 2.6.12-rc3 (I have not tested rc1 and rc2) it fails half time.
I can solve the problem through specifying a 'start' value at the first shot, but then I will get a more serious problem on the long run because the application would then have to be awared of the general layout of the address space enforced by the kernel and so could be disturbed by any change.
Quoted 6 lines · Hubert Tonneau
As a way to freeze then restart processes,
the first shot of the process calls 'mmap' with NULL as 'start', then restarts of the process will call 'mmap' with the value received at the first shot, and expect to be assigned the requested area.
Quoted 8 lines
This used to work perfectly with 2.6.11 and all previous kernels (unless some shared libraries have been upgraded in the mean time),
but with 2.6.12-rc3 (I have not tested rc1 and rc2) it fails half time.I can solve the problem through specifying a 'start' value at the first shot, but then I will get a more serious problem on the long run because the application would then have to be awared of the general layout of the address space enforced by the kernel and so could be disturbed by any change.
Maybe you're being bitten by the address space randomisation.
Try
echo 0 > /proc/sys/kernel/randomize_va_space