Re: Linux: oninit returns "shared memory base address illegal", fails to start
Posted in 2012
On Monday, March 26, 2012 5:58:57 AM UTC-5, Malc 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".
The "Contiguous shared memory segment allocation failed at 0x4ce00000" message usually indicates that we tried to attach a segment next to our previous segment and got the errno 22 when trying to do the shmat call. That can happen because we've crashed into something else in the process address space (like a shared library loaded at a weird spot etc...). You could try using strace following forks and what not and try and identify what you are crashing into now. Or you could also attempt to use pmap which should dump out the process map and show you what is at what addresses. You'd probably need to have some script running over and over and trying to catch it while it is coming online. I'd just try playing around with shmbase (raising/lowering) until you can get the server up. Then it would be easier to use pmap to see what is getting into the address space around (or more likely a bit above) the 0x4ce00000 address.
Jacques Renaut
IBM Informix Advanced Support
APD Team