update to 1.9 problem : sh: xrealloc: ../bash/general.c:888: cannot reallocate 262144

gautier husson

New Member
Jan 28, 2011
5
0
1
Hello,

After upgrading to 1.9, my zabbix agent did some weird things : some values were sometimes collected, sometimes not.
After logging in debug mode, zabbix log shows :
sh: xrealloc: ../bash/general.c:888: cannot reallocate 262144 bytes (0 bytes allocated)
, several times, which is the cause of not getting properly some values.
I validated that this is the upgrade between 1.8 and 1.9 which triggers the problem.
I googled around and I didn't found something clear.
Link I found : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522849
Maybe somebody has an idea : is it a side effect of new kernel parameters, or a bug in the kernel, or may I have to recompile my zabbix client (which had never caused problem) ?


For clear information :

on a host with :
pve-manager: 1.9-24 (pve-manager/1.9/6542)
running kernel: 2.6.32-6-pve
proxmox-ve-2.6.32: 1.9-47
pve-kernel-2.6.32-6-pve: 2.6.32-47
qemu-server: 1.1-32
pve-firmware: 1.0-14
libpve-storage-perl: 1.0-19
vncterm: 0.9-2
vzctl: 3.0.29-2pve1
vzdump: 1.2-16
vzprocps: 2.0.11-2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.15.0-1
ksm-control-daemon: 1.0-6
==> the problem occurs


on a host with :
pve-manager: 1.8-18 (pve-manager/1.8/6070)
running kernel: 2.6.32-4-pve
proxmox-ve-2.6.32: 1.8-33
pve-kernel-2.6.32-4-pve: 2.6.32-33
qemu-server: 1.1-30
pve-firmware: 1.0-11
libpve-storage-perl: 1.0-17
vncterm: 0.9-2
vzctl: 3.0.28-1pve1
vzdump: 1.2-14
vzprocps: 2.0.11-2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.14.1-1
ksm-control-daemon: 1.0-6
==> the problem doesn't occurs


RQ : for the moment I have to keep 1.8 on production environment because zabbix monitors DRBD and PVE cluster status.

RQ : this has been tested on hosts with no load, and plenty of free RAM.

RQ : for downgrading :
vi /etc/apt/source.list #add : "deb http://download.proxmox.com/debian lenny pve1.8"
apt-get update
aptitude install \
pve-manager=1.8-18 \
proxmox-ve-2.6.32=1.8-33 \
pve-kernel-2.6.32-4-pve=2.6.32-33 \
qemu-server=1.1-30 \
pve-firmware=1.0-11 \
libpve-storage-perl=1.0-17 \
vncterm=0.9-2 \
vzctl=3.0.28-1pve1 \
vzdump=1.2-14 \
vzprocps=2.0.11-2 \
vzquota=3.0.11-1 \
pve-qemu-kvm=0.14.1-1



Thank you,

Sincerely,

Gautier Husson.
 
Re: update to 1.9 problem : sh: xrealloc: ../bash/general.c:888: cannot reallocate 26

Please try to assign more CPUs to that container.

CPU restrictions did not work with old kernel, but work with new kernel (so you now run with one CPU). Does that help?
 
Re: update to 1.9 problem : sh: xrealloc: ../bash/general.c:888: cannot reallocate 26

Hello Dietmar,

I should have told it more clearly :the problem is on the host, not on a KVM VM neither on a VZ container.
Anyway thank you for the idea.

Sincerely,
G. Husson.
 
Re: update to 1.9 problem : sh: xrealloc: ../bash/general.c:888: cannot reallocate 26

The problem is located on the kernel version :

a machine with :
pve-manager: 1.8-18 (pve-manager/1.8/6070)
running kernel: 2.6.32-6-pve
proxmox-ve-2.6.32: 1.8-33
pve-kernel-2.6.32-4-pve: 2.6.32-33
pve-kernel-2.6.32-6-pve: 2.6.32-47
qemu-server: 1.1-30
pve-firmware: 1.0-11
libpve-storage-perl: 1.0-17
vncterm: 0.9-2
vzctl: 3.0.28-1pve1
vzdump: 1.2-14
vzprocps: 2.0.11-2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.14.1-1
ksm-control-daemon: 1.0-6
===> the problem occurs.

After deleting kernel 2.6.32-6-pve (pve-kernel-2.6.32-6-pve: 2.6.32-47), and fall back to 2.6.32-4-pve (pve-kernel-2.6.32-4-pve: 2.6.32-33), I have :
pve-manager: 1.8-18 (pve-manager/1.8/6070)
running kernel: 2.6.32-4-pve
proxmox-ve-2.6.32: 1.8-33
pve-kernel-2.6.32-4-pve: 2.6.32-33
qemu-server: 1.1-30
pve-firmware: 1.0-11
libpve-storage-perl: 1.0-17
vncterm: 0.9-2
vzctl: 3.0.28-1pve1
vzdump: 1.2-14
vzprocps: 2.0.11-2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.14.1-1
ksm-control-daemon: 1.0-6
==> no problem anymore


G. Husson.
 
Re: update to 1.9 problem : sh: xrealloc: ../bash/general.c:888: cannot reallocate 26

The details are sketchy as it happened a few weeks back now. But after upgrading to 1.9 and the 2.6.32-6 kernel, I too got mysterious lock ups on one of my VM's, with a fairly basic Ubuntu 10.04 server (not running JVM) based on a LAMP stack.

Downgrading the kernel to 2.6.32-4 fixed it for me.

Other vm's worked fine with 2.6.32-6 though. ...
 
Re: update to 1.9 problem : sh: xrealloc: ../bash/general.c:888: cannot reallocate 26

2 weeks ago, I have done a new installation of proxmox, last version.
I had the same problem with my proxmox host, with zabbix agent (on host).
I googled a new time around the subject, and I focused on kernel ASLR (http://en.wikipedia.org/wiki/Address_space_layout_randomization).
I disabled it on host ("sudo echo 0 > /proc/sys/kernel/randomize_va_space"). And the problem with zabbix disappeared.
My Zabbix client was compiled in 2008 on etch. So I recompiled it on a fresh squeeze. Then I installed the new binaries and everything was OK.

I think there is something like old compiled binaries are linked to old libc with no ASLR capabilities or something like that.

Conclusion : either disable ASLR either recompile you binaries.

Best regards,
G. Husson