Mailing List archive

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

[vdr] Re: solved: segment faults from osdtelext plugin



Luca Olivetti wrote:
Rainer Zocholl wrote:


After replacing all obviously/known not thread save clib calls
with their thread save counterparts osdteletext now runs!

I would not waste any time to investigate which of those
calls are the minimum or why the seg faults are caused in detail. There is no adavantage using non-thread save functions in a multithreaded environment. The overhead is neglectable.

Interesting. I've asked google and it told me that the tls ("thread local storage") version of the library doesn't need the _r version of the functions, and that could explain why not everybody is seeing the problem.
However, that doesn't explain why *I* was not seeing it, since I'm running vdr with LD_ASSUME_KERNEL=2.4.1:

[vdr@vdr vdr]$ ldd vdr
linux-gate.so.1 => (0xffffe000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x4002c000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x4004b000)
libdl.so.2 => /lib/libdl.so.2 (0x4005c000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4005f000)
libm.so.6 => /lib/tls/libm.so.6 (0x4011f000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40142000)
libc.so.6 => /lib/tls/libc.so.6 (0x4014b000)
^^^ thread local storage version
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[vdr@vdr vdr]$ LD_ASSUME_KERNEL=2.4.1 ldd vdr
linux-gate.so.1 => (0xffffe000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x4002c000)
libpthread.so.0 => /lib/i686/libpthread.so.0 (0x4004b000)
libdl.so.2 => /lib/libdl.so.2 (0x4009d000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x400a0000)
libm.so.6 => /lib/i686/libm.so.6 (0x40160000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40183000)
libc.so.6 => /lib/i686/libc.so.6 (0x4018c000)
^^^^ normal, non thread safe, version
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Well, I checked the mandrake spec file for the glibc rpm I'm using (2.2.3-10mdk, http://tinyurl.com/5pcjh) and both versions are compiled "--with-tls", so they both are thread safe. The difference between the versions is that the one under tls is compiled for nptl.
I suppose all modern distributions supply thread safe libraries, so the _r version should not actually be needed.
BEWARE I'm not a glibc expert, so I may well be wrong.

Bye
--
- Yo también quiero una Europa libre de Patentes de Software -
- I want a Software Patents Free Europe too! And you? -
---------------------------------------------------------------
EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es

Attachment: signature.asc
Description: OpenPGP digital signature


Home | Main Index | Thread Index