Debian Bug report logs - #384565
FTBFS: Boost threads deadlock

version graph

Package: monotone; Maintainer for monotone is Debian Maintainers for Monotone <monotone-debian@nongnu.org>; Source for monotone is src:monotone.

Reported by: Bastian Blank <waldi@debian.org>

Date: Fri, 25 Aug 2006 07:18:01 UTC

Severity: serious

Tags: confirmed, moreinfo

Found in version monotone/0.29-1

Fixed in version monotone/0.31-2

Done: Shaun Jackman <sjackman@debian.org>

Bug is archived. No further changes may be made.

Forwarded to monotone-devel@nongnu.org

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to Bastian Blank <waldi@debian.org>:
New Bug report received and forwarded. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Bastian Blank <waldi@debian.org>
To: submit@bugs.debian.org
Subject: monotone - FTBFS: Build killed with signal 15 after 150 minutes of inactivity
Date: Fri, 25 Aug 2006 09:05:37 +0200
Package: monotone
Version: 0.29-1
Severity: serious

There was an error while trying to autobuild your package:

> Automatic build of monotone_0.29-1 on lxdebian.bfinv.de by sbuild/s390 85
[...]
> REAL_BLDDIR=$PWD/.; \
> 	(cd . && $REAL_BLDDIR/mtn --root=. automate get_revision) 2>/dev/null >package_full_revision_raw.txt \
> 	|| (cd . && mtn --root=. automate get_revision) 2>/dev/null >package_full_revision_raw.txt \
> 	|| rm -f package_full_revision_raw.txt
> make[1]: *** [package_full_revision_raw.txt] Terminated
> make: *** [common-install-impl] Terminated
> Build killed with signal 15 after 150 minutes of inactivity
> ******************************************************************************
> Build finished at 20060824-0244
> FAILED [dpkg-buildpackage died]



Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to "Shaun Jackman" <sjackman@gmail.com>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #10 received at 384565@bugs.debian.org (full text, mbox):

From: "Shaun Jackman" <sjackman@gmail.com>
To: monotone-devel@nongnu.org
Cc: 384565@bugs.debian.org
Subject: monotone 0.29 hangs on some architectures
Date: Fri, 25 Aug 2006 14:59:57 -0600
Monotone is failing to build on s390, hppa, sparc, mips, and mipsel.
It builds successfully on i386, amd64, ia64, alpha and powerpc.
Monotone 0.28 built successfully on all targets. The build log is
available here:

http://buildd.debian.org/build.php?pkg=monotone

I'd be most appreciative of anyone who could help me troubleshoot this
build failure. The build fails when `mtn --root=. automate
get_revision' is run. mtn appears to hang and never come back.

Cheers,
Shaun

---------- Forwarded message ----------
From: Bastian Blank <waldi@debian.org>
Date: Aug 25, 2006 1:05 AM
Subject: Bug#384565: monotone - FTBFS: Build killed with signal 15
after 150 minutes of inactivity
To: submit@bugs.debian.org


Package: monotone
Version: 0.29-1
Severity: serious

There was an error while trying to autobuild your package:

> Automatic build of monotone_0.29-1 on lxdebian.bfinv.de by sbuild/s390 85
[...]
> REAL_BLDDIR=$PWD/.; \
>       (cd . && $REAL_BLDDIR/mtn --root=. automate get_revision) 2>/dev/null >package_full_revision_raw.txt \
>       || (cd . && mtn --root=. automate get_revision) 2>/dev/null >package_full_revision_raw.txt \
>       || rm -f package_full_revision_raw.txt
> make[1]: *** [package_full_revision_raw.txt] Terminated
> make: *** [common-install-impl] Terminated
> Build killed with signal 15 after 150 minutes of inactivity
> ******************************************************************************
> Build finished at 20060824-0244
> FAILED [dpkg-buildpackage died]



Noted your statement that Bug has been forwarded to monotone-devel@nongnu.org. Request was from Christoph Berg <myon@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to Ludovic Brenta <ludovic@ludovic-brenta.org>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #17 received at 384565@bugs.debian.org (full text, mbox):

From: Ludovic Brenta <ludovic@ludovic-brenta.org>
To: 384565@bugs.debian.org
Subject: Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Tue, 26 Sep 2006 11:00:31 +0200
The bug still happens with 0.30.  I was browsing the monotone-devel
archives and something went *tick* in my head:

Shaun Jackman wrote:
> The monotone-0.30.tar.gz tarball shipped with package_revision.txt set
> to `unknown'. Should this be fixed?

Thomas Moschny wrote:
> [it is likely to affect 0.30 users] only in such a way that
> 'mtn --full-version' says something like "base revision: unknown",
> and only if they use a binary built from the official tarfile. Other
> than that purely cosmetic issue it should not cause any problems.
>
> However, if you used to do something like 'cat _MTN/revision' in *your
> own* project, you should change that to 'mtn automate get_revision_id'.

Nathaniel Smith wrote:
> 'mtn automate get_base_revision_id'

The build failure occurs when you try to call 'mtn automate get_revision'.
Could you try to change that to get_base_revision_id, and see if it
improves things?

-- 
Ludovic Brenta.




Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to "Shaun Jackman" <sjackman@gmail.com>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #22 received at 384565@bugs.debian.org (full text, mbox):

From: "Shaun Jackman" <sjackman@gmail.com>
To: "Ludovic Brenta" <ludovic@ludovic-brenta.org>, monotone-devel@nongnu.org
Cc: 384565@bugs.debian.org
Subject: Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Tue, 26 Sep 2006 12:10:52 -0600
On 9/26/06, Ludovic Brenta <ludovic@ludovic-brenta.org> wrote:
> The bug still happens with 0.30.  I was browsing the monotone-devel
> archives and something went *tick* in my head:
>
> Shaun Jackman wrote:
> > The monotone-0.30.tar.gz tarball shipped with package_revision.txt set
> > to `unknown'. Should this be fixed?
>
> Thomas Moschny wrote:
> > [it is likely to affect 0.30 users] only in such a way that
> > 'mtn --full-version' says something like "base revision: unknown",
> > and only if they use a binary built from the official tarfile. Other
> > than that purely cosmetic issue it should not cause any problems.
> >
> > However, if you used to do something like 'cat _MTN/revision' in *your
> > own* project, you should change that to 'mtn automate get_revision_id'.
>
> Nathaniel Smith wrote:
> > 'mtn automate get_base_revision_id'
>
> The build failure occurs when you try to call 'mtn automate get_revision'.
> Could you try to change that to get_base_revision_id, and see if it
> improves things?

Both commands exist in fact. get_revision is used to generate
package_full_revision.txt, and get_base_revision_id is used to
generate package_revision.txt. Both of these commands require a
monotone workspace though, and the tarball does not ship with one.
monotone should give an error:

monotone-0.30$ mtn automate get_revision
mtn: misuse: workspace required but not found
monotone-0.30$ mtn automate get_base_revision_id
mtn: misuse: workspace required but not found

I suspect the resulting monotone binary should not be run at all
during the build. Perhaps if I add all the missing .txt files, the
build would succeed again. Although, that doesn't explain why the
current build fails.

Cheers,
Shaun



Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to Thomas Moschny <thomas.moschny@gmx.de>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #27 received at 384565@bugs.debian.org (full text, mbox):

From: Thomas Moschny <thomas.moschny@gmx.de>
To: monotone-devel@nongnu.org
Cc: 384565@bugs.debian.org, "Ludovic Brenta" <ludovic@ludovic-brenta.org>
Subject: Re: [Monotone-devel] Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Tue, 26 Sep 2006 22:18:38 +0200
On Tuesday 26 September 2006 20:10, Shaun Jackman wrote:
> Both commands exist in fact. get_revision is used to generate
> package_full_revision.txt, and get_base_revision_id is used to
> generate package_revision.txt. Both of these commands require a
> monotone workspace though, and the tarball does not ship with one.
> monotone should give an error:

But the tarfile comes with package_full_revision_dist.txt and 
package_revision.txt, and the build proces overwrites them only after  
successfully running the two commands mentioned above. Otherwise, it simply 
uses them as they are.

- Thomas

-- 
Thomas Moschny  <thomas.moschny@gmx.de>




Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to Ludovic Brenta <ludovic@ludovic-brenta.org>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #32 received at 384565@bugs.debian.org (full text, mbox):

From: Ludovic Brenta <ludovic@ludovic-brenta.org>
To: 384565@bugs.debian.org
Subject: Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Thu, 28 Sep 2006 18:36:08 +0200
Much to my bafflement, I notice that 0.29 built successfully on sparc,
but 0.30 FTBFS.  Also, the machine that built 0.29 may not be the same
as the one that built 0.30; for sparc, these were phleebhut and auric,
respectively.  I suspect that there may be a hardware problem on some
of the buildd machines.  The current situation is:

          0.28    0.29    0.30
alpha     ok      ok      ok
amd64     ok      ok      ok
arm       ok      FTBFS   FTBFS
hppa      ok      FTBFS   FTBFS
ia64      ok      ok      ok
m68k      ok      FTBFS   ?
mips      ok      FTBFS   FTBFS
mipsel    ok      FTBFS   FTBFS
powerpc   ok      ok      ok
s390      ok      FTBFS   ?
sparc     ok      ok      FTBFS

m68k is lagging behind as usual, and s390 is uncharacteristically
lagging behind :)

-- 
Ludovic Brenta.



Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to Roman Zippel <zippel@linux-m68k.org>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #37 received at 384565@bugs.debian.org (full text, mbox):

From: Roman Zippel <zippel@linux-m68k.org>
To: 384565@bugs.debian.org
Subject: Re: [Monotone-devel] Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Thu, 28 Sep 2006 20:16:26 +0200 (CEST)
Hi,

I debugged the problem a bit and the problem seems to be the 
BOOST_SP_DISABLE_THREADS define and monotone being linked against the 
multithreaded boost libraries. boost and monotone have a different idea 
of the sp_counted_base class, so that it gets initialized within monotone 
non-threaded and boost later tries to lock some initialized memory and 
thus hangs.
I recompiled monotone without the two boost defines and it seems to work
fine.

BTW when you generate a diff, please don't forget to touch Makefile.in 
somewhere, so the buildd won't attempt to regenerate it again from 
Makefile.am.

bye, Roman



Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to "Shaun Jackman" <sjackman@gmail.com>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #42 received at 384565@bugs.debian.org (full text, mbox):

From: "Shaun Jackman" <sjackman@gmail.com>
To: "Roman Zippel" <zippel@linux-m68k.org>, 384565@bugs.debian.org
Subject: Re: Bug#384565: [Monotone-devel] Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Thu, 28 Sep 2006 14:10:37 -0600
Thank you for that trouble shooting! This is very useful information.

Cheers,
Shaun

On 9/28/06, Roman Zippel <zippel@linux-m68k.org> wrote:
> Hi,
>
> I debugged the problem a bit and the problem seems to be the
> BOOST_SP_DISABLE_THREADS define and monotone being linked against the
> multithreaded boost libraries. boost and monotone have a different idea
> of the sp_counted_base class, so that it gets initialized within monotone
> non-threaded and boost later tries to lock some initialized memory and
> thus hangs.
> I recompiled monotone without the two boost defines and it seems to work
> fine.
>
> BTW when you generate a diff, please don't forget to touch Makefile.in
> somewhere, so the buildd won't attempt to regenerate it again from
> Makefile.am.
>
> bye, Roman
>
>



Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #47 received at 384565@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: Ludovic Brenta <ludovic@ludovic-brenta.org>, 384565@bugs.debian.org
Subject: Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Thu, 28 Sep 2006 15:04:08 -0700
On Thu, Sep 28, 2006 at 06:36:08PM +0200, Ludovic Brenta wrote:
> Much to my bafflement, I notice that 0.29 built successfully on sparc,
> but 0.30 FTBFS.  Also, the machine that built 0.29 may not be the same
> as the one that built 0.30; for sparc, these were phleebhut and auric,
> respectively.

"phleebhut" is not a Debian buildd.  It's possible that 0.29 succeeded only
because someone hand-built the package without a timeout and uploaded it.

>  I suspect that there may be a hardware problem on some of the buildd
> machines.

No, it looks to me like monotone is running a command during the build that
takes an unreasonably long time to complete on a number of our
architectures.

We could ask the buildd maintainers to increase timeouts for monotone, but
given that the timeout is happening when executing a runtime command that's
*part* of the package, I do have to wonder whether the resulting binaries
are actually useful if they're this slow.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/



Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to "Shaun Jackman" <sjackman@gmail.com>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #52 received at 384565@bugs.debian.org (full text, mbox):

From: "Shaun Jackman" <sjackman@gmail.com>
To: "Steve Langasek" <vorlon@debian.org>, 384565@bugs.debian.org
Cc: "Ludovic Brenta" <ludovic@ludovic-brenta.org>, monotone-devel@nongnu.org
Subject: Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Thu, 28 Sep 2006 17:08:36 -0600
On 9/28/06, Steve Langasek <vorlon@debian.org> wrote:
> No, it looks to me like monotone is running a command during the build that
> takes an unreasonably long time to complete on a number of our
> architectures.
>
> We could ask the buildd maintainers to increase timeouts for monotone, but
> given that the timeout is happening when executing a runtime command that's
> *part* of the package, I do have to wonder whether the resulting binaries
> are actually useful if they're this slow.

It appears the problem is not a command taking too long run, but a
thread deadlock situation. See below.

Cheers,
Shaun

On 9/28/06, Roman Zippel <zippel@linux-m68k.org> wrote:
> Hi,
>
> I debugged the problem a bit and the problem seems to be the
> BOOST_SP_DISABLE_THREADS define and monotone being linked against the
> multithreaded boost libraries. boost and monotone have a different idea
> of the sp_counted_base class, so that it gets initialized within monotone
> non-threaded and boost later tries to lock some initialized memory and
> thus hangs.
> I recompiled monotone without the two boost defines and it seems to work
> fine.
>
> BTW when you generate a diff, please don't forget to touch Makefile.in
> somewhere, so the buildd won't attempt to regenerate it again from
> Makefile.am.
>
> bye, Roman



Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to Wookey <wookey@aleph1.co.uk>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #57 received at 384565@bugs.debian.org (full text, mbox):

From: Wookey <wookey@aleph1.co.uk>
To: 384565@bugs.debian.org
Subject: monotone FTBFS on arm
Date: Mon, 6 Nov 2006 03:24:06 +0000
I tried building this on a fast arm machine and it hung at the 
cd . && $REAL_BLDDIR/mtn --root=. automate get_base_revision_id) 2>/dev/null >package_revision_raw.txt \
        || (cd . && mtn --root=. automate get_base_revision_id) 	2>/dev/null >package_revision_raw.txt \
        || rm -f package_revision_raw.txt

command for about 30 hrs so I think it's safe to conclude it's not
going to finish.

running 
home/wookey/monotone-0.30/./mtn --root=. automate get_base_revision_id
by hand gets this error:
error while loading shared libraries:
libboost_date_time-gcc-mt-1_33_1.so.1.33.1: cannot open shared object file: No such file or directory		

I don't know if that's a clue? 

There is 
libboost_program_options-gcc-mt-1_33_1.so.1.33.1
libboost_regex-gcc-1_33_1.so.1.33.1
libboost_regex-gcc-mt-1_33_1.so.1.33.1
libboost_program_options-gcc-1_33_1.so.1.33.1
in /usr/lib

Where should libboost_date_time-gcc-mt come from or has the wrong name
been picked up?

Wookey
-- 
Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK  Tel +44 (0) 1223 811679
work: http://www.aleph1.co.uk/                 play: http://wookware.org/



Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to "Shaun Jackman" <sjackman@gmail.com>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #62 received at 384565@bugs.debian.org (full text, mbox):

From: "Shaun Jackman" <sjackman@gmail.com>
To: monotone-devel@nongnu.org
Cc: "Roman Zippel" <zippel@linux-m68k.org>, 384565@bugs.debian.org, "Control@BTS" <control@bugs.debian.org>
Subject: Re: Bug#384565: [Monotone-devel] Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Tue, 21 Nov 2006 14:04:07 -0700
package monotone
tag 384565 confirmed moreinfo
thanks

On 9/28/06, Roman Zippel <zippel@linux-m68k.org> wrote:
> Hi,
>
> I debugged the problem a bit and the problem seems to be the
> BOOST_SP_DISABLE_THREADS define and monotone being linked against the
> multithreaded boost libraries. boost and monotone have a different idea
> of the sp_counted_base class, so that it gets initialized within monotone
> non-threaded and boost later tries to lock some initialized memory and
> thus hangs.
> I recompiled monotone without the two boost defines and it seems to work
> fine.
...

Nathaniel,

It appears the BOOST_SP_DISABLE_THREADS is the source of monotone's
cross-platform issues on Debian. Namely, that monotone fails to run
(deadlock) on s390, hppa, sparc, mips, and mipsel, but runs fine on
i386, amd64, ia64, alpha and powerpc [1].

[1] http://buildd.debian.org/build.php?pkg=monotone

One suggested workaround (by Roman Zippel above) is to remove
-DBOOST_SP_DISABLE_THREADS. The ChangeLog indicates that Nathaniel
added this feature on 2005-09-30.

So, my questions for the monotone mailing list are...

1. Is this more likely a bug in Boost or a bug in monotone?
2. Is it reasonable to workaround this bug by removing
-DBOOST_SP_DISABLE_THREADS?
3. Is it worth going to the extra effort to only define
-DBOOST_SP_DISABLE_THREADS on the platforms for which it works? I'll
consider this last option if it means a performance improvement of at
least, say arbitrarily, a factor of two or so.

Debian's freeze and release of Etch is imminent, and I'd like to nail
this bug before then. Otherwise, Etch will ship with the last bug-free
version of monotone, which was 0.28.

Thanks!
Shaun
your friendly Debian monotone maintainer



Tags added: confirmed, moreinfo Request was from "Shaun Jackman" <sjackman@gmail.com> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to Nathaniel Smith <njs@pobox.com>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #69 received at 384565@bugs.debian.org (full text, mbox):

From: Nathaniel Smith <njs@pobox.com>
To: Shaun Jackman <sjackman@gmail.com>
Cc: monotone-devel@nongnu.org, Roman Zippel <zippel@linux-m68k.org>, 384565@bugs.debian.org
Subject: Re: Bug#384565: [Monotone-devel] Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Tue, 21 Nov 2006 19:40:39 -0800
On Tue, Nov 21, 2006 at 02:04:07PM -0700, Shaun Jackman wrote:
> It appears the BOOST_SP_DISABLE_THREADS is the source of monotone's
> cross-platform issues on Debian. Namely, that monotone fails to run
> (deadlock) on s390, hppa, sparc, mips, and mipsel, but runs fine on
> i386, amd64, ia64, alpha and powerpc [1].
> 
> [1] http://buildd.debian.org/build.php?pkg=monotone
> 
> One suggested workaround (by Roman Zippel above) is to remove
> -DBOOST_SP_DISABLE_THREADS. The ChangeLog indicates that Nathaniel
> added this feature on 2005-09-30.

Right, makes sense.  Thanks, Roman, for tracking this down.

> So, my questions for the monotone mailing list are...
> 
> 1. Is this more likely a bug in Boost or a bug in monotone?

It is sort of an unfortunate fact of life.  But monotone is the
simplest place to work around it.

> 2. Is it reasonable to workaround this bug by removing
> -DBOOST_SP_DISABLE_THREADS?

Yes, that should work fine, with only some slowdown.

> 3. Is it worth going to the extra effort to only define
> -DBOOST_SP_DISABLE_THREADS on the platforms for which it works? I'll
> consider this last option if it means a performance improvement of at
> least, say arbitrarily, a factor of two or so.
> 
> Debian's freeze and release of Etch is imminent, and I'd like to nail
> this bug before then. Otherwise, Etch will ship with the last bug-free
> version of monotone, which was 0.28.

I have not had a chance to run any benchmarks.  It's certainly less
than a factor of 2.  Shipping with 0.28 would not be the end of the
world (at least it's post-0.26, unlike IIRC latest ubuntu!), but I
would say go ahead and do it.

(If anyone wants to run some benchmarks of how monotone's speed
changes on some interesting operations with and without
-DBOOST_SP_DISABLE_THREADS, that would be cool; we added it as
something that would give _some_ win with no downside, so we've never
actually bothered to check whether the win is even measurable.)

-- Nathaniel

-- 
So let us espouse a less contested notion of truth and falsehood, even
if it is philosophically debatable (if we listen to philosophers, we
must debate everything, and there would be no end to the discussion).
  -- Serendipities, Umberto Eco



Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to Roman Zippel <zippel@linux-m68k.org>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #74 received at 384565@bugs.debian.org (full text, mbox):

From: Roman Zippel <zippel@linux-m68k.org>
To: Shaun Jackman <sjackman@gmail.com>
Cc: monotone-devel@nongnu.org, 384565@bugs.debian.org
Subject: Re: Bug#384565: [Monotone-devel] Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Wed, 22 Nov 2006 14:48:04 +0100 (CET)
Hi,

On Tue, 21 Nov 2006, Shaun Jackman wrote:

> It appears the BOOST_SP_DISABLE_THREADS is the source of monotone's
> cross-platform issues on Debian. Namely, that monotone fails to run
> (deadlock) on s390, hppa, sparc, mips, and mipsel, but runs fine on
> i386, amd64, ia64, alpha and powerpc [1].
> 
> [1] http://buildd.debian.org/build.php?pkg=monotone
> 
> One suggested workaround (by Roman Zippel above) is to remove
> -DBOOST_SP_DISABLE_THREADS. The ChangeLog indicates that Nathaniel
> added this feature on 2005-09-30.
> 
> So, my questions for the monotone mailing list are...
> 
> 1. Is this more likely a bug in Boost or a bug in monotone?
> 2. Is it reasonable to workaround this bug by removing
> -DBOOST_SP_DISABLE_THREADS?
> 3. Is it worth going to the extra effort to only define
> -DBOOST_SP_DISABLE_THREADS on the platforms for which it works? I'll
> consider this last option if it means a performance improvement of at
> least, say arbitrarily, a factor of two or so.

I think this should include the boost maintainer, there has to be some way 
to safely select the proper compile flags. At least the Debian packages 
provide a threaded and non-threaded version, but the .so link points to 
the threaded version by default.
If both versions are supposed to be usable equally for non-threaded 
application it suggest a bug in boost...
Anyway, until there is some mechanism to select this safely, it's probably 
better to compile the application with the same flags as the library was.

bye, Roman



Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to "Shaun Jackman" <sjackman@gmail.com>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #79 received at 384565@bugs.debian.org (full text, mbox):

From: "Shaun Jackman" <sjackman@gmail.com>
To: "Roman Zippel" <zippel@linux-m68k.org>
Cc: monotone-devel@nongnu.org, 384565@bugs.debian.org, boost-maintainer@debian.org
Subject: Re: Bug#384565: [Monotone-devel] Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Wed, 22 Nov 2006 09:54:42 -0700
On 11/22/06, Roman Zippel <zippel@linux-m68k.org> wrote:
...
> > 1. Is this more likely a bug in Boost or a bug in monotone?
> > 2. Is it reasonable to workaround this bug by removing
> > -DBOOST_SP_DISABLE_THREADS?
> > 3. Is it worth going to the extra effort to only define
> > -DBOOST_SP_DISABLE_THREADS on the platforms for which it works? I'll
> > consider this last option if it means a performance improvement of at
> > least, say arbitrarily, a factor of two or so.
>
> I think this should include the boost maintainer, there has to be some way
> to safely select the proper compile flags. At least the Debian packages
> provide a threaded and non-threaded version, but the .so link points to
> the threaded version by default.
> If both versions are supposed to be usable equally for non-threaded
> application it suggest a bug in boost...
> Anyway, until there is some mechanism to select this safely, it's probably
> better to compile the application with the same flags as the library was.

I'll probably make an upload today. So, to be sure, I'm going to
remove -DBOOST_SP_DISABLE_THREADS, but leave -DBOOST_DISABLE_THREADS?
Is that correct, or are both defines to be removed?

Thanks,
Shaun



Information forwarded to debian-bugs-dist@lists.debian.org, Shaun Jackman <sjackman@debian.org>:
Bug#384565; Package monotone. Full text and rfc822 format available.

Acknowledgement sent to Nathaniel Smith <njs@pobox.com>:
Extra info received and forwarded to list. Copy sent to Shaun Jackman <sjackman@debian.org>. Full text and rfc822 format available.

Message #84 received at 384565@bugs.debian.org (full text, mbox):

From: Nathaniel Smith <njs@pobox.com>
To: Shaun Jackman <sjackman@gmail.com>
Cc: Roman Zippel <zippel@linux-m68k.org>, boost-maintainer@debian.org, monotone-devel@nongnu.org, 384565@bugs.debian.org
Subject: Re: Bug#384565: [Monotone-devel] Re: Bug#384565: monotone - FTBFS: Build killed with signal 15
Date: Wed, 22 Nov 2006 10:26:17 -0800
On Wed, Nov 22, 2006 at 09:54:42AM -0700, Shaun Jackman wrote:
> On 11/22/06, Roman Zippel <zippel@linux-m68k.org> wrote:
> ...
> >> 1. Is this more likely a bug in Boost or a bug in monotone?
> >> 2. Is it reasonable to workaround this bug by removing
> >> -DBOOST_SP_DISABLE_THREADS?
> >> 3. Is it worth going to the extra effort to only define
> >> -DBOOST_SP_DISABLE_THREADS on the platforms for which it works? I'll
> >> consider this last option if it means a performance improvement of at
> >> least, say arbitrarily, a factor of two or so.
> >
> >I think this should include the boost maintainer, there has to be some way
> >to safely select the proper compile flags. At least the Debian packages
> >provide a threaded and non-threaded version, but the .so link points to
> >the threaded version by default.
> >If both versions are supposed to be usable equally for non-threaded
> >application it suggest a bug in boost...
> >Anyway, until there is some mechanism to select this safely, it's probably
> >better to compile the application with the same flags as the library was.

Right -- I tracked down the official word on this, which says:

"If your program is single-threaded and does not link to any
libraries that might have used shared_ptr in its default
configuration, you can #define the macro BOOST_SP_DISABLE_THREADS on a
project-wide basis to switch to ordinary non-atomic reference count
updates.

"(Defining BOOST_SP_DISABLE_THREADS in some, but not all, translation
units is technically a violation of the One Definition Rule and
undefined behavior. Nevertheless, the implementation attempts to do
its best to accommodate the request to use non-atomic updates in those
translation units. No guarantees, though.)"
  ( http://www.boost.org/libs/smart_ptr/shared_ptr.htm )

So basically, if a program uses boost::shared_ptr, and also uses
libraries that use boost::shared_ptr (including other boost
libraries), then your program and those libraries must be compiled
with the same BOOST_SP_DISABLE_THREADS setting.  Unless you get lucky.
(I guess it failing on less popular platforms in particular has
something to do with the workarounds they mention in the second
paragraph?)

> I'll probably make an upload today. So, to be sure, I'm going to
> remove -DBOOST_SP_DISABLE_THREADS, but leave -DBOOST_DISABLE_THREADS?
> Is that correct, or are both defines to be removed?

That sounds correct.  I suspect the reason _SP_ is split off as its
own thing is exactly this...

-- Nathaniel

-- 
"The problem...is that sets have a very limited range of
activities -- they can't carry pianos, for example, nor drink
beer."



Changed Bug title. Request was from "Shaun Jackman" <sjackman@gmail.com> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Shaun Jackman <sjackman@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Bastian Blank <waldi@debian.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #91 received at 384565-close@bugs.debian.org (full text, mbox):

From: Shaun Jackman <sjackman@debian.org>
To: 384565-close@bugs.debian.org
Subject: Bug#384565: fixed in monotone 0.31-2
Date: Wed, 22 Nov 2006 20:32:08 +0000
Source: monotone
Source-Version: 0.31-2

We believe that the bug you reported is fixed in the latest version of
monotone, which is due to be installed in the Debian FTP archive:

monotone-doc_0.31-2_all.deb
  to pool/main/m/monotone/monotone-doc_0.31-2_all.deb
monotone-server_0.31-2_all.deb
  to pool/main/m/monotone/monotone-server_0.31-2_all.deb
monotone_0.31-2.diff.gz
  to pool/main/m/monotone/monotone_0.31-2.diff.gz
monotone_0.31-2.dsc
  to pool/main/m/monotone/monotone_0.31-2.dsc
monotone_0.31-2_i386.deb
  to pool/main/m/monotone/monotone_0.31-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 384565@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Shaun Jackman <sjackman@debian.org> (supplier of updated monotone package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 22 Nov 2006 09:53:37 -0700
Source: monotone
Binary: monotone monotone-doc monotone-server
Architecture: source i386 all
Version: 0.31-2
Distribution: unstable
Urgency: medium
Maintainer: Shaun Jackman <sjackman@debian.org>
Changed-By: Shaun Jackman <sjackman@debian.org>
Description: 
 monotone   - A distributed version (revision) control system
 monotone-doc - A distributed version (revision) control system
 monotone-server - A distributed version (revision) control system
Closes: 384565
Changes: 
 monotone (0.31-2) unstable; urgency=medium
 .
   *  Remove -DBOOST_SP_DISABLE_THREADS. Closes: #384565.
Files: 
 cdde86fac7d196ff8e755c808d00f939 803 devel optional monotone_0.31-2.dsc
 c4faecfcdd46dbea2427ab2a89e81dc2 2321 devel optional monotone_0.31-2.diff.gz
 6e22f355a28e3d966839358c59e2822c 230672 devel optional monotone-server_0.31-2_all.deb
 22b7253cbbab7871df64da383f8799f5 3200758 doc optional monotone-doc_0.31-2_all.deb
 27c082c1b268dd1257c8a1b5add94701 2854824 devel optional monotone_0.31-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFZI79vFdYF1IwUUoRAuLOAKDGHA2W9JKsm2bkr8y1UOWDLh4fVACg7RLZ
4mQugdBqfSb7M+avmzCgsr4=
=uC3f
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 26 Jun 2007 06:34:29 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 02:16:10 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.