[ace-users] ace-users: bind failure for hash map in shared memory

[ace-users] ace-users: bind failure for hash map in shared memory

Post by mauro cast » Fri, 16 Oct 2009 21:39:16


Hi,
I am having problems with the number of records I can insert
into a hash map which is in shared memory.
Any suggestion is very much appreciated.
Thanks,
Mauro


ACE VERSION: 5.5

HOST MACHINE and OPERATING SYSTEM:
Linux 2.6.9-55.ELsmpx86_64

TARGET MACHINE and OPERATING SYSTEM, if different from HOST:

COMPILER NAME AND VERSION (AND PATCHLEVEL):
gcc 3.4.6 20060404 (Red Hat 3.4.6-8)

THE $ACE_ROOT/ace/config.h FILE
#define ACE_HAS_ICMP_SUPPORT 1
#include "ace/config-linux.h"

THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU

CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
(used by MPC when you generate your own makefiles):

AREA/CLASS/EXAMPLE AFFECTED:

DOES THE PROBLEM AFFECT:
COMPILATION? No
LINKING? No
On Unix systems, did you run make realclean first?
EXECUTION? Yes
OTHER (please specify)?

SYNOPSIS:
A limited number of records can be added to a HashMap in shared
memory due to bind failure.

DESCRIPTION:
I need a hashmap in shared memory that has to contain milion of records.
The $ACE_ROOT/examples/APG/Shared_Memory/Hash_Map.cpp example perfectly
fits my requirements.
For test purposes only, I just changed the number of the Records to be
added by the parent from 20 to 1000, that is (line 118):
//for (in< i = mapLength ; i < mapLength + 20; i++)
for (i<t i = mapLength ; i < mapLength + 1000; i++)
As a result, the output is the following:
[developer@itmit2sl28 Shared_Memory]$ Hash_Map
(22851|182896977728) Map has 0 entries
In parent, map is located at 0x2a95804fc0
Map has 0 entries; adding 20 more //did not change the print!
Adding a record for 0
Adding a record for 1
...
Adding a record for 525
bind failed: Cannot allocate memory
Segmentation fault

So the execution is interrupted for binding failure.
Here are the kernel parameters:
fs.file-max = 65536
fs.file-nr = 7500 65536
kernel.sem = 2048 32000 100 4096
vm.hugetlb_shm_group = 0
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 4026531840
NOTE: The OS I have to use is Linux but, just for test, I tryed the same
source (with the 20-to-1000 change only) compiled on an HPUX,
and it normally terminates execution.
Just for completion, the HP machine stuffs are:
HP-UX B.11.11 U 9000/800
same ACE version (5.5)
aCC: HP ANSI C++ B3910B A.03.85
$ACE_ROOT/ace/config.h FILE:
#define ACE_HAS_ICMP_SUPPORT 1
#include "ace/config-hpux-11.00.h"
$ACE_ROOT/include/makeinclude/platform_macros.GNU FILE:
include $(ACE_ROOT)/include/makeinclude/platform_hpux_aCC.GNU

REPEAT BY:

SAMPLE FIX/WORKAROUND:



_________________________________________________________________
Windows Live: Keep your friends up to date with what you do online.
http://www.yqcomputer.com/ ::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:092010
 
 
 

[ace-users] ace-users: bind failure for hash map in shared memory

Post by Douglas C. » Fri, 16 Oct 2009 21:52:58

i Mauro,

Thanks very much for using the PRF.


Please upgrade to ACE+TAO+CIAO x.7.4 (i.e., ACE 5.7.4, TAO 1.7.4, and CIAO
0.7.4), which you can download from

http://download.dre.vanderbilt.edu

under the heading: "Latest Micro Release Kit."

The DOC group at Vanderbilt University only provides "best effort"
support for non-sponsors for the latest release, as described in

http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/docs/ACE-bug-process.html

Thus, if you need more "predictable" help for earlier versions of
ACE+TAO, I recommend that you check out

http://www.dre.vanderbilt.edu/support.html

for a list of companies that will provide you with ACE+TAO commercial
support.

Thanks,

Doug

>> HOST MACHINE and OPERATING SYSTEM:> > Linux 2.6.9-55.ELsmpx86_64>
> TARGET MACHINE and OPERATING SYSTEM, if different from HO>T: >>
> COMPILER NAME AND VERSION (AND PATCHLEV>L):
> gcc 3.4.6 20060404 (Red Hat 3.4.>-8)> >
> THE $ACE_ROOT/ace/config.h>FILE
> #define ACE_HAS_ICMP_SUPP>RT 1
> #include "ace/config-lin>x.h>
>
> THE $ACE_ROOT/include/makeinclude/platform_macros.GNU>FILE
> include $(ACE_ROOT)/include/makeinclude/platform_lin>x.G>U
>
> CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.f>atures
> (used by MPC when you generate your own mak>fil>s):
>
> AREA/CLASS/EXAMPLE >FFE>TED:
>
> DOES THE PROBL>M AFFECT:
> COMP>LATION? No
> gt;LINKING? No
> On Unix systems, did you run make rea>clean first?
> >XECUTION? Yes
> OTHER (p>eas> specify)?
> >> SYNOPSIS:
> A limited number of records can be added to a Ha>hMap in shared
> memory due >o b>nd failure.
>
>>DESCRIPTION:
> I need a hashmap in shared memory that has to contain m>lion of records.
> The $ACE_ROOT/examples/APG/Shared_Memory/Hash_Map.cpp e>ample perfectly
> fits>my requirements.
> For test purposes only, I just changed the number of t>e Records to be
> added by the parent from 20 to 1000, th>t is (line 118):
> //for (int<i = mapLength ; i < ma>Length + 20; i++)
> for (in< i = mapLength ; i < mapLen>th + 1000; i++)
> As a result, the outp>t is the following:
> [developer@itmit2sl28 Shar>d_Memory]$ Hash_Map
> (22851|18289697772>) Map has 0 entries
> In parent, map is loc>ted at 0x2a95804fc0
> Map has 0 entries; adding 20 more //did n>t change the print!
> A>ding a record for 0
> A>ding a record>for 1
> ...
> Add>ng a record for 525
> bind failed: Ca>not allocate memory
> gt; Segment>tion fault
>
> So the execution is interrupted >or binding failure.
> Here are th> kernel parameters:
> >fs.file-max = 65536
> fs.file-nr = 750> 0 65536
> kernel.sem = 2048>32000 100 4096
> vm.>ugetlb_shm_group = 0
> >kernel.shmmni = 4096
> ke>nel.shmall = 2097152
> kerne>.sh>max = 4026531840
> > NOTE: The OS I have to use is Linux but, just for t>st, I tryed the same
> source (with the 20-to-1000 change only> compiled on an HPUX,
> and it normall> terminates execution.
> Just for completion, the>HP machine stuffs are:
> HP>UX B.11.11 U 9000/800
> >same ACE version (5.5)
> aCC: HP >NSI C++ B3910B A.03.85
> $ACE_>OOT/ace/config.h FILE:
> #define>ACE_HAS_ICMP_SUPPORT 1
> #include "a>e/config-hpux-11.00.h"
> $ACE_ROOT/include/makeinclude
 
 
 

[ace-users] ace-users: bind failure for hash map in shared memory

Post by mauro cast » Fri, 16 Oct 2009 23:38:12

< XXXX@XXXXX.COM >
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0


Hi Doug=2C
with ACE 5.7.4 no more bind error.
Thank you very much!
Cheers=2C
Mauro


----------------------------------------
emory
nd CIAO
html
ords.
ctly
to be
the same
=2C
/social-network-basics.aspx?ocid=3DPID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:=
092010
=0A=
_________________________________________________________________=0A=
Keep your friends updated=97even when you=92re not signed in.=0A=
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/so=
cial-network-basics.aspx?ocid=3DPID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_5:092=
010=
 
 
 

[ace-users] ace-users: bind failure for hash map in shared memory

Post by Douglas C. » Sat, 17 Oct 2009 00:29:14

Hi Mauro,


Super, that's great news!! Thanks very much for letting us know.

Doug