incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryce Curtis <br...@curtiscountry.com>
Subject Re: [jira] [Updated] (CB-107) Possible socket leaking in CallbackServer
Date Thu, 08 Dec 2011 15:30:28 GMT
I tried testing the callback server side - It still works after 131,000
calls into a test plugin.

On Thu, Dec 8, 2011 at 1:55 AM, Brian LeRoux (Updated) (JIRA) <
jira@apache.org> wrote:

>
>     [
> https://issues.apache.org/jira/browse/CB-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Brian LeRoux updated CB-107:
> ----------------------------
>
>    Comment: was deleted
>
> (was: Appears error thrown on 2787 is valid, file still open for writing.
> [1] For fun, I cranked it up to try writing every millisecond. Still works.
>
> [1]
> https://github.com/callback/callback-android/blob/master/framework/assets/js/file.js#L480-482
> )
>
> > Possible socket leaking in CallbackServer
> > -----------------------------------------
> >
> >                 Key: CB-107
> >                 URL: https://issues.apache.org/jira/browse/CB-107
> >             Project: Apache Callback
> >          Issue Type: Bug
> >          Components: Android
> >    Affects Versions: 1.2.0
> >            Reporter: Simon MacDonald
> >            Priority: Critical
> >
> > I think we may be leaking a socket in CallbackServer. On line 216 of the
> CallbackServer we create a new Socket but I can't see anywhere in
> CallbackServer where the Socket is closed. Over time this could cause the
> problem described below. The user is probably running into it much sooner
> than usual as he's making a file write every second.
> > Here is the original bug report from the Google Groups:
> > I'm trying to write approx every second to a file. This for writing a
> > geolocation to this file.
> > So I make a filewriter when I start tracking, then start a
> > watchposition en in the successfunction I write to this file.
> > In my first tests everything went well, but with some more intensive
> > testing we found out that after more than 900 points (or
> > filewritervar.write() callings) the app fails. In the logcat the next
> > error is vissible:
> > [code]
> > W/System.err(27919): java.net.SocketException: Too many open files
> > W/System.err(27919):    at
> > org.apache.harmony.luni.platform.OSNetworkSystem.acceptSocketImpl(Native
> > Method)
> > W/System.err(27919):    at
> >
> org.apache.harmony.luni.platform.OSNetworkSystem.accept(OSNetworkSystem.java:
> > 69)
> > W/System.err(27919):    at
> > org.apache.harmony.luni.net.PlainSocketImpl.accept(PlainSocketImpl.java:
> > 126)
> > W/System.err(27919):    at
> > java.net.ServerSocket.implAccept(ServerSocket.java:281)
> > W/System.err(27919):    at
> > java.net.ServerSocket.accept(ServerSocket.java:165)
> > W/System.err(27919):    at
> > com.phonegap.CallbackServer.run(CallbackServer.java:216)
> > W/System.err(27919):    at java.lang.Thread.run(Thread.java:1102)
> > [/code]
> > I looked in the FileUtils.java file and the filestream is everytime
> > correctly closed, so I dont see the problem.
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message