-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
"Bat Ledger Service" causing 100% CPU usage #8846
Comments
Issue started for me after the migration of everything into publisher_info_db file. I can tell because I open Resource monitor on windows, go in the disk activity section and see publisher_info_db is doing a lot of read/write operations causing CPU + drive activity to spike. I can reproduce this when I open several profiles at the same time that haven't been open for a few days and have ads enabled; this is when I take a noticeable hit (eg 100% usage on CPU and disk) for like 30 seconds until the r/w operations are done. Everything goes to normal though when whatever operations it needs to do finish. I don't remember this being as bad before the migration. I assume people with slower/less core CPUs or HDDs must take an even bigger hit. I have a quad core + an SSD and I still notice it. |
@MinisterFister this is not related to db migration. It's operation that process publisher list. It normally takes 30s to complete. We are working on new mechanism that will solve it |
I neither did a db migration nor do I have multiple profiles. Issues still exists. One core is 100% utilized (regardless of your CPU). |
I'm getting this issue as well. If I end the process, it just comes back. How do I turn this off? I've tried turning off brave rewards. I could really use my browser back! |
I have also this problem. I'm waiting one week and I don't see any progress. Practically the browser is not usable now(when I open it my cooling fans start working on 100%). Very soon I'll be forced to uninstall Brave. |
@aleqx @SephReed @angsto if you go to your user profile (directories listed bellow) and open MacOS:
before:
after:
|
@NejcZdovc |
@mariow could you please run brave from the terminal and add this flag at the end |
I open the file and I have ,"ballots":[], |
[24284:27484:0402/125733.531:WARNING:account_consistency_mode_manager.cc(235)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[26440:30336:0402/125733.763:INFO:uphold.cc(351)] OnTimer Uphold: 2
|
@angsto could you please have brave open for example 10min with this CPU problem? I see |
@NejcZdovc Sure - I had a few tabs open that were causing a lot of info to be dropped into the log (e.g. Google Mail with background processes), so I've closed all tabs exccept for this github issue and produced the attached log. Also, as per your other question to @angsto - despite the CPU usage I have continued using Brave as my standard browser and the issue has been around (at least) all day yesterday and today (several hours of usage) |
Brave was opened for 20 min. with no tabs opened. |
Not sure if this is related but my Brave Beta just upgraded itself to 1.9.45 and when it came back up it now says the wallet is disconnected. Is this known? If I click on it, it takes me to Uphold.com to verify my identity ... which I don't want to do, and I certainly hope that's not a new requirement. I have a feeling that Brave got more and more unreliable lately :( |
hey @aleqx if you have never connected your Uphold wallet, just ignore that button. Nothing should have changed in terms of functionality. Hope this helps. |
Of course I had it connected before, and it had worked fine, receiving rewards, sending tips, etc. As I said in my post, Brave upgraded itself to 1.9.45 and immediately afterwards said the wallet is disconnected, and now it shows a grey "disconnected" button and if I try to click it to reconnect, it sends me to Uphold to verify my id (which I don't want and which is not needed) ... so I can't reconnect it (and it shouldn't have disconnected in the first place). |
@aleqx the wallet disconnects for two reasons -- a) if your authentication token has expired -- 90 days in Brave/Uphold case (this is very common with all logins) and b) if you have contributed more than 250 BAT. In both cases, the goal to disconnect is security and to protect your account. To reconnect, you do not have to go through any KYC and ID check, etc. All you need is your login credentials (username/password) with Uphold when you are redirected to their site. Once done, the same wallet will be connected back to your browser. |
Hmm, I never had an Uphold account. That is, I never registered on Uphold. I didn't contribute more than 250 BAT but I do think it's been around 3 months since I started using Brave so that could be it. Are you saying that I need to register an account on Uphold to restore access to my wallet, which had BAT in it? I believe this sort of stuff should be in an info box to the user (I don't recall seeing it anywhere). If it's indeed one of two reasons, then why doesn't it tell the user upon disconnecting the wallet? "Your wallet was disconnected because you used for more than 90 days, as specified in the T&Cs" or "Your wallet was disconnected because you contributed more than 250 BAT as stated in the T&Cs" (is it even in the T&Cs?). At least the user would know and avoid wasting their and your time. At the same time, I don't understand this "feature". Surely it doesn't add anything to security if all that's required to reconnect is to login on Uphold with some anonymous account. Bots would still happily use it for 3 months or 250 BAT and then automate the Uphold login as well (or even do that step manually). But the bigger issue is letting the user know why and what to do when it happens rather than cutting their wallet off, wouldn't you agree? |
@aleqx Some at Brave Support or I can help do this with you over voice and/or an easier way to communication to and fro.
Now lets talk about Disconnecting; Disconnecting is like you need to re-login. Protection and Security is part of the solution. I mean this Github repo that I am responding on logs me out within 3 days so it is very common. If you have an Uphold login, it is the same process - we are just ensuring you are the owner of the account (90 days may be too much and hence the issue). Re: Botting In any case, all feedback received and understood. Really appreciate the detail and the frustration. |
Actually, that's good point about spoofing/phishing/hacking someone's legitimate wallet. I forgot that some Brave users actually receive a fair bit of income and as such limiting exposure by capping spending is a simple and usual approach. I guess I'll need to create an Uphold account, though I must admit I'm not really fond of the idea of having Uphold see/infer any of my wallet activity. A portion of privacy, even if small, is directed at/via a company whom I don't want in the loop at all. I'm sure you guys thought about this during the design process, and including Uphold in the loop made some sense somewhere, but from where I'm sitting I don't see it as a necessity: the Brave wallet could be just another ERC20 wallet, which can receive and send funds to and from any other ERC20 wallet without the need to host it or to expose it to a 3rd party exchange. I'm aware I'm not obliged to use Brave, so this isn't a complaint per-se. |
Still not fixed
|
Left it for an hour to see if maybe it was doing something. Still 100% CPU. |
@victorelec14 @SephReed this one should fix the final thing using CPU #9607 |
Not a part of the team but if you don't care about your BAT you can try this: Make sure the browser is closed. Go in Default folder and rename the publisher_info_db file to publisher_info_db_backup. Rename also the ads_service folder to ads_service_backup and rewards_service folder to rewards_service_backup. Then reopening the browser should have Brave rewards disabled (afaik). To recover your BAT, before doing whatever I wrote above, you can go to brave://rewards-internals/ , copy the info and send it to the team through PM to see if they can do anything to recover your funds to another address (not sure what they do tbh, but might be worth a try). Your issues will be fixed when this brave/brave-core#5568 is pushed to release. No ETA afaik |
Unfortunately, renaming all of those files did not make the cursed BAT Ledger Service go away. At this point, I think there's no option but to give up on Brave, and make sure to tell everyone I know to give up on it too. I don't want a 100% CPU using BAT Ledger computing program. I was a Browser. Maybe next time, let a user opt out? |
@SephReed I think your profile is corrupt unfortunately. The best step to take would be to export your bookmarks and other data, then clear your profile directory. On macOS, this will be at Re-import your bookmarks and you'll be on a fresh profile which should work great. Without having your profile, diagnosing the issue would be hard. But exporting bookmarks as HTML (and exporting passwords if needed too) and re-importing on a fresh profile should resolve the issue completely |
@SephReed before you do that, please try with version 1.10 that will be released beginning of next week. I have a feeling that 1.10 will fix it for you. If that will not work, you can migrate to new profile like @bsclifton said. Thank you for you patients |
1.10 finally fixed this for me, I can now use my laptop on my lap! |
I had to delete everything and reinstall. Lost my BAT, but that's okay I guess. |
@SephReed you can go through the KYC process and verify your wallet and then any new instances you'd just be reconnecting (logging in) Doesn't help now (unless you had your old profile directory)- but wanted to share for anyone else reading this |
Description
We've been receiving several reports from our users that
Bat Ledger Service
causes the CPU to increase to 100% in some cases in1.5.x
which causes performance issues. We've had a similar issue in1.7.x
and1.8.x
that we resolved via #8691. However, this issue has been reported on1.3.x
,1.4.x
and1.5.x
so it's a different problem.@NejcZdovc has been debugging the issue a user and mentioned that the CPU dropped from 100% once the ballets object in
ledger_state
was removed.Some links to users experiencing this issue:
There's other reports via https://community.brave.com regarding high CPU usage even after #8691 and #8779 have been fixed.
Steps to Reproduce
Actual result:
Expected result:
"Bat Ledger Service" shouldn't be using 100% of the CPU.
Reproduces how often:
Brave version (brave://version info)
1.3.x
,1.4.x
and the latest1.5.x
. Assuming it's an issue on every channel and separate from Bat Ledger Service uses 99% of CPU #8691.Version/Channel Information:
Yes, received reports from 1.5.x
Most likely also affected
Most likely also affected
Most likely also affected
Other Additional Information:
N/A
Most likely would resolve the issue
N/A
Miscellaneous Information:
CCing @NejcZdovc @mandar-brave @bsclifton @rebron @jsecretan
The text was updated successfully, but these errors were encountered: