Closed Bug 1731669 Opened 3 years ago Closed 2 years ago

Wifi scans every several seconds on Mac

Categories

(Core :: DOM: Geolocation, defect)

Firefox 92
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: rich, Unassigned)

Details

Attachments

(2 files)

Attached file firefox-wifi.log

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:92.0) Gecko/20100101 Firefox/92.0

Steps to reproduce:

  1. Observed regular network latency increases on wifi on MacOS Catalina.
  2. After a bunch of false starts, enabled wifi logging.
  3. Observed that Firefox is requesting a network scan every several seconds (say, 6-30):
Mon Sep 20 16:55:07.621 Info: <airportd[320]> SCAN request received from pid 75722 (firefox) with priority 0
Mon Sep 20 16:55:13.760 Info: <airportd[320]> SCAN request received from pid 75722 (firefox) with priority 0
Mon Sep 20 16:55:21.276 Info: <airportd[320]> SCAN request received from pid 75722 (firefox) with priority 0
Mon Sep 20 16:55:27.452 Info: <airportd[320]> SCAN request received from pid 75722 (firefox) with priority 0

Things I tried to get it to stop, unsuccessfully:

  1. Closed all tabs and disabled all extensions
  2. Turned off Firefox's Location Services permissions in MacOS
  3. Turned off Location Services systemwide in MacOS
  4. Disabled telemetry in Firefox preferences

It doesn't happen immediately upon restarting Firefox, so I wasn't able to easily test in Safe Mode.

And it's not consistent, though -- earlier while troubleshooting I thought disabling location services systemwide had stopped it, but subsequently that wasn't sufficient.

Actual results:

Firefox requests a wifi scan from airportd every several seconds, which produces network latency.

Expected results:

Firefox should not request a wifi scan from airportd every several seconds.

(Really it's that I'm at the end of my ability to figure out what's going on here, and I could use help in understanding why Firefox would be doing this in the first place. I've run out of things to try. I've attached the verbose wifi.log from one scan from my Mac in case it's useful.)

Attached image mtr.png

Possibly not helpful for diagnosis, but maybe helpful for empathy, here's the net effect of the wifi scans as demonstrated by mtr -- you can see the bands of increased latency at every wifi scan. (The latency is a normal product of wifi scans, though, the problem here is that Firefox is asking for them so often.)

The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Networking
Product: Firefox → Core

One more detail: Restarting Firefox appears to stop the repeated scans... until they start up again.

Component: Networking → DOM: Geolocation

mccr8, can you check if your wi-fi experience is this bug?

Flags: needinfo?(continuation)

A little more anecdata in case it's helpful:

I didn't have this come up all day today, including going to Google Maps and hitting the "focus on me" button (which triggered a wifi scan from locationd, not from firefox). But then I went to https://www.openstreetmap.org/ and hit the "focus on me" button there, and that did trigger a wifi scan directly from firefox, and now it's repeating it every few seconds.

I subsequently restarted firefox, tried to reproduce it on OpenStreetMap, and the "focus on me" button there is now triggering scans from locationd, so I can't reliably reproduce it.

I have a feeling that the difference here is that sometimes it's hitting the CoreLocation API, and other times it's doing the Google geo lookup, and the latter is the thing that's causing the repeated scans. Happy to mess with geo prefs to enable and disable scans if it would be helpful.

Attachment #9242138 - Attachment mime type: text/x-log → text/plain

I've also started noticing some wifi issues in the last few weeks. I assumed it was my router dying, but I guess it could be the same thing. Did you only recently start to experience this issue? I wonder if there was some change in OSX itself.

I don't have a good sense for whether it started recently or not, because I just moved house, and in the previous house my work laptop was on a wired connection. (It was only because of the move that I was paying close attention to wifi health, which made me notice the latency!)

Since MacOS wifi logging needs to be explicitly enabled, I don't have a way to look back in logs to see if this has always happened, but I don't recall making any significant MacOS changes recently outside of security updates.

(If you or another observer wants to enable wifi logging, though: option-click the wifi icon in the menubar and select "Enable wifi logging", then the logs are in /var/log/wifi.log.)

Unfortunately (for the purposes of this bug) I have stopped seeing the WiFi issues, so it might not be related. I'm not sure what the next steps are here. Are you continuing to experience this issue?

Flags: needinfo?(continuation)
Flags: needinfo?(rich)

It's happened only one time in the 15 days since I opened the bug. I'll keep a log open to see if I can correlate what I'm doing in Firefox with it happening.

Per comment 10 and also we haven't heard back from several months, I'm closing this as INCOMPLETE.
Dear reporter, please feel free to reopen this when you've got a chance to get back here. Thanks.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
Flags: needinfo?(rich)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: