Linux: oninit returns "shared memory base address illegal", fails to start
Posted in 2012
Topics: Installation, Setup & Upgrades, Server Administration, Licensing & Editions, Platform-Specific Issues
IDS Innovator-C V11.70UC4IE
Fedora Linux V16 running on a Lenovo thinkpad T500
I've had this installation running for a month or more now but on Friday I started the laptop up, logged in as informix, ran 'oninit' as usual and got:
### oninit return message
oninit: Fatal error inshared memory creation
Reading configuration file '/opt/informix/etc/onconfig.robin'...succeeded
Creating /INFORMIXTMP/.infxdirs...succeeded
Checking onconfig parameters...succeeded
Allocating and attaching to shared memory...FAILED
###
onstat -m has the following:
### onstat -m entry09:22:21 IBM Informix Dynamic Server Started.
09:22:21 Warning: The IBM IDS Innovator-C Edition license restriction limits
09:22:21 the total shared memory size for this server to 2097152 KB.
09:22:21 The maximum allowable shared memory was reset to this size to start the database server.
09:22:21 Insufficient free huge pages in /proc/meminfo for shared memory segment.
Requested: 114188288 bytes. Available: 0 bytes. The default memory page size will be used.
09:22:21 Segment locked: addr=0x44000000, size=114188288
09:22:21 Insufficient free huge pages in /proc/meminfo for shared memory segment.
Requested: 204800000 bytes. Available: 0 bytes. The default memory page size will be used.
09:22:21 shmat: [EINVAL][22]: shared memory base address illegal
09:22:21 Contiguous shared memory segment allocation failed at 0x4cce6000.Allocation successful at 0xffffffff.
Check SHMBASE is consistent with the value in $INFORMIXDIR/etc/onconfig.std.
If you are using the correct SHMBASE value in your ONCONFIG file, then
consider this message informational only.
09:22:21 mt_shm_init: can't create virtual segment
###
I changed nothing between shutting down with onmode -yuck on Thursday then doing a clean shutdown of the laptop, and restarting the machine on Friday morning and running oninit. I had a look at previous similar cases on 'cdi' and did spot an incorrect value in onconfig value "SHMNOBASE", i.e. it held "cpu,num=1,noage" (which was definitely not there before) for some reason which might imply something got corrupted somehow (I've now removed that value).
The relevant SHM entries follow:
###SHM entries in onconfig
RESIDENT -1
SHMBASE 0x44000000L
SHMVIRTSIZE 200000
SHMADD 32000
EXTSHMADD 32000
SHMTOTAL 0
SHMVIRT_ALLOCSEG 0,3
SHMNOACCESS
###
So SHMBASE is definitely the correct one for linux.
I'm wondering if fedora has downloaded a system update in the background that has somehow broken informix?
Any clues anyone please?
thanks
You need to set the number of huge memory pages available for Informix to
use. Your OS is currently configured to allow none (see the message log
output from during the boot). To do that, say you want to allow for 12GB
of huge page memory (pages are 2MB each), you can run:
echo 6144 > /proc/sys/vm/nr_hugepages
or
sysctl -w vm.nr_hugepages=6144
Of course, you must make sure this set across reboots too, so you may have
to set it in your rc scripts. You can check the setting with:
cat /proc/meminfo |grep HugePages
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Mon, Mar 26, 2012 at 5:35 AM, Malc P <malcrp@googlemail.com> wrote:
> IDS Innovator-C V11.70UC4IE
> Fedora Linux V16 running on a Lenovo thinkpad T500
>
> I've had this installation running for a month or more now but on Friday I
> started the laptop up, logged in as informix, ran 'oninit' as usual and got:
>
> ### oninit return message
> oninit: Fatal error inshared memory creation
> Reading configuration file '/opt/informix/etc/onconfig.robin'...succeeded
> Creating /INFORMIXTMP/.infxdirs...succeeded
> Checking onconfig parameters...succeeded
> Allocating and attaching to shared memory...FAILED
> ###
>
> onstat -m has the following:
> ### onstat -m entry> 09:22:21 IBM Informix Dynamic Server Started.
> 09:22:21 Warning: The IBM IDS Innovator-C Edition license restriction> limits
> 09:22:21 the total shared memory size for this server to 2097152 KB.
> 09:22:21 The maximum allowable shared memory was reset to this size to> start the database server.
> 09:22:21 Insufficient free huge pages in /proc/meminfo for shared memory
> segment.
> Requested: 114188288 bytes. Available: 0 bytes.> The default memory page size will be used.
> 09:22:21 Segment locked: addr=0x44000000, size=114188288
> 09:22:21 Insufficient free huge pages in /proc/meminfo for shared memory
> segment.
> Requested: 204800000 bytes. Available: 0 bytes.> The default memory page size will be used.
> 09:22:21 shmat: [EINVAL][22]: shared memory base address illegal
> 09:22:21 Contiguous shared memory segment allocation failed at 0x4cce6000.> Allocation successful at 0xffffffff.
> Check SHMBASE is consistent with the value in
> $INFORMIXDIR/etc/onconfig.std.
> If you are using the correct SHMBASE value in your ONCONFIG file, then
> consider this message informational only.
> 09:22:21 mt_shm_init: can't create virtual segment
> ###>
> I changed nothing between shutting down with onmode -yuck on Thursday then
> doing a clean shutdown of the laptop, and restarting the machine on Friday
> morning and running oninit. I had a look at previous similar cases on 'cdi'
> and did spot an incorrect value in onconfig value "SHMNOBASE", i.e. it held
> "cpu,num=1,noage" (which was definitely not there before) for some reason
> which might imply something got corrupted somehow (I've now removed that
> value).
>
> The relevant SHM entries follow:
> ###SHM entries in onconfig
> RESIDENT -1
> SHMBASE 0x44000000L
> SHMVIRTSIZE 200000
> SHMADD 32000
> EXTSHMADD 32000
> SHMTOTAL 0
> SHMVIRT_ALLOCSEG 0,3
> SHMNOACCESS
> ###>
> So SHMBASE is definitely the correct one for linux.
> I'm wondering if fedora has downloaded a system update in the background
> that has somehow broken informix?
> Any clues anyone please?
> thanks
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>
Art, I've been getting that error message
"Insufficient free huge pages in /proc/meminfo for shared memory segment.
Requested: 204800000 bytes. Available: 0 bytes.
The default memory page size will be used."
since I first installed and configured. The engine has run fine, as I said, up until Friday when it just didn't any more.
Anyhow, I tried the value you suggested and it now fails to start as follows:
###onstat -m output
11:39:21 IBM Informix Dynamic Server Started.
11:39:21 Warning: The IBM IDS Innovator-C Edition license restriction limits
11:39:21 the total shared memory size for this server to 2097152 KB.
11:39:21 The maximum allowable shared memory was reset to this size to start the database server.
11:39:21 Requested shared memory segment size rounded from 111512KB to 112640KB
11:39:21 Shared memory segment will use huge pages.
11:39:21 Segment locked: addr=0x44000000, size=115343360
11:39:21 Requested shared memory segment size rounded from 200000KB to 200704KB
11:39:21 Shared memory segment will use huge pages.
11:39:21 shmat: [EINVAL][22]: shared memory base address illegal
11:39:21 Contiguous shared memory segment allocation failed at 0x4ce00000.Allocation successful at 0xffffffff.
Check SHMBASE is consistent with the value in $INFORMIXDIR/etc/onconfig.std.
If you are using the correct SHMBASE value in your ONCONFIG file, then
consider this message informational only.
11:39:21 mt_shm_init: can't create virtual segment
###
So it seems to be somehow messing up on SHMBASE, although it said that it locked a segment at 0x44000000 it then went on to say it failed to allocate at 0x4ce00000 (or is that one of the other portions - messaging, say?). I tried it with RESIDENT set to 0 and got exactly the same error but without the 5 lines from "...Requested shared memory..." to "shared memory segment will use huge pages".
Hmm, what do:
cat /proc/meminfo
and
ipcs -m
report? It is possible that something else is now using shared memory so
that you are now exceeding SHMMAX trying to allocate the message segments
(for ipcshm connections) but were not before. If so, you could increase
SHMMAX the same way I suggested setting nr_hugepages.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Mon, Mar 26, 2012 at 6:58 AM, Malc P <malcrp@googlemail.com> wrote:
> Art, I've been getting that error message
> "Insufficient free huge pages in /proc/meminfo for shared memory segment.
> Requested: 204800000 bytes. Available: 0 bytes.
> The default memory page size will be used."
>
> since I first installed and configured. The engine has run fine, as I
> said, up until Friday when it just didn't any more.
> Anyhow, I tried the value you suggested and it now fails to start as
> follows:
>
> ###onstat -m output
> 11:39:21 IBM Informix Dynamic Server Started.
> 11:39:21 Warning: The IBM IDS Innovator-C Edition license restriction> limits
> 11:39:21 the total shared memory size for this server to 2097152 KB.
> 11:39:21 The maximum allowable shared memory was reset to this size to> start the database server.
> 11:39:21 Requested shared memory segment size rounded from 111512KB to> 112640KB
> 11:39:21 Shared memory segment will use huge pages.
> 11:39:21 Segment locked: addr=0x44000000, size=115343360
> 11:39:21 Requested shared memory segment size rounded from 200000KB to> 200704KB
> 11:39:21 Shared memory segment will use huge pages.
> 11:39:21 shmat: [EINVAL][22]: shared memory base address illegal
> 11:39:21 Contiguous shared memory segment allocation failed at 0x4ce00000.> Allocation successful at 0xffffffff.
> Check SHMBASE is consistent with the value in
> $INFORMIXDIR/etc/onconfig.std.
> If you are using the correct SHMBASE value in your ONCONFIG file, then
> consider this message informational only.
> 11:39:21 mt_shm_init: can't create virtual segment
> ###>
> So it seems to be somehow messing up on SHMBASE, although it said that it
> locked a segment at 0x44000000 it then went on to say it failed to allocate
> at 0x4ce00000 (or is that one of the other portions - messaging, say?). I
> tried it with RESIDENT set to 0 and got exactly the same error but without
> the 5 lines from "...Requested shared memory..." to "shared memory segment
> will use huge pages".
>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>