IFX_XFER_SHMBASE
Posted in 2016
On 32-bit IDS 12.10.TC4 under Windows Server 2008 R2, onstat/oncheck suddenly failed with "MapViewOfFileEx w32ec=487 ... Client could not attach server shared memory segment, use IFX_XFER_SHMBASE" (errno 22), although the engine, dbaccess and ODBC worked fine. Suggestions included checking shared-memory vs network connections, SHMBASE/SHMVIRTSIZE tuning, and using Process Explorer to find a DLL loaded inside Informix's address space (IFX_XFER_SHMBASE doesn't apply to onstat). The poster fixed it by shrinking buffer pools (switching to start_memory/memory settings), cutting the working set from ~850MB to ~426MB, after which the utilities could attach again.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Platform-Specific Issues, Jobs, Consulting & Announcements
This is ids12.1.tc4 on windows server 2008 R2 sp1 .
This problem just started and I donât know why.
When I run onstat I get this:
MapViewOfFileEx: w32ec=487 at nt_shm.c:754
09:51:19 shmat: [22]: operating system error
09:51:19 Client could not attach server shared memory segment, use
IFX_XFER_SHMBASE.
onstat: Cannot attach to shared memory. errno = 22
This article is on Linux ...
http://www-01.ibm.com/support/docview.wss?rs=630&uid=swg21238293
this is another
http://www-01.ibm.com/support/docview.wss?uid=swg21623474
In Windows, I presume they want me to âset IFX_XFER_SHMBASE=someaddressâ .
But the conundrum is that I cannot run onstat âg seg to get an address to
use.
Any ideas?
I'm not sure that you need to change IFX_XFER_SHMBASE here.
Do you have your INFORMIXSERVER value set to a network connection? If so, do
you have a shared memory connection that you can use for INFORMIXSERVER
instead and see what happens?
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
BillHatVerizon
Sent: Monday, February 29, 2016 9:04 AM
To: ids@iiug.org
Subject: IFX_XFER_SHMBASE [36646]
This is ids12.1.tc4 on windows server 2008 R2 sp1 .
This problem just started and I donââ¬â¢t know why.
When I run onstat I get this:
MapViewOfFileEx: w32ec=487 at nt_shm.c:754
09:51:19 shmat: [22]: operating system error
09:51:19 Client could not attach server shared memory segment, use
IFX_XFER_SHMBASE.
onstat: Cannot attach to shared memory. errno = 22
This article is on Linux ...
http://www-01.ibm.com/support/docview.wss?rs=630&uid=swg21238293
this is another
http://www-01.ibm.com/support/docview.wss?uid=swg21623474
In Windows, I presume they want me to ââ¬Åset
IFX_XFER_SHMBASE=someaddressââ¬Â .
But the conundrum is that I cannot run onstat ââ¬âg seg to get an address
to use.
Any ideas?
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
I am on the server itself (development server) .
INFORMIXSERVER is set to the name of the instance.
The service is 9088.
IDS is running well and odbc connections run fine.
dbaccess even works.
It is just onstat, oncheck, etc.
I don't know how to do what you are telling me.
-----Original Message-----
From: Mike Walker
Sent: Monday, February 29, 2016 10:34 AM
To: ids@iiug.org
Subject: RE: IFX_XFER_SHMBASE [36647]
I'm not sure that you need to change IFX_XFER_SHMBASE here.
Do you have your INFORMIXSERVER value set to a network connection? If so, do
you have a shared memory connection that you can use for INFORMIXSERVER
instead and see what happens?
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
BillHatVerizon
Sent: Monday, February 29, 2016 9:04 AM
To: ids@iiug.org
Subject: IFX_XFER_SHMBASE [36646]
This is ids12.1.tc4 on windows server 2008 R2 sp1 .
This problem just started and I donââ¬â¢t know why.
When I run onstat I get this:
MapViewOfFileEx: w32ec=487 at nt_shm.c:754
09:51:19 shmat: [22]: operating system error
09:51:19 Client could not attach server shared memory segment, use
IFX_XFER_SHMBASE.
onstat: Cannot attach to shared memory. errno = 22
This article is on Linux ...
http://www-01.ibm.com/support/docview.wss?rs=630&uid=swg21238293
this is another
http://www-01.ibm.com/support/docview.wss?uid=swg21623474
In Windows, I presume they want me to ââ¬Åset
IFX_XFER_SHMBASE=someaddressââ¬Â .
But the conundrum is that I cannot run onstat ââ¬âg seg to get an
address
to use.
Any ideas?
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi,
We've been using informix workgroup edition on windows for some years now,
although currently on server 2012r2. Since the problem just started none of
the following may apply, but mention them in case any of it helps.
If you are logged in as the administrator account try logging in with the
informix account. If you are logged in as informix try running commands in an
elevated command prompt. I've found a few issues with some of the 'on'
commands not behaving unless using informix in an elevated command prompt,
although onstat normally runs regardless of this. You don't have a mixed case
instance name perchance, I've had that affect some 'on' commands also?
Since everything else is running it is probably not memory. Memory related you
use to have to set a few things in onconfig file, but most of that is no
longer necessary with latest informix, like SHMNOACCESS to exclude memory
ranges of the system dll's or other programs. If you've got loads of memory
you could set the SHMBASE above the 4GB mark (I think windows dll's hang
around just below there) to see if it makes a difference but again should no
longer be necessary:
SHMBASE 0x141460000L #around the 5GB mark(we usually set this base to 0x80000000L although i think the default may be a
lot lower).
And for completeness tend to use these settings with success:
SHMVIRTSIZE 1048576 #1GB
SHMADD 204800 #add in 200mb lots
EXTSHMADD 8192
SHMTOTAL 0
SHMVIRT_ALLOCSEG 0,3
Sysinternals (now Microsoft) ProcessExplorer can show you where things have
been loaded into memory that may be conflicting...
That's all I've got.
Regards,
Bryce Stenberg
IT Department
Harness Racing New Zealand Inc.
-----Original Message-----
From: BillHatVerizon
Sent: Monday, 29 February 2016, at 11:52 a.m.
I am on the server itself (development server) .
INFORMIXSERVER is set to the name of the instance.
The service is 9088.
IDS is running well and odbc connections run fine.
dbaccess even works.
It is just onstat, oncheck, etc.
I don't know how to do what you are telling me.
-----Original Message-----
From: Mike Walker
Sent: Monday, February 29, 2016 10:34 AM
I'm not sure that you need to change IFX_XFER_SHMBASE here.
Do you have your INFORMIXSERVER value set to a network connection? If so, do
you have a shared memory connection that you can use for INFORMIXSERVER
instead and see what happens?
-----Original Message-----
From: BillHatVerizon
Sent: Monday, February 29, 2016 9:04 AM
This is ids12.1.tc4 on windows server 2008 R2 sp1 .
This problem just started and I donââ¬â¢t know why.
When I run onstat I get this:
MapViewOfFileEx: w32ec=487 at nt_shm.c:754
09:51:19 shmat: [22]: operating system error
09:51:19 Client could not attach server shared memory segment, use
IFX_XFER_SHMBASE.
onstat: Cannot attach to shared memory. errno = 22
This article is on Linux ...
http://www-01.ibm.com/support/docview.wss?rs=630&uid=swg21238293
this is another
http://www-01.ibm.com/support/docview.wss?uid=swg21623474
In Windows, I presume they want me to ââ¬Åset
IFX_XFER_SHMBASE=someaddressââ¬Â .
But the conundrum is that I cannot run onstat ââ¬âg seg to get an
address
to use.
Any ideas?
I tried what you suggested but ids would not start.
It wrote out olsrvice.log with
17:27:41 Service was shut-down externally.
17:27:41 mystiq: Failure in SuMain(): WaitForMultipleObjects(): 0: The
operation completed successfully.
This computer has 32gb of ram so I don't know what is going on.
May be some Windows update?
Maybe I need to go to Server 2012R2.
-----Original Message-----
From: BRYCE STENBERG
Sent: Monday, February 29, 2016 3:15 PM
To: ids@iiug.org
Subject: Re: IFX_XFER_SHMBASE [36657]
Hi,
We've been using informix workgroup edition on windows for some years now,
although currently on server 2012r2. Since the problem just started none of
the following may apply, but mention them in case any of it helps.
If you are logged in as the administrator account try logging in with the
informix account. If you are logged in as informix try running commands in an
elevated command prompt. I've found a few issues with some of the 'on'
commands not behaving unless using informix in an elevated command prompt,
although onstat normally runs regardless of this. You don't have a mixed case
instance name perchance, I've had that affect some 'on' commands also?
Since everything else is running it is probably not memory. Memory related you
use to have to set a few things in onconfig file, but most of that is no
longer necessary with latest informix, like SHMNOACCESS to exclude memory
ranges of the system dll's or other programs. If you've got loads of memory
you could set the SHMBASE above the 4GB mark (I think windows dll's hang
around just below there) to see if it makes a difference but again should no
longer be necessary:
SHMBASE 0x141460000L #around the 5GB mark(we usually set this base to 0x80000000L although i think the default may be a
lot lower).
And for completeness tend to use these settings with success:
SHMVIRTSIZE 1048576 #1GB
SHMADD 204800 #add in 200mb lots
EXTSHMADD 8192
SHMTOTAL 0
SHMVIRT_ALLOCSEG 0,3
Sysinternals (now Microsoft) ProcessExplorer can show you where things have
been loaded into memory that may be conflicting...
That's all I've got.
Regards,
Bryce Stenberg
IT Department
Harness Racing New Zealand Inc.
-----Original Message-----
From: BillHatVerizon
Sent: Monday, 29 February 2016, at 11:52 a.m.
I am on the server itself (development server) .
INFORMIXSERVER is set to the name of the instance.
The service is 9088.
IDS is running well and odbc connections run fine.
dbaccess even works.
It is just onstat, oncheck, etc.
I don't know how to do what you are telling me.
-----Original Message-----
From: Mike Walker
Sent: Monday, February 29, 2016 10:34 AM
I'm not sure that you need to change IFX_XFER_SHMBASE here.
Do you have your INFORMIXSERVER value set to a network connection? If so, do
you have a shared memory connection that you can use for INFORMIXSERVER
instead and see what happens?
-----Original Message-----
From: BillHatVerizon
Sent: Monday, February 29, 2016 9:04 AM
This is ids12.1.tc4 on windows server 2008 R2 sp1 .
This problem just started and I donââ¬â¢t know why.
When I run onstat I get this:
MapViewOfFileEx: w32ec=487 at nt_shm.c:754
09:51:19 shmat: [22]: operating system error
09:51:19 Client could not attach server shared memory segment, use
IFX_XFER_SHMBASE.
onstat: Cannot attach to shared memory. errno = 22
This article is on Linux ...
http://www-01.ibm.com/support/docview.wss?rs=630&uid=swg21238293
this is another
http://www-01.ibm.com/support/docview.wss?uid=swg21623474
In Windows, I presume they want me to ââ¬Ã
set
IFX_XFER_SHMBASE=someaddressââ¬Ã .
But the conundrum is that I cannot run onstat ââ¬âg seg to get an
address
to use.
Any ideas?
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Probably you installed something before the problem started.
Maybe a new/updated driver, windows updates, ...
As another comment already mentioned, you can use Process Explorer to find out
why onstat cannot attach to shared memory.
You need the 'lower pane' view and configure it to display DLLs.
For the failing process you should find a DLL with a base address in the
middle of the process address space used by Informix.
You can calculate the address space used by Informix by selecting from
sysmaster:syssegments to identify the start address for memory segments
(seg_shmaddr) and its sizes (seg_size).
Generally, why do you use 12.10.TC4 which is 32-bit Informix ?
This limits memory available for Informix to 2.7 GB.
And makes MapViewOfFileEx problems much more likely.
By the way, for onstat you cannot use IFX_XFER_SHMBASE, so this is not an
option here.
The messages in procexp go by too fast to read.
I always use 32bit informix because the 64bit will not work. All our c++ com
objects are targeted to 32-bit.
Also note that this is the IE version where shared memory is limited to 2gb.
So, If I spend man-years to get the old c++ code to build 64bit, I gain
nothing.
From: Garage_dba
Sent: Monday, March 07, 2016 11:48 AM
To: me at Hotmail
Subject: Fwd: IFX_XFER_SHMBASE [36711]
Sent from my iPhone
Begin forwarded message:
From: "WOLFGANG EPPLER" <wolfgang.eppler@de.ibm.com>
Date: March 7, 2016 at 9:54:29 AM CST
To: ids@iiug.org
Subject: Re: IFX_XFER_SHMBASE [36711]
Reply-To: ids@iiug.org
Probably you installed something before the problem started.
Maybe a new/updated driver, windows updates, ...
As another comment already mentioned, you can use Process Explorer to find out
why onstat cannot attach to shared memory.
You need the 'lower pane' view and configure it to display DLLs.
For the failing process you should find a DLL with a base address in the
middle of the process address space used by Informix.
You can calculate the address space used by Informix by selecting from
sysmaster:syssegments to identify the start address for memory segments
(seg_shmaddr) and its sizes (seg_size).
Generally, why do you use 12.10.TC4 which is 32-bit Informix ?
This limits memory available for Informix to 2.7 GB.
And makes MapViewOfFileEx problems much more likely.
By the way, for onstat you cannot use IFX_XFER_SHMBASE, so this is not an
option here.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
ok, in this case you could temporarily start up the instance with a minimum
amount of memory configured (very small bufferpool and SHMVIRTSIZE) - just for
the purpose of collecting the process explorer outputs.
In this case it's much more likely that onstat and other on... tools will be
able to attach to shared memory. This should give you additional time to
collect the process explorer information. If the output still goes by too
fast, you could use ontape in interactive mode so the process will exist long
enough. The problem DLL should be visible in process explorer output for
ontape as in onstat likewise.
Thanks to all that answered.
The solution was to change this:
BUFFERPOOL
size=4K,buffers=100000,lrus=16,lru_min_dirty=20.00,lru_max_dirty=30.00
BUFFERPOOL
size=16K,buffers=20000,lrus=8,lru_min_dirty=20.00,lru_max_dirty=30.00
to this:
BUFFERPOOL size=4K,start_memory=200mb,memory=400mb
BUFFERPOOL size=16K,start_memory=120mb,memory=320mb
Somehow the memory management in ids failed.
The ids âworking setâ memory in Windows task manager went from about 850mb
down to 426mb.
The shared memory is limited to 2GB on this version, so I donât understand
why onstat, ontape, etc blow up in this situation. They worked until TC4 (with
working set pushing the 2GB mark )
From: "WOLFGANG EPPLER" <wolfgang.eppler@de.ibm.com>
Date: March 7, 2016 at 9:54:29 AM CST
To: ids@iiug.org
Subject: Re: IFX_XFER_SHMBASE [36711]
Reply-To: ids@iiug.org
Probably you installed something before the problem started.
Maybe a new/updated driver, windows updates, ...
As another comment already mentioned, you can use Process Explorer to find out
why onstat cannot attach to shared memory.
You need the 'lower pane' view and configure it to display DLLs.
For the failing process you should find a DLL with a base address in the
middle of the process address space used by Informix.
You can calculate the address space used by Informix by selecting from
sysmaster:syssegments to identify the start address for memory segments
(seg_shmaddr) and its sizes (seg_size).
Generally, why do you use 12.10.TC4 which is 32-bit Informix ?
This limits memory available for Informix to 2.7 GB.
And makes MapViewOfFileEx problems much more likely.
By the way, for onstat you cannot use IFX_XFER_SHMBASE, so this is not an
option here.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi Bill,
this might be less of a memory management issue within IDS and a shared=20
library problem rather. Maybe some OS or Informix DLL gets located /=20
loaded at a memory location that's in the way of more contiguous shared=20
memory allocation.
You might be able to determine such 'misplaced' DLL by locating the oninit =
process in Process Explorer (from MS -> Sysinternals) and looking at DLLs=20
(Ctrl-D or View -> Lower Pane View -> DLLs). In this view you'd first=20
have to select more columns to display, what you need is the 'Base' column =
(and maybe also the 'Image Base' column). Now sort this view by 'Base'=20
column and compare the output to 'onstat -g seg' output. The later should =
have your shared memory segments as a contiguous set of memory ranges=20
(addr + size -> next addr), of which you'd find the upper end by adding=20
last segment's size (decimal) to its addr (hex).. Now you'd look at=20
oninit's DLL view again and find a DLL with a Base address closly above=20
this value. If there is one, this would be the reason why you can't=20
allocate more shared memory to this server.
In case you were able to determine such badly placed DLL this is where=20
'Image Base' comes into play. Image base is where the DLL itself says=20
it's to be placed, and I'd expect this to be the same value as the bad=20
'Base' address. If a DLL gets loaded and can be loaded at its imprinted=20
Image Base, this is what's going to occur, otherwise it would be loaded at =
a different location. So no problem if the DLL got loaded after shared=20
memory alread yhad been allocated. In Informix, on the other hand, shared =
memory allocation might occur only after certain DLLs have been loaded by=20
oninit.exe in which case shared memory creation might draw the short=20
straw.
Long story short: there's a circumvention to this problem by simply=20
're-basing' such DLL, i.e. modifying its imprinted base address to=20
something more suitable.
But let's first determine if this really is what's in your way.
There also is http://www.ibm.com/support/docview.wss?uid=3Dswg21389180 on=20
Informix on 32bit Windows in general which also touches a bit on this=20
particular problem.
Regards,
Andreas Legner, Informix L2 support
From: "BillHatVerizon" <garage=5Fdba@verizon.net>
To: ids@iiug.org
Date: 12.03.2016 03:06
Subject: Re: IFX=5FXFER=5FSHMBASE [36732]
Sent by: ids-bounces@iiug.org
Thanks to all that answered.=20
The solution was to change this:=20
BUFFERPOOL=20
size=3D4K,buffers=3D100000,lrus=3D16,lru=5Fmin=5Fdirty=3D20.00,lru=5Fmax=5F=
dirty=3D30.00=20
BUFFERPOOL=20
size=3D16K,buffers=3D20000,lrus=3D8,lru=5Fmin=5Fdirty=3D20.00,lru=5Fmax=5Fd=
irty=3D30.00=20
to this:=20
BUFFERPOOL size=3D4K,start=5Fmemory=3D200mb,memory=3D400mb=20
BUFFERPOOL size=3D16K,start=5Fmemory=3D120mb,memory=3D320mb=20
Somehow the memory management in ids failed.=20
The ids =E2??working set=E2?=9D memory in Windows task manager went from ab=
out=20
850mb=20
down to 426mb.=20
The shared memory is limited to 2GB on this version, so I don=E2??t=20
understand=20
why onstat, ontape, etc blow up in this situation. They worked until TC4=20
(with=20
working set pushing the 2GB mark )=20
From: "WOLFGANG EPPLER" <wolfgang.eppler@de.ibm.com>=20
Date: March 7, 2016 at 9:54:29 AM CST=20
To: ids@iiug.org=20
Subject: Re: IFX=5FXFER=5FSHMBASE [36711]=20
Reply-To: ids@iiug.org=20
Probably you installed something before the problem started.=20
Maybe a new/updated driver, windows updates, ...=20
As another comment already mentioned, you can use Process Explorer to find =
out=20
why onstat cannot attach to shared memory.=20
You need the 'lower pane' view and configure it to display DLLs.=20
For the failing process you should find a DLL with a base address in the=20
middle of the process address space used by Informix.=20
You can calculate the address space used by Informix by selecting from=20
sysmaster:syssegments to identify the start address for memory segments=20
(seg=5Fshmaddr) and its sizes (seg=5Fsize).=20
Generally, why do you use 12.10.TC4 which is 32-bit Informix ?=20
This limits memory available for Informix to 2.7 GB.=20
And makes MapViewOfFileEx problems much more likely.=20
By the way, for onstat you cannot use IFX=5FXFER=5FSHMBASE, so this is not =
an=20
option here.=20
***************************************************************************=
****=20
Forum Note: Use "Reply" to post a response in the discussion forum.=20
***************************************************************************=
****=20
Forum Note: Use "Reply" to post a response in the discussion forum.=20
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g