@ligi Thanks for the report, this is definitely a problem we’d like to fix. Before I can file an issue for it though, I need more information about the specific cause of the hang you are experiencing.
The only problem is that the profile directory which triggers the problem (i.e. the ~/snap/brave/current/.config/BraveSoftware/Brave-Browser
directory) is not something you can send to us for further debugging because it includes all kinds of personal data (the websites you visited, the passwords you saved in the browser, the active sessions you have with websites, etc.). What you could do however is to use a technique called bisecting or binary search to narrow it down to a specific file or directory within your profile.
Bisecting the problem
It’s a little tedious to go through, but here are the steps:
- Copy your
~/snap/brave/current/.config/BraveSoftware/Brave-Browser
into a new brave-testing
directory.
- Delete half of the files from
brave-testing/Default
.
- Start brave with
--user-data-dir=brave-testing
to see if it works or not.
If it works, it means that the problematic file was in the half that got deleted in step 2. If it still hangs, then the problematic file is in the half that was preserved after step 2.
The next step is to take the half that contains the problematic file and then repeat steps 1-3, deleting half of the files in the half that was identified as problematic (i.e. we’re now deleting only a quarter of the total files). Again, that will tell you which of these two “quarters” contain the problematic file. You can then continue the process until you’re down to just 1 file to delete. The answer to that step will tell you which exact file is a problem.
Example
For example, if I look in my profile (~/.config/BraveSoftware/Brave-Browser-Nightly/Default/
), I see the following files and directories:
000003.log
AutofillStrikeDatabase
blob_storage
BudgetDatabase
Cookies
Cookies-journal
CURRENT
databases
data_reduction_proxy_leveldb
Extensions
Extension State
Favicons
Favicons-journal
Feature Engagement Tracker
GCM Store
GPUCache
heavy_ad_intervention_opt_out.db
heavy_ad_intervention_opt_out.db-journal
History
History-journal
History Provider Cache
Local Extension Settings
Local Storage
LOCK
LOG
Login Data
Login Data-journal
MANIFEST-000002
Media History
Media History-journal
Network Action Predictor
Network Action Predictor-journal
Network Persistent State
Platform Notifications
Preferences
previews_opt_out.db
previews_opt_out.db-journal
QuotaManager
QuotaManager-journal
README
Reporting and NEL
Reporting and NEL-journal
Secure Preferences
Sessions
Session Storage
shared_proto_db
Shortcuts
Shortcuts-journal
Site Characteristics Database
Sync Data
Top Sites
Top Sites-journal
TransportSecurity
VideoDecodeStats
Visited Links
Web Data
Web Data-journal
and so my first attempt would be to delete these files/directories:
000003.log
AutofillStrikeDatabase
blob_storage
BudgetDatabase
Cookies
Cookies-journal
CURRENT
databases
data_reduction_proxy_leveldb
Extensions
Extension State
Favicons
Favicons-journal
Feature Engagement Tracker
GCM Store
GPUCache
heavy_ad_intervention_opt_out.db
heavy_ad_intervention_opt_out.db-journal
History
History-journal
History Provider Cache
Local Extension Settings
Local Storage
LOCK
LOG
Login Data
Login Data-journal
MANIFEST-000002
If that fixes the problem, then I know that the problematic file is one of the above. If it doesn’t, then it’s one of the files in the half I didn’t delete:
Media History
Media History-journal
Network Action Predictor
Network Action Predictor-journal
Network Persistent State
Platform Notifications
Preferences
previews_opt_out.db
previews_opt_out.db-journal
QuotaManager
QuotaManager-journal
README
Reporting and NEL
Reporting and NEL-journal
Secure Preferences
Sessions
Session Storage
shared_proto_db
Shortcuts
Shortcuts-journal
Site Characteristics Database
Sync Data
Top Sites
Top Sites-journal
TransportSecurity
VideoDecodeStats
Visited Links
Web Data
Web Data-journal
So assuming the bad file was in the second half, then my next step would be to delete brave-testing
and copy my original profile again. Then I would delete the following files/directories:
Secure Preferences
Sessions
Session Storage
shared_proto_db
Shortcuts
Shortcuts-journal
Site Characteristics Database
Sync Data
Top Sites
Top Sites-journal
TransportSecurity
VideoDecodeStats
Visited Links
Web Data
Web Data-journal
If that doesn’t solve the hang, then I know that the problematic file is one of:
Media History
Media History-journal
Network Action Predictor
Network Action Predictor-journal
Network Persistent State
Platform Notifications
Preferences
previews_opt_out.db
previews_opt_out.db-journal
QuotaManager
QuotaManager-journal
README
Reporting and NEL
Reporting and NEL-journal
and so I’m going to keep narrowing it down deleting half of the remaining files each time until I’m just deleting a single file.
The end result of this process is that I would know which single file/directory is the source of the problem. Once we have that, we’ll have something that can be shared with Brave to reproduce this hang and fix it.