scylladb / scylladb

NoSQL data store using the seastar framework, compatible with Apache Cassandra
http://scylladb.com
GNU Affero General Public License v3.0
13.52k stars 1.29k forks source link

offline-installer: pathelf causes std::bad_alloc on small memory environment #7835

Open syuu1228 opened 3 years ago

syuu1228 commented 3 years ago

When I tried to run offline installer on Vagrant based VM, I got following error:

$ sudo ./install.sh 
patchelf: std::bad_alloc

This seems like out of memory, since the VM only has 1GB memory. So the error is not really a bug, but we at least better to describe it in the document.

Note that the error occurs at patching to libexec/scylla:

+ adjust_bin scylla
+ local bin=scylla
+ patchelf --set-interpreter /opt/scylladb/libreloc/ld.so ///opt/scylladb/libexec/scylla
+ LD_LIBRARY_PATH=/home/vagrant/unified/scylla/libreloc
+ libreloc/ld.so libexec/patchelf --set-interpreter /opt/scylladb/libreloc/ld.so ///opt/scylladb/libexec/scylla
patchelf: std::bad_alloc

Probably because it is largest binary, uses more memory.

slivne commented 3 years ago

@penberg / @syuu1228 we need to document the memory limitations for offline-installer - what is the minimum memory size offline-installer can work with

syuu1228 commented 3 years ago

Seems like the error causes because of scylla binary size (1.4GB), memory size = 2.0GB should be enough.

$ ls -lh libexec/scylla 
-rwxr-xr-x. 1 syuu docker 1.4G Jan  4 13:05 libexec/scylla
syuu1228 commented 3 years ago

I tested on 0.5GB / 1.0GB / 2.0GB RAM VMs, 2GB VM worked fine, others cause bad_alloc.