[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Bayonne-devel] Problems with URLAudio and leaking filedescriptors o
From: |
stephen |
Subject: |
RE: [Bayonne-devel] Problems with URLAudio and leaking filedescriptors on record |
Date: |
Wed, 31 May 2006 17:08:59 -0500 |
Anthony,
After over 3,500 messages recorded and over 50K
playbacks today(people record then broadcast to lists)
I have Zero (0) open file descriptors hung on my
Bayonne instance.. Applying patch to all my production
systems.
Thanks for the Patch.
Stephen Barclay
Sr Engineer / Applications Developer
Stephen Barclay
Sr Engineer / Applications Developer
------------------------------------
ph: 972-841-1313
MSN: address@hidden
AIM: sbarclay8308
Yahoo: sbarclay8308
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Anthony DeRobertis
Sent: Friday, May 26, 2006 11:09 AM
Cc: address@hidden
Subject: Re: [Bayonne-devel] Problems with URLAudio and leaking
filedescriptors on record
Did anyone take a look at this patch? Here, at least, it seems to have
been running in production for over a week...
_______________________________________________
Bayonne-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bayonne-devel
Every time we record an audio file with 1.2.14pl2, Bayonne is leaking
the file descriptor (=leaving the file open). This appears to be because
afSeek is failing, because URLAudio is not seeing the recorded files as
Socket::STREAM.
I think this is because they are being opened by afCreate in ccAudio ---
which of course has no knowledge of URLAudio.
The following patch adds in a URLAudio::afCreate which seems to fix the
problem. Is there a better approach?
diff -rdbU3 bayonne-1.2.14pl2/server/audio.cpp
bayonne-1.2.14pl2.new/server/audio.cpp
--- bayonne-1.2.14pl2/server/audio.cpp 2006-05-16 14:21:37.000000000 -0400
+++ bayonne-1.2.14pl2.new/server/audio.cpp 2006-05-16
16:53:30.000000000 -0400
@@ -53,6 +53,26 @@
return false;
}
+
+bool URLAudio::afCreate(const char *path)
+{
+ offset = 0;
+
+ setProxy(NULL, 0);
+
+ /* this is an evil hack */
+ ::close(::open(path, O_CREAT | O_TRUNC | O_RDWR, 0660));
+
+ if(URLStream::errSuccess == get(path, 0))
+ {
+ file.fd = so;
+ return true;
+ }
+ file.fd = -1;
+ return false;
+}
+
+
bool URLAudio::isOpen(void)
{
if(so > -1)
diff -rdbU3 bayonne-1.2.14pl2/server/server.h
bayonne-1.2.14pl2.new/server/server.h
--- bayonne-1.2.14pl2/server/server.h 2003-04-23 11:42:00.000000000 -0400
+++ bayonne-1.2.14pl2.new/server/server.h 2006-05-16
16:21:41.000000000 -0400
@@ -120,6 +120,7 @@
private:
unsigned long offset;
bool afOpen(const char *path);
+ bool afCreate(const char *path);
bool afPeek(unsigned char *data, unsigned size);
bool afSeek(unsigned long pos);
void afClose(void);
_______________________________________________
Bayonne-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bayonne-devel