Skip to content
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

Extension causes Chrome to crash. #116

Closed
maximtop opened this issue Aug 2, 2023 · 22 comments
Closed

Extension causes Chrome to crash. #116

maximtop opened this issue Aug 2, 2023 · 22 comments

Comments

@maximtop
Copy link
Contributor

maximtop commented Aug 2, 2023

AdGuard VPN Browser Extension version

v2.0.16

Issue Details

Many users have told us that after updating to v2.0.16, Chrome sometimes crashes and uses a lot of memory. This issue has been created to collect these cases in one place. Please add as many details as possible, like os, chrome version, settings, and steps to reproduce.

@maximtop maximtop added the bug Something isn't working label Aug 2, 2023
@maximtop maximtop self-assigned this Aug 2, 2023
@Birbber
Copy link
Contributor

Birbber commented Aug 4, 2023

In order to reproduce you might try disabling the extension for a long time (almost a day and more) and then enabling it.
The browser will freeze trying to load the extension, then it will crush.

@maximtop
Copy link
Contributor Author

maximtop commented Aug 4, 2023

We think that it happens due to a big storage size, which will be fixed in this issue #117

@adguard-bot adguard-bot changed the title Extension crashes chrome Extension causes Chrome to crash. Aug 4, 2023
@lica98
Copy link

lica98 commented Aug 6, 2023

good thing it's not just me, I've had this issue for several weeks already

I use 4 browsers in total (Chrome, Brave, Edge & Vivaldi), at first I had Brave crash every morning and couldn't figure out what it was, then eventually Chrome and Edge started crashing as well so it had to be something to do with the VPN as in Vivaldi I don't use it and it's worked normal all this time

the worst part is that it doesn't just crash once but after you reopen the browser it does it again and again, like the browser becomes completely unusable
once you manage to load it (after like 10 crashes) and disable the VPN the browser starts working again (but once you enable the VPN again the browser crashes immediately)

I'm on Win 10 and VPN version 2.0.16

@ameshkov
Copy link
Member

ameshkov commented Aug 6, 2023

The issue has been resolved in the beta version, will be pushed to the release stage on monday.

Meanwhile, reinstalling the extension will fix it as well.

@lica98
Copy link

lica98 commented Aug 11, 2023

back to crashing for me again 😕

@maximtop
Copy link
Contributor Author

@lica98 in Chrome?
Does this happen when you start the browser after the PC wakes up from sleep?

@lica98
Copy link

lica98 commented Aug 11, 2023

@maximtop in all browsers (Chrome, Edge, Brave)

Does this happen when you start the browser after the PC wakes up from sleep?

yes, you turn on the PC and browser is "not responding"

tho this time at least it only crashes once and once you restart it it works normally

@maximtop
Copy link
Contributor Author

maximtop commented Aug 11, 2023

@lica98
We had the opportunity to study the same case and found that the issue isn't related to the extension, as the browser can't automatically start the extension after the PC wakes from sleep.
If you can provide a crash report, we can report the issue on the Chrome bug tracker. Here are the instructions on how to do that: https://www.chromium.org/for-testers/bug-reporting-guidelines/reporting-crash-bug/

@lica98
Copy link

lica98 commented Aug 13, 2023

so I turned off all the VPN extensions last night before putting the PC to sleep and today when I turned it on:

Edge is "not responding" first then crashed
Chrome seemed to be ok at first but then crashed
Brave is the only one to work, didn't even crash when I turned back the extension

btw I just tried turning the extension on in Edge and it went "not respondning" immediately... other browsers seem to be ok

@LlamaUnicorn
Copy link

I can confirm that I'm experiencing this issue on Ubuntu while using the Chrome browser. When the extension is enabled, after rebooting my PC, Chrome crashes multiple times before it eventually starts running. However, when I disable the extension, Chrome starts without any issues. Then, if I re-enable the extension, Chrome crashes once again.

@ameshkov
Copy link
Member

After a more deep research of the issue it seems that we found the root cause of the issue and it is a bug in Chrome's chrome.alarms API. This is a relatively new API that's supposed to replace setTimeout for MV3 extensions. It somehow randomly messes up the extension startup. We'll see if we can avoid using alarms API as a temporary solution until it gets fixed.

:__Cr::char_traits<char>,std::__Cr::allocator<char> >,base::internal::GetFirst,std::__Cr::less<void>,std::__Cr::vector<std::__Cr::pair<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> >,std::__Cr::unique_ptr<base::Value,std::__Cr::default_delete<base::Value> > >,std::__Cr::allocator<std::__Cr::pair<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> >,std::__Cr::unique_ptr<base::Value,std::__Cr::default_delete<base::Value> > > > > >::unsafe_emplace
0x00007ff88a0ad178(chrome.dll -flat_tree.h:1152)base::internal::flat_tree<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> >,base::internal::GetFirst,std::__Cr::less<void>,std::__Cr::vector<std::__Cr::pair<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> >,std::__Cr::unique_ptr<base::Value,std::__Cr::default_delete<base::Value> > >,std::__Cr::allocator<std::__Cr::pair<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> >,std::__Cr::unique_ptr<base::Value,std::__Cr::default_delete<base::Value> > > > > >::emplace_key_args
0x00007ff88a0ad178(chrome.dll -flat_map.h:302)base::flat_map<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> >,std::__Cr::unique_ptr<base::Value,std::__Cr::default_delete<base::Value> >,std::__Cr::less<void>,std::__Cr::vector<std::__Cr::pair<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> >,std::__Cr::unique_ptr<base::Value,std::__Cr::default_delete<base::Value> > >,std::__Cr::allocator<std::__Cr::pair<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> >,std::__Cr::unique_ptr<base::Value,std::__Cr::default_delete<base::Value> > > > > >::insert_or_assign
0x00007ff88a0ad178(chrome.dll -values.cc:504)base::Value::Dict::Set(base::BasicStringPiece<char,std::__Cr::char_traits<char> >,base::Value &&)
0x00007ff887220d39(chrome.dll -values.cc:521)base::Value::Dict::Set(base::BasicStringPiece<char,std::__Cr::char_traits<char> >,base::BasicStringPiece<char,std::__Cr::char_traits<char> >)
0x00007ff88d8ef4d2(chrome.dll -alarms.cc:136)extensions::api::alarms::Alarm::ToValue()
0x00007ff88ca8865d(chrome.dll -alarm_manager.cc:104)static class base::Value::List extensions::`anonymous namespace'::AlarmsToValue(const class std::__Cr::vector<extensions::Alarm,std::__Cr::allocator<extensions::Alarm> > & const)
0x00007ff88ca8829b(chrome.dll -alarm_manager.cc:325)static void extensions::AlarmManager::WriteToStorage(const class std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> > & const)
0x00007ff88ca884d8(chrome.dll -alarm_manager.cc:300)static void extensions::AlarmManager::OnAlarm(struct std::__Cr::pair<std::__Cr::__map_iterator<std::__Cr::__tree_iterator<std::__Cr::__value_type<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> >,std::__Cr::vector<extensions::Alarm,std::__Cr::allocator<extensions::Alarm> > >,std::__Cr::__tree_node<std::__Cr::__value_type<std::__Cr::basic_string<char,std::__Cr::char_traits<char>,std::__Cr::allocator<char> >,std::__Cr::vector<extensions::Alarm,std::__Cr::allocator<extensions::Alarm> > >,void *> *,long long> >,std::__Cr::__wrap_iter<extensions::Alarm *> >)
0x00007ff88ca88838(chrome.dll -alarm_manager.cc:420)static void extensions::AlarmManager::PollAlarms()
0x00007ff886321722(chrome.dll -callback.h:152)??base::OnceCallback<void ()>::Run
0x00007ff886321722(chrome.dll -timer.cc:178)??base::OneShotTimer::RunUserTask
0x00007ff886321722(chrome.dll -timer.cc:163)??base::OneShotTimer::FireNow()
0x00007ff88a01020d(chrome.dll -callback.h:152)base::OnceCallback<void ()>::Run
0x00007ff88a01020d(chrome.dll -task_annotator.cc:186)base::TaskAnnotator::RunTaskImpl
0x00007ff88a01020d(chrome.dll -task_annotator.h:88)base::TaskAnnotator::RunTask
0x00007ff88a01020d(chrome.dll -thread_controller_with_message_pump_impl.cc:486)base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl
0x00007ff88a01020d(chrome.dll -thread_controller_with_message_pump_impl.cc:351)base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
0x00007ff889ba1efc(chrome.dll -message_pump_win.cc:211)base::MessagePumpForUI::DoRunLoop()
0x00007ff885be10f8(chrome.dll -message_pump_win.cc:77)base::MessagePumpWin::Run(base::MessagePump::Delegate *)
0x00007ff88641818e(chrome.dll -thread_controller_with_message_pump_impl.cc:651)base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool,base::TimeDelta)
0x00007ff88648453a(chrome.dll -run_loop.cc:134)base::RunLoop::Run(base::Location const &)
0x00007ff8870448a9(chrome.dll -browser_main_loop.cc:1067)content::BrowserMainLoop::RunMainMessageLoop()
0x00007ff88704448f(chrome.dll -browser_main_runner_impl.cc:158)content::BrowserMainRunnerImpl::Run
0x00007ff88704448f(chrome.dll -browser_main.cc:34)content::BrowserMain(content::MainFunctionParams)
0x00007ff88704286f(chrome.dll -content_main_runner_impl.cc:707)content::RunBrowserProcessMain
0x00007ff88704286f(chrome.dll -content_main_runner_impl.cc:1284)content::ContentMainRunnerImpl::RunBrowser(content::MainFunctionParams,bool)
0x00007ff88642e1f3(chrome.dll -content_main_runner_impl.cc:1138)content::ContentMainRunnerImpl::Run()
0x00007ff88642d0dd(chrome.dll -content_main.cc:326)content::RunContentProcess
0x00007ff88642d0dd(chrome.dll -content_main.cc:343)content::ContentMain(content::ContentMainParams)
0x00007ff88642a99c(chrome.dll -chrome_main.cc:187)ChromeMain
0x00007ff722c113e9(chrome.exe -main_dll_loader_win.cc:166)MainDllLoader::Launch(HINSTANCE *,base::TimeTicks)
0x00007ff722c10617(chrome.exe -chrome_exe_main_win.cc:390)wWinMain
0x00007ff722ce3ea1(chrome.exe -exe_common.inl:118)invoke_main
0x00007ff722ce3ea1(chrome.exe -exe_common.inl:288)static int __scrt_common_main_seh()
0x00007ff8f4497613(KERNEL32.DLL + 0x00017613)BaseThreadInitThunk
0x00007ff8f4d826b0(ntdll.dll + 0x000526b0)RtlUserThreadStart
...

@maximtop
Copy link
Contributor Author

maximtop commented Aug 14, 2023

Chrome bug issue is here:
https://bugs.chromium.org/p/chromium/issues/detail?id=1472759

@ameshkov
Copy link
Member

Quick update: we'll remove chrome.alarms in a hotfix update and continue discussing it with Chrome team, I hope they'll fix it and we can get back to using alarms API again.

@LlamaUnicorn
Copy link

Would you kindly post an update here when the alarms are removed?

@maximtop
Copy link
Contributor Author

Would you kindly post an update here when the alarms are removed?

Beta is already published

@Dan-Master
Copy link

Dan-Master commented Aug 18, 2023

Beta is already published
2.0.31 is already good, chromium launches without problems and doesn't crash when the extension is enabled!

@lica98
Copy link

lica98 commented Aug 18, 2023

this morning Brave crashed again

Chrome is working but I went to the extensions and it says this
image

@maximtop
Copy link
Contributor Author

this morning Brave crashed again

Chrome is working but I went to the extensions and it says this image

Try the new beta, the release will be the next week.

@lica98
Copy link

lica98 commented Aug 18, 2023

this morning Brave crashed again
Chrome is working but I went to the extensions and it says this image

Try the new beta, the release will be the next week.

how do I do that?

@maximtop
Copy link
Contributor Author

@lica98
Copy link

lica98 commented Aug 19, 2023

Brave still crashes even with beta 😕

@maximtop
Copy link
Contributor Author

Brave still crashes, even with the beta version. 😕

@lica98, we've received reports from other users saying they aren't experiencing this issue in Chrome anymore. Could it be a Brave-specific issue that might be resolved when they update to Chromium 115?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants