-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Periodic wireless network scanning is ruining network performance #306
Comments
I'm not quite sure what's happening there. Do you have KeePassHTTP enabled? |
No, I don't have it enabled. |
So I assume
does not yield any output? Then there is really no reason why KeePassXC should do anything with the network. Now I need some MacBook with a wireless card to reproduce. 😖 |
This doesn't even make sense to me anymore... |
I found something: https://muut.com/i/odrive/general:wifi-scan-requests-by-odriv Quote:
That is about what I was expecting too. Apple seems to like these kind of quirks in their broken SDKs. Or maybe this is a Qt bug on OS X? |
@phoerious lsof gives nothing @TheZ3ro I installed keepassxc via brew cask: https://github.com/caskroom/homebrew-cask/blob/master/Casks/keepassxc.rb |
@Coornail ok the cask is fine @phoerious they are talking about "port initialization routine". It can't be libmicrohttpd ? He is using Sierra so the HTTP plugin should be enabled. Can you check in the about dialog?? @Coornail But they also say that is "some generic net code in a lower-level UI framework library" |
@Coornail The Homebrew cask contains libmicrohttpd. Could you please download the DMG without KeePassHTTP support from our website and check if the issue persists? |
@TheZ3ro Yes, libmicrohttpd is what I suspect. |
@phoerious I downloaded the non-libmicrohttpd build from the website (https://github.com/keepassxreboot/keepassxc/releases/download/2.1.1/KeePassXC-2.1.1.dmg). I could reproduce the periodic package-loss with this one as well. |
This is getting very mysterious and I have no way of reproducing it. Tricky situation. Any other Mac users here who experience the same problem? |
One thing that might help: this issue doesn't happen with the original KeepassX program. |
That doesn't really help. Too much has changed and I can't bisect the full history and compile you a hundred DMGs to test. https://github.com/keepassxreboot/keepassxc/wiki/Building-KeePassXC#os-x |
I took a sample of calls: https://gist.github.com/Coornail/4ca7a753463e9ff6c945498d245b4322 If you look for |
That, on the other hand, is indeed interesting.
with
and recompile? Don't try to download a favicon after this, it will crash the application. But I'd be interested in whether you are still experiencing those problems. |
Great find! The call trace really helped. Apparently, this is a Qt bug which has only been fixed on Windows, if at all. If you could now confirm that not instantiating QNetworkAccessManager gets rid of the problem, we found the root cause. |
…olves #306 Also replace some value calls with const reference calls to prevent unnecessary copying of QObjects
Assuming QNetworkAccessManager is indeed the issue, I prepared a patch: 2ccf33d |
I was also facing this issue (macOS Sierra 10.12.3 with Qt 5.8.0.1) but the patch fixed it. Thanks! |
I built 2ccf33d and it indeed fixes the network problem! Thanks for the fast reply, great job! |
That's great to hear. Can you please test if it's still fixed after downloading a favicon? Just edit an entry with a URL, go to "Icon", click "Download favicon" and then check if the fix sill works.
|
Downloading a favicon breaks it again. |
Permanently? Oh jeez. Now it's getting complicated. |
Yes. But before the patch the scans happened every 3 seconds (sometimes even 10). After downloading the favicon the scans are between 10 seconds. Sometimes even 20. So they are not so frequent. |
That's not good enough. I suppose there is some background logic going on that isn't properly stopped when the QNetworkAccessManager ist deleted. Give me some time to prepare a new fix. |
This is the patch they have done for WindowsXP https://codereview.qt-project.org/#/c/114816/ |
Since we can't change the Qt source code, we need to find a higher-level solution for this. I'll experiment with a little more after lunch. |
Wow this is terrible on Qt's part. They need to groom their netowrk code badly. |
I completely re-implemented everything with a small third-party network library. Please test the |
After the hotfix I have not seen a single airportd query in the Console. Seems to work. Can anyone else confirm this? |
Also after downloading favicons? |
Yes :) |
That's great to hear. I'll make the patch ready for review. |
Tested the Looks great! |
Tl;dr
Context
I noticed that my wireless performance is not as it should be, started investigating. Jumped through several hoops and I noticed that there is a periodic packet drop in about every second.
Looked through the wireless logs, and found several entries like:
I quit KeepassXC, and bam, my network performance is back to normal.
Here are some graphs, I used iperf on my router, first without running KeepassXC, later with KeepassXC:
Expected Behavior
KeepassXC should not look for location information at all.
Current Behavior
KeepassXC ruins other programs network performance without even opening a network socket.
Your Environment
The text was updated successfully, but these errors were encountered: