Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Multi-thread Oracle 8.0.5, pthreads, file descriptor problems

Multi-thread Oracle 8.0.5, pthreads, file descriptor problems

From: James Ferguson <james.ferguson_at_watchmark.com>
Date: 20 Dec 1999 13:46:56 -0800
Message-ID: <ttln6pgu9b.fsf@watchmark.com>

I'm following up on my own comp.unix.solaris post (original post at the bottom), and hoping that people can add useful input (thanks in advance).

I'm seeing selects on sockets seemingly spontaneously return EBADF (in code that used to work). I was assuming that something in my code was closing or otherwise messing up the file descriptors, though I can't work out what, until I found the following post (reduced):

> Subject: Oracle 8.0.5 on Linux ( The nightmare )
> From: AnandVadul <anandvadul_at_my-deja.com>
> Date: 1999/11/11
> Newsgroups: comp.databases.oracle.misc
>
> <snip>
> I just got out of a huge nightmare (Oracle 8.0.5 on Linux !)
> Want to share a couple of insights I got from the exercise.
> <snip>
> 1. Oracle 8.0.5 does not support pthread applications . So had to
> put a mutex lock so that only one thread at a time can access the db.
> <snip>
> 4. File Descriptor leaks :
> If the process is threaded, we get file descriptor leaks. A small prog
> two threads, one opening and closing a cursor, the other trying to get a
> file handle. Give it 10 minutes, the second thread cant get file handles
> at all !

My code is multi-threaded, using pthreads, and is compiled with Oracle 8.0.5 - on Solaris 2.6. I have multiple threads, some of which will connect to Oracle and others that create and use their own sockets and pipes.

Can anyone add insight into this problem with Oracle 8.0.5? Does it exist!? Is it just when making connections?

Does anyone think I may be barking up the wrong tree?

Thanks,

James.



My original post, for what it's worth:

James Ferguson <james.ferguson_at_watchmark.com> writes:
> I have an application that binds to a socket to offer a service, and
> other instances of the same app connect to it. Everything has been
> working well in previous releases, but now something is going badly
> wrong and communication is failing. Sporadically, I'm getting EBADF
> on calls to select and/or accept at either end of the socket.
>
> Sometimes, the server app will start up, happily bind the service, but
> the first call to select will return -1 with errno EBADF.
>
> Other times, the server will appear happy, but once connected, select
> on the client socket fd will return EBADF.
>
> I'm currently only running one server and a maximum of one client
> instance.
>
> Does anyone know of scenarios where socket(), bind(), listen() appear
> to work fine, but select will fail with EBADF? It appears to me that
> the problems are worst if I repeatedly execute and terminate the apps.
>
> Sorry if this is all too vague - I'm still not sure exactly what
> information is pertinent. Hope someone can help...
>
> Thanks in advance,
>
> James.
Received on Mon Dec 20 1999 - 15:46:56 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US