XBSA function failed to attach shared memory
Posted in 2008
Topics: Backup & Restore, Platform-Specific Issues, Versions, Editions & End-of-Life
I am testing an xbsa library with onbar to backup IDS 10.00.FC6W3. Running the
test on 64-bit PPC machine with AIX 5.2. The call sequence went thro'
BSAQueryApiVersion, BSAInit, BSABeginTxn and BSACreateObject without any
problems. However, BSASendData fails since I am unable to attach shared memory
identifier obtained from onbar.
Following is the log from my XBSA-library function BSASendData. (struct
DataBlock32* obtained from OnBar=pstcData)-
****************************************************
Inside BSASendData..
DataBlock32::NumBytes..65543
DataBlock32::Buflen..4026593280
DataBlock32::HeaderBytes..117440512
DataBlock32::BufPointer..27
DataBlock32::ShareId..7791616
DataBlock32::ShareOffset..0
Failed to attach shared memory Error No<22> EINVAL
returning BSA_RC_ABORT_SYSTEM_ERROR
*****************************************************
Code at Failed statement -
char* szBuff = (char*)shmat(pstcData->shareId, (void*)0, SHM_RDONLY);
Please help. Thanks in advance.
Hi,
are you sure that the XBSA library you want to
use really is supporting AIX 5.2 (and e.g. not just
AIX 5.3)?
Also, you can check whether IDS really has
an SHM segment with the given SHM ID.
E.g. use the command "onstat -g seg" to list
the SHM segments of IDS ...
TIA,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
IBM Deutschland Research & Development GmbH
Chairman of the Supervisory Board: Martin Jetter
Board of Management: Erich Baier
Corporate Seat: Boeblingen, Germany
Reg.-Gericht: Amtsgericht Stuttgart, HRB 243294
ids-bounces@iiug.org wrote on 30.09.2008 08:51:33:
> I am testing an xbsa library with onbar to backup IDS 10.00.FC6W3.
> Running the
> test on 64-bit PPC machine with AIX 5.2. The call sequence went thro'
> BSAQueryApiVersion, BSAInit, BSABeginTxn and BSACreateObject without any
> problems. However, BSASendData fails since I am unable to attach
> shared memory
> identifier obtained from onbar.
> Following is the log from my XBSA-library function BSASendData. (struct
> DataBlock32* obtained from OnBar=pstcData)-
> ****************************************************
> Inside BSASendData..
> DataBlock32::NumBytes..65543
> DataBlock32::Buflen..4026593280
> DataBlock32::HeaderBytes..117440512
> DataBlock32::BufPointer..27
> DataBlock32::ShareId..7791616
> DataBlock32::ShareOffset..0
> Failed to attach shared memory Error No<22> EINVAL
> returning BSA_RC_ABORT_SYSTEM_ERROR
> *****************************************************
> Code at Failed statement -
> char* szBuff = (char*)shmat(pstcData->shareId, (void*)0, SHM_RDONLY);
>
> Please help. Thanks in advance.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Hi Martin,
This is a new XBSA library that I developed (as per specs) and built on AIX
5.2. We've our own network storage manager and this XBSA library is supposed
to facilitate backup and restore of XBSA supported clients. With IDS, we've
configured Onbar (XBSA client) to use our XBSA library. Our storage manager
remotely triggered Onbar, which in turn loaded our library - the loaded
segment is different from IDS shared memory segments..
900000000d96000 38c2b /usr/iTRx/bin/libxbsa.so/
The SHM identifier received from Onbar by XBSA function BSASendData doesn't
match with any of the segments known to IDS.(onstat o/p given at the end). But
I guess it might be a SHM segment created by Onbar to write backup data
because it gives a different identifier each time. I could see from "onstat
-u" that three user threads got started for "informix" user after calling
Onbar.
Thanks,
Satheesh
#onstat -g seg
IBM Informix Dynamic Server Version 10.00.FC6WM1 -- On-Line -- Up 05:15:46 --637504 Kbytes
Segment Summary:
id key addr size ovhd class blkused blkfree
71303206 1381386241 700000010000000 441991168 437440 R 107902 6
27000875 1381386242 700000030000000 209715200 7136 V 15015 36185
1441832 1381386243 700000040000000 1097728 776 M 267 1
Total: - - 652804096 - - 123184 36192
(* segment locked in memory)
Output of Onbar -m..(XBSA error is returned from our library since SHM attach
failed)
2008-09-30 14:50:09 938006 1511590 /usr/informix_engine/bin/onbar_d -b -w -L 0
2008-09-30 14:50:09 938006 1511590 Working with itrx as generic storage
manager.
2008-09-30 14:50:26 938006 1511590 Archive started on rootdbs, logsdbs,
physdbs, acsm_order_dbs, apmsbs, assocdbs, aut
odbs, bmc_smgt_dbs, cisamdbs, coffsdbs, customerdbs, dbsp1, dbsp2, esl_dbs,
imagedbs, itemdbs, labeldbs, layawaydbs, men
u_dbs, modsdbs, offeringdbs, open_sys_dbs, tempdbs, verint_dbs, verint_sbs,
workload_schedule_dbs
(Requested Level 0).
2008-09-30 14:50:33 938006 1511590 Begin level 0 backup rootdbs.
2008-09-30 14:50:33 938006 1511590 Successfully connected to Storage Manager.
2008-09-30 14:50:34 938006 1511590 XBSA Error: (BSASendData) A system error
occurred. Aborting XBSA session.
2008-09-30 14:50:51 938006 1511590 /usr/informix_engine/bin/onbar_d complete,
returning 3 (0x03)
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