[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#234452: [libx11-6]: libX11.so.6: failed to map segment from shared object: Cannot allocate memory



Package: libx11-6
Version: 4.3.0-2
Severity: normal

Hello:

I have updated libx11-6 to version 4.3.0-2 a couple of days ago, and I
have just realized that some programs have stopped working. For example,
JRE 1.4.2 doesn't work anymore, if fails both launching standalone
programs as well as running Java applets from a web browser (tried
Mozilla Firefox 0.8).

I also updated several other packages at the same time , so maybe the
problem lies elsewhere, but things like VMware have also started giving
similar problems about "shared" memory. I have tried those programs with
known-to-work kernel versions and the problem still remains.

I get the following error trying to start a Java graphical application
(http://a104.g.akamai.net/f/104/3242/15m/www.aeat.es/padres/ret/2004/descarga/ret4100.bin)
java.lang.UnsatisfiedLinkError: /opt/j2re1.4.2/lib/i386/libawt.so: libX11.so.6: failed to map segment from shared object: Cannot allocate memory

Another Java application that is giving problems and worked before the
upgrade is the following:
http://a104.g.akamai.net/7/104/3242/v004/www.aeat.es/padres/jret/2003/Retenciones2003.jar

This time the error I get is the following:
Error occurred during initialization of VM
Could not reserve enough space for object heap

Doing a "strace" of the above command (strace /opt/j2re1.4.2/bin/java
-jar Retenciones2003.jar) I see the place where it fails:
[...]
mmap2(NULL, 33554432, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x423b9000
mmap2(0x423b9000, 163840, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x423b9000
mmap2(NULL, 524288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x443b9000
mmap2(0x443b9000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x443b9000
mmap2(NULL, 163840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x44439000
gettimeofday({1077575870, 814655}, NULL) = 0
gettimeofday({1077575870, 814787}, NULL) = 0
gettimeofday({1077575870, 816787}, NULL) = 0
gettimeofday({1077575870, 816896}, NULL) = 0
gettimeofday({1077575870, 816989}, NULL) = 0
mmap2(NULL, 134217728, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)
write(1, "Error occurred during initializa"..., 43Error occurred during initialization of VM
) = 43


It seems that the process is trying to map a 128 MiB segment of memory,
but it fails. Values for /proc/sys/kernel/shm* have been always the
same, no changes here since the time applications worked.

If I try to start a VM from VMware I get this other error:
Cannot attach shared memory segment: Cannot allocate memory.
Failed to initialize SVGA device.

(I know VMware is not free software, there is no source code available
 and as a kernel module, you cannot trust what goes on behind the scenes
 when these modules are loaded, but I present this data here in the hope
 it does help identify the problem. Please take into account that the
 described problem with Java applications happen even with no VMware
 modules loaded, so VMware seems innocent this time :-)


This is when I assign 172 MiB of the host OS RAM to the virtual machine,
if I assing just 128 MiB the VM boots and runs OK.

Debian Sid installed, but not all packages updated to last versions
Linux kernel 2.6.3 compiled with Debian gcc 3.2.3 20030415
libc6 2.3.2.ds1-11, JRE 1.4.2 from SUN

Please disregard this bug report if I am completely misguided about this 
problem, and sorry for the inconvenience if that is the case.

Keep up the good work !

--
José Luis Domingo López
Linux Registered User #189436     Debian Linux Sid (Linux 2.6.2-bk3)



Reply to: