Multi-threading is not allowed

Bug #309149 reported by Viktor Gal
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
libxml2 (Ubuntu)
Fix Released
Undecided
Unassigned
Karmic
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: libxml2

Threads are not allowed in the libxml2 package. Basically the '--with-threads' ./configure option is missing from rules file.

Is there a specific reason why it is not enabled?

See http://xmlsoft.org/threads.html for more details about safe threads with libxml2.

tags: added: karmic
Revision history for this message
Andrew W. Nosenko (andrew-w-nosenko) wrote :

Fixed upstream in libxml2-2.7.6

libxml2-2.7.4 and 2.7.5 'configure' just contain a bug in the --with-threads configure option processing

Changed in libxml2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Jos van den Oever (vandenoever) wrote :

This is a very serious bug since many apps rely on libxml2 in a threaded environment. I noticed this problem when using libstreamanalyzer on karmic. The configure option --with-threads should be added to the package to make sure this does not happen again easily.

Revision history for this message
Jonathan Riddell (jr) wrote :
Revision history for this message
Jonathan Riddell (jr) wrote :

This bug does not exist in 2.7.6 as used in Lucid, the ./configure script correctly uses threads by default.

Revision history for this message
Jonathan Riddell (jr) wrote :

This is mentioned in the upstream changelog for 2.7.6 http://people.canonical.com/~jriddell/tmp/libxml/

Revision history for this message
Jonathan Riddell (jr) wrote :

TEST CASE: with the old libxml2 run install strigi-utils

xmlindexer -j 5 /usr/include/ > /dev/null

it will crash

with the new libxml2 run it again. it won't crash

Revision history for this message
Jonathan Riddell (jr) wrote :

Uploaded to karmic-proposed, awaiting approval

Revision history for this message
Andrew W. Nosenko (andrew-w-nosenko) wrote :

Jos van den Oever wrote:
: configure option --with-threads should be added to the package to make sure this does not happen again easily

Jonathan Riddell wrote:
: libxml2_2.7.5.dfsg-1ubuntu1.1.debdiff (1.0 KiB, text/plain)

Please, don't make live harder! Explicit --with-threads won't add any value to safety against this kind of bugs. libxml2 intended to be multithreaded by default, therefore, breaking MT safety in default configuration (without any --{with,without}-threads option) noticed very fast. In contrast the bugs in explicit --with-threads handling may live unnoticed some long time.

Therefore, my proposal NOT to add --with-threads to the configure flags (which, for example, would not help you with libxml2-2.7.4), but just upgrade libxml2 package itself to 2.7.6 version.

If you anyway want to stay at libxml2-2.7.5 for any cost, then you need not to add yet another configure flag, but cherry-pick the appropriate patch from upstream:
    858084f Restore thread support in default configuration
    (http://git.gnome.org/browse/libxml2/commit/?id=858084fdec25a2617d626d0f65fac6c151136276)

Changed in libxml2 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

For an SRU, an explicit --with-threads seems acceptable. It's fixed properly in lucid.

However, this seems to have a very high regression potential, since it could change the behaviour of the library in unexpected ways. Therefore this update needs some verification feedback with a standard GNOME and KDE session, as well as a server application (like PostgreSQL).

Changed in libxml2 (Ubuntu Karmic):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted libxml2 into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Luciano Faletti (lucianobellou) wrote :

Updated and compiled successfully an application that was complaining by this issue. Keeping it installed for feedback later...

Revision history for this message
Luciano Faletti (lucianobellou) wrote :

No complaining in a week of using this version in a Desktop environment... Used GNOME, a MySQL server and virtualbox among other apps.

Revision history for this message
Christoph Korn (c-korn) wrote :

When will this be published in karmic ?

Revision history for this message
Jos van den Oever (vandenoever) wrote : Re: [Bug 309149] Re: Multi-threading is not allowed

On Sunday 24 January 2010 22:46:57 Christoph Korn wrote:
> When will this be published in karmic ?

I dont know, i'm not a kubuntu developer.

Cheers,
Jos

Revision history for this message
Martin Pitt (pitti) wrote :

Christoph Korn [2010-01-24 21:46 -0000]:
> When will this be published in karmic ?

Did you also test this update? I'd like to have more than one "works
for me" for such a central component.

Thanks,

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
yarly (ih8junkmai1) wrote :

Martin, some feedback for you.

0 a.d.
http://wildfiregames.com/0ad/

Related bug ticket
http://trac.wildfiregames.com/ticket/432

Earlier today I attempted to build an open source RTS game under development called 0 a.d.
Using libxml2 and libxml2-dev ( 2.7.5.dfsg-1ubuntu1 ) from main Karmic repository to compile source of 0 a.d. would result with following error.

../../../source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp:48:2: error: #error libxml2 must have threading support enabled
make[1]: *** [obj/AtlasUI_Debug/DLLInterface.o] Error 1
make: *** [AtlasUI] Error 2

libxml2 and libxml2-dev ( 2.7.5.dfsg-1ubuntu1.1 ) from Karmic-proposed fixed the issue.
I was able to compile 0 a.d. successfully with the updated libraries.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libxml2 - 2.7.5.dfsg-1ubuntu1.1

---------------
libxml2 (2.7.5.dfsg-1ubuntu1.1) karmic-proposed; urgency=low

  * Build using --with-threads, closes LP: #309149
 -- Jonathan Riddell <email address hidden> Mon, 28 Dec 2009 23:40:10 +0000

Changed in libxml2 (Ubuntu Karmic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.