Hi
This post is to try resolve an issue discussed in Google Native Client forum:
[1] https://groups.google.com/forum/#!topic/native-client-discuss/7DUFfi_BxqM
To repeat the issue in a nutshell ::
Google native client (Chrome) works on recent versions of at least Ubuntu [1], but fails on Opensuse 11.4 (with all latest updates). This failure can be reproduced in chrome 14, 15, 16 (from http://dl.google.com/linux/chrome/rpm/stable/x86_64) and tested by loading
[2] [Load Progress Example](http://www.gonacl.com/dev/demos/sdk_examples/load_progress/load_progress.html)
The problem / question for opensuse (kernel?) config ::
There is a long discussion in the above thread, to get to the point quickly: The Google guys identified an issue with mmap() with MAP_NORESERVE (see below). Could this be a kernel configuration issue? Or perhaps expected?
A Chrome Nacl person suggest the following code should “Success” but it fails in my testing:
#include <stdio.h>
#include <sys/mman.h>
int main(void) {
void *addr;
printf("Hello world
Allocating…
");
addr = mmap((void *) NULL, 84 * (((size_t) 1) << 30), PROT_NONE,
MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0);
if (MAP_FAILED == addr) {
printf("FAILED
");
} else {
printf("Success: %p
", addr);
}
return 0;
}
This prints FAILED on Opensuse 11.4 64 bit.
Would this better be taken to the Opensuse kernel list?
Thanks,
Milan
PS: I am attaching a few pieces of info about my system that may be relevant:
The hardware is AMD 4 core AMD Athlon II X4 610e and has 16Gb (sixteen) of memory, running very little (just KDE desktop at this point)
swapon -s
Filename Type Size Used Priority
/dev/sda1 partition 20971516 0 -1
cat /proc/sys/vm/overcommit_memory
0
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 123980
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) 13556224
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 123980
virtual memory (kbytes, -v) 29536000
file locks (-x) unlimited
df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 82567856 15558248 62815408 20% /
devtmpfs 7934744 244 7934500 1% /dev
tmpfs 7974212 1592 7972620 1% /dev/shm
/dev/sda2 82567856 15558248 62815408 20% /
/dev/sda3 377510440 90623252 267710692 26% /home