[Debichem-devel] Bug#531419: mpicc segfaults when called by fakeroot

Jeff Squyres (jsquyres) jsquyres at cisco.com
Mon Jun 8 10:13:56 UTC 2009


I'm afk atm and can't see the full bug so far - yes, we should definitely not be aling anyflvor of alloc in the malloc init hook (eg via stat). 

Is there a run-time way to tell if we're running under fakeroot?  We can certainly just disable the malloc init hook if it detects that its under fakeroot. 

Also, we use our own libltdl because we require advanced features that are not always avail in the sys-instaled ltdl (eg installed ver is too old). There should be no conflict from our ltfdl and the sys installed one. Disabling it can be good atscale (eg dozens of machines in a single mpi job - see faq) and for debugging. 

I'll be back in range in several hours (boarding a floight right now). 

-jms
Sent from my PDA.  No type good.

----- Original Message -----
From: Manuel Prinz <debian at pinguinkiste.de>
To: Steve M. Robbins <steve at sumost.ca>
Cc: Jeff Squyres (jsquyres); 531419 at bugs.debian.org <531419 at bugs.debian.org>; 531522 at bugs.debian.org <531522 at bugs.debian.org>; fakeroot at packages.debian.org <fakeroot at packages.debian.org>; libc6 at packages.debian.org <libc6 at packages.debian.org>
Sent: Sun Jun 07 17:51:14 2009
Subject: Re: mpicc segfaults when called by fakeroot

Hi Jeff and Steve,

thanks a lot for diving into it! It's very appreciated! (I was not able
to access a computer during the last two days, so sorry for being
unresponsive!)

Am Sonntag, den 07.06.2009, 11:04 -0500 schrieb Steve M. Robbins:
> I was able to avoid the segfault simply by ifdef'ing out this section
> (patch attached).  This should suffice in the short term for Debian on
> the theory that OpenMPI compatibility with fakeroot is more important
> than OpenMPI compatibility with OpenFabrics.

This is very hard to decide. Of course, we need Open MPI to work with
fakeroot, since our build system relies on that. There's no way around
that. As for OpenFabrics, probably most users will use MPI over fast
interconnects, so we really do need InfiniBand support as well. With the
transition in mind, I would consider disabling InfiniBand as a
short-term and temporary option.

Nevertheless, I will do some more tests tomorrow, hoping to find a less
drastic solution. Jeff's suggestion to disable libltdl sounds like a
reasonable thing. As it seems, we should probably disable it anyway
since Open MPI brings it's own copy and does not allow to build against
a version already installed on the system. Jeff, can you confirm that?

(Currently, the versions of libltdl of Open MPI and Debian seem to
differ. Though might not be the reason, it might mean some extra work
for the release and/or security team.)

> However, there is clearly a bad interaction between this code, eglibc,
> and fakeroot.  Hence the cc's to the various packages.

Thanks for putting them in the loop! I already sent a mail to the libc
maintainers a view days ago but did not test with a downgraded libc.

> I'm speculating that memory allocation while in the
> __malloc_initialize_hook is a bad thing.  Perhaps the stat() in
> fakeroot caused a memory allocation, whereas the regular stat() does
> not, as this code doesn't segfault in normal use.

This is what I had in mind as well.

Thanks for your work so far! I'm quite confident that we can sort it out
soon! :)

Best regards
Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debichem-devel/attachments/20090608/360a946f/attachment-0001.htm>


More information about the Debichem-devel mailing list