Re: GIO will link with -pthread soon

Hi there,

On Thu, 2009-11-12 at 16:45 +0100, Stanislav Brabec wrote:
> > On Thu, 2009-11-12 at 14:04 +0100, Stanislav Brabec wrote:
> > > Other possibilities:
> > > - Cleanly say, that dynamic loading of modules linked with libpthread is
> > > not recommended.
> > This would definitely be the nicest solution, but I doubt that it is
> > possible.

	So - this whole issue is just horrific.

> Michael Meeks could know more about the interposing and maybe propose
> better fix for gmodule, gtk or gio.

	There is basically no good fix - well, I lie - there is a sensible
two-fold fix, but it is beyond our control: we would need the glibc
maintainers to become persuadable.

	The 'real' fix, is to recognise that:

	a) interposing (excluding LD_PRELOAD) is a horrible expensive
	   feature, that more often than not causes problems (since 
	   people don't understand it), and also causes horrible 
	   performance problems: *except* in the only case where it is
	   really deliberately used [ modulo vague linkage]: glibc - for

	b) there are simple, more robust ways to indirect the 250 or so
	   method calls that are thread sensitive via a single vtable
	   pointer under the control of glibc - rather than scattering
	   a mix of lazily resolved function pointers to different
	   pre-thread, and pthread methods across umpteen plt sections.

	Of course, the tragedy that a PLT call is, in any case a vtable like
indirection currently is prolly lost in the noise here. Anyhow - end of

> I think that gmodule-2.0.pc is the best place to add needed fix, as
> loading of threaded modules is the main originator of all these
> problems.

	That's a great suggestion actually; the only problem is that basically
the entire gtk+ world needs to load modules gtk+, pango, etc. and thus -
we -all- have to link with -lpthread, and take whatever (probably
trivial) performance hit that imposes on us these days everywhere.



 michael meeks novell com  <><, Pseudo Engineer, itinerant idiot

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