* fPIC + pthreads + NB connect => trouble?
@ 2003-01-22 9:38 Florin Malita
0 siblings, 0 replies; only message in thread
From: Florin Malita @ 2003-01-22 9:38 UTC (permalink / raw)
To: gcc-help; +Cc: mali
[-- Attachment #1: Type: text/plain, Size: 1256 bytes --]
Hope this is the right place to spill this, it gave me headaches for 2
days now :(
I'm writing a library which creates a working thread doing non-blocking
I/O. Everything looks & works OK till I try to compile the crap with
-fPIC (it will eventually end up being a shared lib). Then, the
previously nice working non-blocking connect calls start getting
blocking :( No longer do I get the EINPROGRESS errno with immediate
return. Gdb shows the thread blocking on libc's connect, even though the
socket is verified to have O_NONBLOCK set.
I've been trying all kinds of tricks to circumvent this issues but to no
success. I've even isolated the problem to a 3 functions source file: if
I compile it without -fPIC everything works fine, if I use -fPIC it just
chokes.
One interesting issue: it looks like the connects don't get blocking
right from the start but after a number of calls (the thread initiates
quite a few connections).
Has anyone ever seen this kind of weird behavior? What could I be doing
that would cause it? Could it be a compiler/glibc bug?
Any ideas/help will be appreciated.
--
Florin Malita web: http://www.malinux.net
public key: http://www.malinux.net/data/fmalita.gpg
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-01-22 9:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-22 9:38 fPIC + pthreads + NB connect => trouble? Florin Malita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).