incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian LeRoux (Commented) (JIRA)" <>
Subject [jira] [Commented] (CB-107) Possible socket leaking in CallbackServer
Date Thu, 08 Dec 2011 07:31:40 GMT


Brian LeRoux commented on CB-107:

I created a test app to see if I could reproduce the issue here:

No luck reproducing it, the test app in its current form works, is there anything I'm missing
in assumptions about how this should fail?  

In the meantime, logcat did uncover this occasional exception from phonegapjs:

D/PhoneGapLog(14838): file:///android_asset/www/phonegap-1.3.0rc1.js: Line 2787 : Uncaught
E/Web Console(14838): Uncaught 7 at file:///android_asset/www/phonegap-1.3.0rc1.js:2787

which I will investigate separately 
> Possible socket leaking in CallbackServer
> -----------------------------------------
>                 Key: CB-107
>                 URL:
>             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): 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(
> 69)
> W/System.err(27919):    at
> 126)
> W/System.err(27919):    at
> W/System.err(27919):    at
> W/System.err(27919):    at
> W/System.err(27919):    at
> [/code]
> I looked in the 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:!default.jspa
For more information on JIRA, see:


View raw message