[Bug 31408] Unable to start wine (failed to mmap 0x7c000000 with MAP_FIXED)

Gary Coady gary at lyranthe.org
Tue Feb 14 14:59:37 UTC 2006


Public bug reported:
https://launchpad.net/malone/bugs/31408

Affects: linux-source-2.6.15 (Ubuntu)
       Severity: Normal
       Priority: (none set)
         Status: Unconfirmed

Description:
Since the latest dist-upgrade (it actually includes a few days' worth of upgrades), I can no longer run wine:
$ wine
Killed
$ strace -f wine
...
execve("/usr/bin/wine-preloader", ["/usr/bin/wine-preloader", "/usr/bin/wine-pthread"], [/* 35 vars */]) = 0
+++ killed by SIGKILL +++
$ strace -f /usr/bin/wine-preloader
execve("/usr/bin/wine-preloader", ["/usr/bin/wine-preloader"], [/* 35 vars */]) = 0
+++ killed by SIGKILL +++

When trying to verify the behaviour of the dynamic linker in loading this application:
$ strace -f /lib/ld-linux.so.2 /usr/bin/wine-preloader
...
old_mmap(0x7c000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = -1 ENOMEM (Cannot allocate memory)
close(3)                                = 0
writev(2, [{"/usr/bin/wine-preloader", 23}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"/usr/bin/wine-preloader", 23}, {": ", 2}, {"failed to map segment from share"..., 40}, {": ", 2}, {"Cannot allocate memory", 22}, {"\n", 1}], 10/usr/bin/wine-preloader: error while loading shared libraries: /usr/bin/wine-preloader: failed to map segment from shared object: Cannot allocate memory
) = 153
exit_group(127)                         = ?

The reason for that particular region being requested comes from the link line for wine-preloader in the wine package, which looks like
$(CC) -o $@ -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c000000 preloader.o $(LIBPORT) $(LDFLAGS)


I've done a brief test with
ret = mmap((void *) addr, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, fd, 0x1000);

to find what is allowed and denied with the kernel I'm running. The same
result appears on both the 386 and the 686 flavours of the kernel (the
maximum allowed value appears to be near 0x3fff0000).

I'm not sure if this should be considered a kernel issue or a wine
issue, please reassign if you think the package should be changed.
Obviously this address works for mmap sometime, on some kernel!

wine version: 0.9.6-0ubuntu1
linux-image-2.6.15-15-386 version: 2.6.15-15.21




More information about the kernel-bugs mailing list