Re: [xml] libxml2 and pthreads



On Fri, Aug 20, 2004 at 10:13:54AM -0700, Ben Greear wrote:
Daniel Veillard wrote:
 No way, this won't work, this will deactivate thread support completely
and break their ABI. Don't even hope for it Red Hat won't do this and
other won't either I'm pretty sure.
 If this is the intent of the patch, it won't work. We will not break 
 ABIs,

You broke the interface going from RH9 to FC2 by forcing linking with
pthreads.

 Okay, now you're getting me really annoyed and I will have to reply :-(

 No. The dependancy is embedded in the shared library. The applications
don't need to be recompiled to go from RH9 to FC2, so the ABI *was*
preserved. The API was preserved too because no application needed to
change their code either assuming they do what they are supposed to do 
which is to call xmlInitParser() after checking the version (c.f. the
examples)
 Your application crashes because you're calling fork() in a signal
handler. The fact that it broke is not related to libxml2, but the 
interraction of the pthread memory allocator (my guess) and doing that
very silly thing.

If I can make the callbacks work with only a few extra lines
of initialization code then it will not be hard for other applications
to port to the new API.

  And that is an API and ABI change:
    - ABI change because applications (like a number of Apache modules)
      using libxml2 in a threaded context won't and break silently due to
      threading problems
    - API change because all applications will need to be changed to get
      back to the previous behaviour.

Or can change it to libxml3 or something like that.

  The is no time frame for libxml3, it may never happen

Either way, my intent is to offer a better solution to locking
for the xml library.

  If it involves API or ABI changes this won't be accepted, API additions
will be fine.

Whether distributions follow along, or whether you even choose to
accept such a patch, is beyond my control.

  I'm drawing the line. I'm very clear there. No API or ABI change will
make it in.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]