This is a problem of Ubuntu 20.04. After the kernel variables are set, kernel modules are still loaded which change settings again.
The problem can be solved by calling a sysctl -p again in a later rc file, e.g. in rc.local if rc.local is active.
Original Message:
Sent: Tue March 02, 2021 05:47 AM
From: Hrvoje Zokovic
Subject: IDS 14.10.FC5 on Ubuntu 20.04 - can't start shm listener
I'm afraid it is not working on 20.04:
informix@mate2004:~/i1410fc5$ sudo sysctl fs.protected_regular
[sudo] password for informix:
fs.protected_regular = 2
informix@mate2004:~/i1410fc5$ sudo sysctl fs.protected_regular=0
fs.protected_regular = 0
informix@mate2004:~/i1410fc5$ sudo sysctl fs.protected_regular
fs.protected_regular = 0
informix@mate2004:~/i1410fc5$ sudo reboot
...
informix@mate2004:~$ sudo sysctl fs.protected_regular
[sudo] password for informix:
fs.protected_regular = 2
informix@mate2004:~$
Hrvoje
------------------------------
Hrvoje Zokovic
Original Message:
Sent: Tue March 02, 2021 04:50 AM
From: Jon Ritson
Subject: IDS 14.10.FC5 on Ubuntu 20.04 - can't start shm listener
"Best" is subjective :)
It works when fs.protected_regular=0
For further "discussion" ...
https://askubuntu.com/questions/1250974/user-root-cant-write-to-file-in-tmp-owned-by-someone-else-in-20-04-but-can-in
------------------------------
Jon Ritson
Original Message:
Sent: Tue March 02, 2021 02:39 AM
From: Hrvoje Zokovic
Subject: IDS 14.10.FC5 on Ubuntu 20.04 - can't start shm listener
Hi JJ, yes I found that solution.
The same problem is in on 14.10.FC4W1 as well (also for all v14 back to 14.10.fc1 but those were released before Apr 2020).
V12 shm listener works fine (on ubuntu 20.04)
What is best solution to have permanent fs.protected_regular=0 ?
Regards
Hrvoje
------------------------------
Hrvoje Zokovic
Original Message:
Sent: Mon March 01, 2021 04:42 AM
From: Jon Ritson
Subject: IDS 14.10.FC5 on Ubuntu 20.04 - can't start shm listener
I raised this internally end of last year ... (i.e. there is an internal defect)
"Root cause is that the default kernel setting fs.protected_regular is 2
On Ubuntu 20.04 the default setting is 2; setting this to 0 (not 1 or 2) and the instance starts successfully."
Pending release notes / machine notes update.
JJ
------------------------------
Jon Ritson
Original Message:
Sent: Sat February 27, 2021 11:43 AM
From: Hrvoje Zokovic
Subject: IDS 14.10.FC5 on Ubuntu 20.04 - can't start shm listener
David, Mike, thank you - you pointed me to right google direction.
It seems that you must
sudo sysctl fs.protected_regular=0
Here's explanation (from https://github.com/sysrepo/sysrepo/issues/2080):
This is not a Ubuntu-specific issue. It's caused by recent enough kernel (4.19+) and systemd (>= 241). The /dev/shm
directory has the sticky bit set, this kernel patch added support for the fs.protected_regular
sysctl knob, and this knob in turn gets enabled via systemd
. As a result, one cannot use O_CREAT
on "somebody else's files" on those world-writable sticky directories.
That is NOT mentioned in documentation :)
Regards,
Hrvoje
------------------------------
Hrvoje Zokovic
Original Message:
Sent: Sat February 27, 2021 11:12 AM
From: Hrvoje Zokovic
Subject: IDS 14.10.FC5 on Ubuntu 20.04 - can't start shm listener
Thanks Mike, yes, normal root installation.
ipcs shows nothing:
informix@ifx-tecaj:~/i1410/bin$ ipcs------ Message Queues --------key msqid owner perms used-bytes messages------ Shared Memory Segments --------key shmid owner perms bytes nattch status------ Semaphore Arrays --------key semid owner perms nsemsinformix@ifx-tecaj:~/i1410/bin$
And permissions (on bin directory at least) seems OK to me:
drwxr-xr-x 2 informix informix 4096 Feb 27 12:00 about_files-rw-r--r-- 1 informix informix 577 Nov 30 23:00 about.html-rwxr-xr-x 1 informix informix 3346896 Nov 30 23:22 archecker-rwxr-xr-x 1 informix informix 2400712 Nov 30 23:19 blademgr-rwxr-xr-x 1 informix informix 3495960 Nov 30 23:19 cdr-rwxr-xr-x 1 informix informix 897096 Nov 30 23:00 chkenvdrwxr-xr-x 2 informix informix 4096 Feb 27 12:00 configuration-rwxr-xr-x 1 informix informix 897440 Nov 30 23:00 crtcmap-rwxr-xr-x 1 informix informix 61346 Nov 30 23:19 db2dbgm.jar-rwxr-xr-x 1 informix informix 2366624 Nov 30 23:19 dbaccess-rwxr-xr-x 2 informix informix 7847 Nov 30 23:19 dbaccessdemo-rwxr-xr-x 2 informix informix 7847 Nov 30 23:19 dbaccessdemo7-rwxr-xr-x 2 informix informix 6443 Nov 30 23:19 dbaccessdemo9-rwxr-xr-x 2 informix informix 6443 Nov 30 23:19 dbaccessdemo_ud-rwxr-xr-x 1 informix informix 2236536 Nov 30 23:19 dbexport-rwxr-xr-x 1 informix informix 1888592 Nov 30 23:19 dbimport-rwxr-xr-x 1 informix informix 1789008 Nov 30 23:19 dbload-rwxr-xr-x 1 informix informix 2235944 Nov 30 23:19 dbschema-rwxr-xr-x 1 informix informix 1985432 Nov 30 23:19 drdaprint-rwxr-xr-x 1 informix informix 56395 Nov 30 23:19 filtersym.sh-rwxr-xr-x 1 informix informix 5586 Nov 30 23:00 finderr-rwxr-xr-x 1 informix informix 1041512 Nov 30 23:00 GenMacKey-rwxr-xr-x 1 informix informix 1020480 Nov 30 23:00 genoncfg-rwxr-xr-x 1 informix informix 9721 Nov 30 23:00 glfiles-rwxr--r-- 1 informix informix 6357 Nov 30 23:19 hdrmkpri.sh-rwxr--r-- 1 informix informix 5178 Nov 30 23:19 hdrmksec.sh-rwxr-xr-- 1 informix informix 1373696 Nov 30 23:19 idsd-rwsr-s--- 1 root informix 8272 Nov 30 23:19 ifmxgcore-r-xr-xr-x 2 informix informix 21183 Nov 30 23:19 ifmx_security.sh-rwxr-xr-x 1 informix informix 6276365 Nov 30 23:00 ifxbkpcloud.jar-rwxr-xr-x 1 informix informix 2643808 Nov 30 23:19 ifxclone-rwxr-xr-x 1 informix informix 1084960 Nov 30 23:19 ifxcollect-rwxr-xr-x 1 informix informix 1660736 Nov 30 23:00 ifxdeploy-rwxr-xr-x 1 informix informix 71162 Nov 30 23:00 ifxdeployassist-rwxr-xr-x 1 informix informix 1750944 Nov 30 23:19 ifxguard-rwxr-xr-x 1 informix informix 24392 Nov 30 23:21 ifxpipecat-rwxr-xr-x 1 informix informix 126904 Nov 30 23:21 infoshp-rwxr-xr-x 1 informix informix 892928 Nov 30 23:00 infxmsg-rwxr-xr-x 1 informix informix 4500024 Nov 30 23:19 ipload-rwxr-xr-x 1 informix informix 9999507 Nov 30 23:00 jsonListener.jar-rwxr-xr-x 1 informix informix 335360 Nov 30 23:00 libcairo-swt.so-rwxr-xr-x 1 informix informix 142464 Nov 30 23:21 loadshp-rwxr-xr-x 1 informix informix 892880 Nov 30 23:00 msgfile-rwsr-sr-x 1 root informix 1810032 Nov 30 23:19 onaudit-rwxr-xr-x 1 informix informix 3998 Nov 30 23:22 onbar-rwsr-sr-x 1 root informix 4774392 Nov 30 23:22 onbar_d-rwxr-sr-x 1 informix informix 3736488 Nov 30 23:19 oncheck-rwsr-sr-x 1 root informix 1779288 Nov 30 23:19 onclean-rwxr-sr-x 1 informix informix 1335280 Nov 30 23:19 onconfig_diff-rwsr-sr-x 1 root informix 3912680 Nov 30 23:22 ondblog-rwxr-xr-x 1 informix informix 11498 Nov 30 23:21 ondwachk-rwsr-sr-x 1 root informix 2841664 Nov 30 23:19 onedcu-rwxr-sr-x 1 informix informix 1010904 Nov 30 23:19 onedpu-rwsr-sr-- 1 root informix 27470872 Nov 30 23:19 oninit-rwxr-xr-x 1 informix informix 988048 Nov 30 23:00 onkstash-rwsr-sr-- 1 informix informix 1934536 Nov 30 23:19 onkstore-rwxr-sr-x 1 informix informix 2267576 Nov 30 23:19 onload-rwxr-sr-x 1 informix informix 4150648 Nov 30 23:19 onlog-rwsr-sr-x 1 root informix 2762536 Nov 30 23:19 onmode-rwxr-sr-x 1 informix informix 3054096 Nov 30 23:19 onparams-rwxr-xr-x 1 informix informix 1012080 Nov 30 23:19 onpassword-rwxr-xr-x 1 informix informix 2594776 Nov 30 23:19 onperf-rwxr-xr-x 1 informix informix 2488528 Nov 30 23:19 onpladm-rwxr-sr-x 1 informix informix 4016128 Nov 30 23:19 onpload-rwxr-xr-x 1 informix informix 3043312 Nov 30 23:22 onpsm-rwxr-xr-x 1 informix informix 3342768 Nov 30 23:22 onrestorept-rwxr-xr-x 1 informix informix 1044664 Nov 30 23:19 onsecurity-rwsr-sr-x 1 root informix 1092648 Nov 30 23:19 onshowaudit-rwxr-xr-- 1 informix informix 4096 Nov 30 23:19 onshutdown.sh-rwsr-sr-x 1 root informix 4817496 Nov 30 23:22 onsmsync-rwsr-s--- 1 root informix 4149896 Nov 30 23:21 onsnmp-rwxr-sr-x 1 informix informix 3053760 Nov 30 23:19 onspaces-rwsr-s--- 1 root informix 1068280 Nov 30 23:21 onsrvapd-rwxr-sr-x 1 informix informix 8171568 Nov 30 23:19 onstat-rwsr-sr-x 1 root informix 4214416 Nov 30 23:19 ontape-rwxr-sr-x 1 informix informix 2267584 Nov 30 23:19 onunloaddrwxr-xr-x 3 informix informix 4096 Feb 27 12:00 plugins-rwxr-xr-x 1 informix informix 4989 Nov 30 23:00 rofferr-rwxr-x--- 1 informix informix 614384 Nov 30 23:21 snmpdm-r-xr-xr-x 1 informix informix 939288 Nov 30 23:22 txbsapswd-rwxr-xr-x 1 informix informix 137112 Nov 30 23:21 unloadshp-rwxr-xr-x 1 informix informix 2694952 Nov 30 23:19 xtrace-rwxr-sr-x 1 informix informix 2844192 Nov 30 23:19 xtree
Hrvoje
------------------------------
Hrvoje Zokovic
Original Message:
Sent: Sat February 27, 2021 10:53 AM
From: Mike Walker
Subject: IDS 14.10.FC5 on Ubuntu 20.04 - can't start shm listener
Error 13 is a permission error....so, worth verifying ownership on $INFORMIXDIR, and that the oninit has the correct permissions and owner.
I assume that the install was run as "root"?
Maybe run onclean - make sure no leftover processes or memory segments?
------------------------------
Mike Walker
Original Message:
Sent: Sat February 27, 2021 08:53 AM
From: Hrvoje Zokovic
Subject: IDS 14.10.FC5 on Ubuntu 20.04 - can't start shm listener
Before I open PMR, does anyone have this problem:
Normal installation, DBSERVERALIAS for shm connection:
DBSERVERNAME ifxpri
DBSERVERALIASES lo_ifxpri,ifxpri_shm
sqlhosts with shm record:
ifxpri onsoctcp 192.168.193.209 ifxpri
lo_ifxpri onsoctcp 127.0.0.1 lo_ifxpri
ifxpri_shm onipcshm 127.0.0.1 ifxpri_shm
Starting informix (oninit -v) ends with
Initializing DR structures...succeeded
Forking 1 'soctcp' listener threads...succeeded
Forking 1 'soctcp' listener threads...succeeded
Forking 1 'ipcshm' listener threads...informix@mate2004:~/i1410fc5/etc$
And in online log I have this
14:50:39 SQL_FEAT_CTRL value set to 0x8008
14:50:39 SQL_FEAT_CTRL2 value set to 0x1010
14:50:39 SQL_DEF_CTRL value set to 0x44004b0
14:50:39 Assert Failed: shm_be.c, line 3415, thread 12, errno=13, could not open shm file.
14:50:39 IBM Informix Dynamic Server Version 14.10.FC5
14:50:39 Who: Session(6, informix@, 0, (nil))
Thread(12, sm_listen, 0, 1)
File: neterrb.c Line: 530
14:50:39 stack trace for pid 888592 written to /home/informix/i1410fc5/tmp/af.3f44e2e
14:50:39 See Also: /home/informix/i1410fc5/tmp/af.3f44e2e
14:50:47 Thread ID 12 will NOT be suspended because
it is deemed too critical to the server.
14:50:47 See Also: /home/informix/i1410fc5/tmp/af.3f44e2e, shmem.3f44e2e.0
14:50:48 Starting crash time check of:
14:50:48 1. memory block headers
14:50:48 2. stacks
14:50:48 Crash time checking found no problems
14:50:48 neterrb.c, line 530, thread 12, proc id 888592, shm_be.c, line 3415, thread 12, errno=13, could not open shm file..
14:50:48 PANIC: Attempting to bring system down
Without shm listener instance is starting as usual.
Anyone?
Hrvoje
------------------------------
Hrvoje Zokovic
------------------------------
#Informix