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 -> Re: Oracle pipe not closing

Re: Oracle pipe not closing

From: Greg G <ggershSNACK_at_CAKEctc.net>
Date: Mon, 03 Nov 2003 09:48:41 -0500
Message-ID: <HOadnXn3aKVy9zuiRVn-ug@ctc.net>

Anurag Varma wrote:

> "Greg G" <ggershSNACK_at_CAKEctc.net> wrote in message news:tM2dndP4VtNIGDyiRVn-sA_at_ctc.net...
> 

>>I've got a perl program which is opening a pipe (well, it's really just
>>doing a get_message('pipename')), but if it dies unexpectedly, the pipe
>>isn't closed. I can still see the session in session list. The really
>>fun part is that if I run this program several times, it will open
>>several sessions, even though the pipe has the same name!
>>
>>Is there any way to have oracle clean up these sessions? They don't die
>>on their own.
>>
>>Thanks.
>>
>>-Greg G
>>

> kill -9, or alter system kill session .... to clean up.

    Kill -9? You're kidding. Will these things not clean up on a SIGTERM?

> I don't understand why you are amazed that the program will open
> several sessions, even though the pipe has the same name? You don't state what
> exactly you are doing .. i.e. are you creating a public or a private pipe
> and what calls you are making to create pipe and get messages.

    I'm amazed because I don't expect to have sessions listening on a pipe with the same name, especially after the other end of the pipe has gone away. I expect that if and end of a pipe dies, that the other end will be smart enough to shut itself down.

    I'm not doing anything complicated to create the pipe from the perl code. Here's the line:

     my @msgs = get_message($dbh,'mypipename') or die (scalar localtime(), " I lost the pipe!\n");

    That's it, nothing fancy.

> If you try creating the same named pipe in another session (and logged in as
> the same user account), then Oracle will return a success result. So in case
> you are expecting the create_pipe call to fail in another session just
> because that pipename already exists, .... it doesn't.

    Well, I rather was. Actually, I don't mind it so much if it doesn't, but I'm surprised at the lack of cleanup when a pipe goes away.

-Greg G Received on Mon Nov 03 2003 - 08:48:41 CST

Original text of this message

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