Hi Paul,
I made a mistake into my previous response. The Informix instance is a root one.
After some investigations, I think the problem comes from the K8S cluster that does not allow access to huge pages even if it mount it into the pod.
Indeed, the same docker running on my PC with a microk8s cluster is working while it is not running on an IKS cluster (public IBM K8S cluster).
I created a docker with a small program that tests access to huge pages via shm (shmget function). This docker runs smoothly on microk8s but not on IKS. On IKS, it returns the following error:
--- SIGBUS {si_signo=SIGBUS, si_code=BUS_ADRERR, si_addr=0x7f7f71400000} ---+++ killed by SIGBUS (core dumped) +++The files for this test are attached.
The error of this program is the same as the Informix one.
I think the problem comes from this sentence that is in the Kubernetes documentation: Applications that consume huge pages via shmget() with SHM_HUGETLB must run with a supplemental group that matches proc/sys/vm/hugetlb_shm_group.
Or comes from a security option of the IKS.
But I don't understand how to solve it:
* I'm running the "hugepage-shm" program as root user (uid=0, gid=0);
* The content of "/proc/sys/vm/hugetlb_shm_group" is "0".
Maybe I need to adapt the pod's scuritycontext or apply a particular Pod Security Policy but I do not see which one?
I opened a support ticket on IBM. Let's see what they will say.
Regards,
Renaud
------------------------------
Renaud Demarneffe
------------------------------
Original Message:
Sent: Sun November 10, 2019 10:09 AM
From: Paul Watson
Subject: Hugepages
Huge pages and a non-root install doesn't work - or I have never been able to get it to work, change to a roof installation with no config changes and it should just work
Cheers
Paul
Paul Watson
Oninit LLC
+1-913-387-7529
www.oninit.com
Oninit®️ is a registered trademark of Oninit LLC
Original Message------
Hi Andreas,
Yes, I'm missing the "Segment locked" and "Successfully added" messages and nothing more gets written to the message log.
The output of the "ipcs -m" command, after the oninit hangup is:
informix@informixdb-hp-0:~$ ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x52564801 262144 root 660 10485760 0
The oninit.trc is attached to the post. As the Informix is installed as a non-root installation (executed by informix user), I need to hack in order to attach to the right process as soon as it started (oninit -ivwy >> $INIT_LOG & oninitpid=$(pidof oninit) ; sudo strace -s 65536 -o /tmp/oninit.trc -p $oninitpid).
Thanks for your help.
Regards,
Renaud
------------------------------
Renaud Demarneffe
------------------------------
#Informix