Closed Bug 610577 Opened 15 years ago Closed 11 years ago

Fedora: firefox makes a never closed connection to gpsd for every navigation js request

Categories

(Core :: DOM: Geolocation, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: thomas, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.6.12-1.fc13 Firefox/3.6.12 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.6.12-1.fc13 Firefox/3.6.12 Each invocation of the navigation/geolocation javascript object creates a NEW connection to gpsd to grab the location information. That connection is never closed nor reused in a subsequent call. It will eventually exhaust the gpsd connections or the OS file descriptor limit or perhaps a firefox internal limit. This might cause crashes on some systems, but I haven't tried maxing out the connections. Reproducible: Always Steps to Reproduce: 1. Run a geolocation javascript that periodically a navigation function (see below) 2. Watch with "netstat -t", "lsof -i" or other utility for connections to tcp 2947 gpsd port 3. Actual Results: each invocation creates a new connection to gpsd. at 5 second update, there will be 12 sockets after a minute. Expected Results: The first one opens the socket and listens. The second navigation.* uses the first already opened socket. An error would close the socket, but it would reopen at the later call Javascript: setInterval(moveto,5000); ... function moveto() { if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(pos) { la = pos.coords.latitude lo = pos.coords.longitude cntr = new google.maps.LatLng(la,lo) map.setCenter(cntr) mrk.setPosition(cntr); }); } } socat output showing multiple accepts without a close: $ socat -d -d tcp-l:2947,fork,reuseaddr stdio 2010/11/08 22:56:44 socat[5372] N listening on AF=2 0.0.0.0:2947 2010/11/08 22:56:49 socat[5372] N accepting connection from AF=2 127.0.0.1:51528 on AF=2 127.0.0.1:2947 2010/11/08 22:56:49 socat[5372] N forked off child process 5373 2010/11/08 22:56:49 socat[5372] N listening on AF=2 0.0.0.0:2947 2010/11/08 22:56:49 socat[5373] N reading from and writing to stdio 2010/11/08 22:56:49 socat[5373] N starting data transfer loop with FDs [4,4] and [0,1] J=1 w 2010/11/08 22:56:54 socat[5372] N accepting connection from AF=2 127.0.0.1:51529 on AF=2 127.0.0.1:2947 2010/11/08 22:56:54 socat[5372] N forked off child process 5374 2010/11/08 22:56:54 socat[5372] N listening on AF=2 0.0.0.0:2947 2010/11/08 22:56:54 socat[5374] N reading from and writing to stdio 2010/11/08 22:56:54 socat[5374] N starting data transfer loop with FDs [4,4] and [0,1] J=1 w 2010/11/08 22:56:59 socat[5372] N accepting connection from AF=2 127.0.0.1:51530 on AF=2 127.0.0.1:2947 2010/11/08 22:56:59 socat[5372] N forked off child process 5375 2010/11/08 22:56:59 socat[5372] N listening on AF=2 0.0.0.0:2947 2010/11/08 22:56:59 socat[5375] N reading from and writing to stdio 2010/11/08 22:56:59 socat[5375] N starting data transfer loop with FDs [4,4] and [0,1] J=1 w
Does Fedora compile in a GPSD communication layer (such as geoclue 1 provider)?
Summary: firefox makes a never closed connection to gpsd for every navigation js request → Fedora: firefox makes a never closed connection to gpsd for every navigation js request
Pretty sure this was actually related to the gpsd location provider that once was part of Firefox itself. Mentioned for example in #524722. Since that provider is long gone, I'm closing this one.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.