[OMPI users] jemalloc and crash in opal_memory_linux_ptmalloc2_open

2013-07-03 Thread Brian Budge
Hi all -

I'm trying to use jemalloc with my project, but I get a crash in
opal_memory_linux_ptmalloc2_open when jemalloc is linked.  If I use
tcmalloc, this does not happen.

Any ideas?  Is there a sanctioned way to override malloc libraries in
conjunction with openmpi?

Thanks,
  Brian


Re: [OMPI users] openmpi 1.6.3 fails to identify local host if its IP is 127.0.1.1

2013-07-03 Thread Jeff Squyres (jsquyres)
Ralph and I talked some more about this.

Here's what we think:

1. The root cause of the issue is that you are assigning a non-existent IP 
address to a name.  I.e.,  maps to 127.0.1.1, but that IP address does not 
exist anywhere.  Hence, OMPI will never conclude that that  is "local".  
If you had assigned  to the 127.0.0.1 address, things should have worked 
fine.

Just curious: why are you doing this?

2. That being said, OMPI is not currently looking at all the responses from 
gethostbyname() -- we're only looking at the first one.  In the spirit of how 
clients are supposed to behave when multiple IP addresses are returned from a 
single name lookup, OMPI should examine all of those addresses and see if it 
finds one that it "likes", and then use that.  So we should extend OMPI to 
examine all the IP addresses from gethostbyname().  This should also fix your 
issue.

Ralph is going to work on this, but it'll likely take him a little time to get 
it done.  We'll get it into the trunk and probably ask you to verify that it 
works for you.  And if so, we'll back-port to the v1.6 and v1.7 series.  

One final caveat, however: at this point, it does not look likely that 1.6.6 
will ever happen.  If this all works out, the fix will be committed to the v1.6 
tree, and you can grab a nightly tarball snapshot (which are identical to our 
release tarballs except for their version numbers), or you can patch your 1.6.5 
installation.  But if 1.6.6 is ever released, the fix will be included.


On Jul 2, 2013, at 9:53 AM, Riccardo Murri  wrote:

> Hi,
> 
> sorry for the delay in replying -- pretty busy week :-(
> 
> 
> On 28 June 2013 21:54, Jeff Squyres (jsquyres)  wrote:
>> Here's what we think we know (I'm using the name "foo" instead of
>> your actual hostname because it's easier to type):
>> 
>> 1. When you run "hostname", you get foo.local back
> 
> Yes.
> 
> 
>> 2. In your /etc/hosts file, foo.local is listed on two lines:
>>   127.0.1.1
>>   10.1.255.201
>> 
> 
> Yes:
> 
>[rmurri@nh64-5-9 ~]$ fgrep nh64-5-9 /etc/hosts
>127.0.1.1   nh64-5-9.local nh64-5-9
>10.1.255.194nh64-5-9.local nh64-5-9
> 
> 
>> 3. When you login to the "foo" server and execute mpirun with a hostfile
>> that contains "foo", Open MPI incorrectly thinks that the local machine is
>> not foo, and therefore tries to ssh to it (and things go downhill from
>> there).
>> 
> 
> Yes.
> 
> 
>> 4. When you login to the "foo" server and execute mpirun with a hostfile
>> that contains "foo.local" (you said "FQDN", but never said exactly what you
>> meant by that -- I'm assuming "foo.local", not "foo.yourdomain.com"), then
>> Open MPI behaves properly.
>> 
> 
> Yes.
> 
> FQDN = foo.local.  (This is a compute node in a cluster that does not
> have any public IP address not DNS entry -- it only has an interface
> to the cluster-private network.  I presume this is not relevant to
> OpenMPI as long as all names are correctly resolved via `/etc/hosts`.)
> 
> 
>> Is that all correct?
> 
> Yes, all correct.
> 
> 
>> We have some followup questions for you:
>> 
>> 1. What happens when you try to resolve "foo"? (e.g., via the "dig" program
>> -- "dig foo")
> 
> Here's what happens with `dig`:
> 
>[rmurri@nh64-5-9 ~]$ dig nh64-5-9
> 
>; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> nh64-5-9
>;; global options:  printcmd
>;; Got answer:
>;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 4373
>;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
> 
>;; QUESTION SECTION:
>;nh64-5-9. IN  A
> 
>;; AUTHORITY SECTION:
>.  3600IN  SOA a.root-servers.net. 
> nstld.verisign-grs.com.
> 2013070200 1800 900 604800 86400
> 
>;; Query time: 17 msec
>;; SERVER: 10.1.1.1#53(10.1.1.1)
>;; WHEN: Tue Jul  2 15:47:57 2013
>;; MSG SIZE  rcvd: 101
> 
> However, `getent hosts` has a different reply:
> 
>[rmurri@nh64-5-9 ~]$ getent hosts nh64-5-9
>127.0.1.1   nh64-5-9.local nh64-5-9
> 
> 
>> 2. What happens when you try to resolve "foo.local"? (e.g., "dig foo.local")
> 
> Here's what happens with `dig`:
> 
>[rmurri@nh64-5-9 ~]$ dig nh64-5-9.local
> 
>; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> nh64-5-9.local
>;; global options:  printcmd
>;; Got answer:
>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62092
>;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
> 
>;; QUESTION SECTION:
>;nh64-5-9.local.   IN  A
> 
>;; ANSWER SECTION:
>nh64-5-9.local.259200  IN  A   10.1.255.194
> 
>;; AUTHORITY SECTION:
>local. 259200  IN  NS  ns.local.
> 
>;; ADDITIONAL SECTION:
>ns.local.  259200  IN  A   127.0.0.1
> 
>;; Query time: 0 msec
>;; SERVER: 10.1.1.1#53(10.1.1.1)
>;; WHEN: Tue Jul  2 15:48:50 2013
>;; MSG SIZE  rcvd: 81
> 
> Same query resolved via `getent hosts`

Re: [OMPI users] jemalloc and crash in opal_memory_linux_ptmalloc2_open

2013-07-03 Thread Jeff Squyres (jsquyres)
You can build Open MPI with --without-memory-manager -- that will turn off our 
malloc hooks stuff.

But if you're using OpenFabrics, you'll get lower bandwidth for large messages.


On Jul 3, 2013, at 2:38 PM, Brian Budge 
 wrote:

> Hi all -
> 
> I'm trying to use jemalloc with my project, but I get a crash in
> opal_memory_linux_ptmalloc2_open when jemalloc is linked.  If I use
> tcmalloc, this does not happen.
> 
> Any ideas?  Is there a sanctioned way to override malloc libraries in
> conjunction with openmpi?
> 
> Thanks,
>  Brian
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/




Re: [OMPI users] openmpi 1.6.3 fails to identify local host if its IP is 127.0.1.1

2013-07-03 Thread Riccardo Murri
Hi Jeff, Ralph,

first of all: thanks for your work on this!

On 3 July 2013 21:09, Jeff Squyres (jsquyres)  wrote:
> 1. The root cause of the issue is that you are assigning a
> non-existent IP address to a name.  I.e.,  maps to 127.0.1.1,
> but that IP address does not exist anywhere.  Hence, OMPI will never
> conclude that that  is "local".  If you had assigned  to
> the 127.0.0.1 address, things should have worked fine.

Ok, I see.  Would that have worked also if I had added the 127.0.1.1
address to the "lo" interface (in addition to 127.0.0.1)?


> Just curious: why are you doing this?

It's commonplace in Ubuntu/Debian installations; see, e.g.,
http://serverfault.com/questions/363095/what-does-127-0-1-1-represent-in-etc-hosts

In our case, it was rolled out as a fix for some cron job running on
Apache servers (apparently Debian's Apache looks up 127.0.1.1 and uses
that as the ServerName, unless a server name is not explicitly
configured), which was later extended to all hosts because "what harm
can it do?".

(Needless to say, we have rolled back the change.)


> 2. That being said, OMPI is not currently looking at all the
> responses from gethostbyname() -- we're only looking at the first
> one.  In the spirit of how clients are supposed to behave when
> multiple IP addresses are returned from a single name lookup, OMPI
> should examine all of those addresses and see if it finds one that
> it "likes", and then use that.  So we should extend OMPI to examine
> all the IP addresses from gethostbyname().

Just for curiosity: would it have worked, had I compiled OMPI with
IPv6 support?  (As far as I understand IPv6, an application is
required to examine all the addresses returned for a host name, and
not just pick the first one.)


> Ralph is going to work on this, but it'll likely take him a little
> time to get it done.  We'll get it into the trunk and probably ask
> you to verify that it works for you.  And if so, we'll back-port to
> the v1.6 and v1.7 series.

I'm glad to help and verify, but I guess we do not need the backport
or an urgent fix.  The easy workaround for us was to remove the
127.0.1.1 line from the compute nodes (we keep it only on Apache
servers where it originated).

Thanks,
Riccardo