Igalia / wolvic-chromium

The official GitHub mirror of the Chromium source
https://chromium.googlesource.com/chromium/src/
BSD 3-Clause "New" or "Revised" License
11 stars 6 forks source link

M123 update: java.lang.AssertionError: Must only be used on a single thread. #100

Open zakharvoit opened 6 months ago

zakharvoit commented 6 months ago

wolvic-chromium crashes on startup after M123 chromium update. The issue only happens in release builds and can be fixed by reverting https://chromium-review.googlesource.com/c/chromium/src/+/4361339, we need to figure out why this optimization is causing the crashes.

Java stack trace:

java.lang.AssertionError: Must only be used on a single thread.
                                                                                                        at org.chromium.base.ThreadUtils$ThreadChecker.assertOnValidThread(ThreadUtils.java:65)
                                                                                                        at org.chromium.base.ObserverList.addObserver(ObserverList.java:72)
                                                                                                        at org.chromium.base.ApplicationStatus.registerApplicationStateListener(ApplicationStatus.java:724)
                                                                                                        at org.chromium.base.ApplicationStatus$3.run(ApplicationStatus.java:796)
                                                                                                        at org.chromium.base.task.PostTask.runOrPostTask(PostTask.java:114)
                                                                                                        at org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:191)
                                                                                                        at org.chromium.base.ApplicationStatus.registerThreadSafeNativeApplicationStateListener(ApplicationStatus.java:782)
                                                                                                        at android.os.MessageQueue.nativePollOnce(Native Method)
                                                                                                        at android.os.MessageQueue.next(MessageQueue.java:335)
                                                                                                        at android.os.Looper.loopOnce(Looper.java:167)
                                                                                                        at android.os.Looper.loop(Looper.java:304)
                                                                                                        at android.app.ActivityThread.main(ActivityThread.java:7918)
                                                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                                                        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
                                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1010)

Native stack trace:

Stack Trace:
  RELADDR   FUNCTION                                                                          FILE:LINE
  v------>  base::debug::StackTrace::StackTrace(unsigned long)                                ../../base/debug/stack_trace.cc:221:12
  0000000004fbacff  base::debug::StackTrace::StackTrace()                                             ../../base/debug/stack_trace.cc:218:28
  0000000004fafccf  base::android::CheckException(_JNIEnv*)                                           ../../base/android/jni_android.cc:196:42
  00000000023a3557  jni_zero::JniJavaCallContextChecked::~JniJavaCallContextChecked()                 ../../third_party/jni_zero/jni_zero_helper.h:105:52
  v------>  base::android::Java_ApplicationStatus_registerThreadSafeNativeApplicationStateListener(_JNIEnv*)  gen/jni_headers/base/base_jni/ApplicationStatus_jni.h:122:1
  v------>  base::android::(anonymous namespace)::ApplicationStatusListenerImpl::ApplicationStatusListenerImpl(base::RepeatingCallback<void (base::android::ApplicationState)> const&)  ../../base/android/application_status_listener.cc:52:5
  v------>  std::__Cr::__unique_if<base::android::(anonymous namespace)::ApplicationStatusListenerImpl>::__unique_single std::__Cr::make_unique<base::android::(anonymous namespace)::ApplicationStatusListenerImpl, base::RepeatingCallback<void (base::android::ApplicationState)> const&>(base::RepeatingCallback<void (base::android::ApplicationState)> const&)  ../../third_party/libc++/src/include/__memory/unique_ptr.h:621:30
  0000000004f9e01b  base::android::ApplicationStatusListener::New(base::RepeatingCallback<void (base::android::ApplicationState)> const&)  ../../base/android/application_status_listener.cc:83:10
  000000000397422f  content::responsiveness::Calculator::Calculator(std::__Cr::unique_ptr<content::ResponsivenessCalculatorDelegate, std::__Cr::default_delete<content::ResponsivenessCalculatorDelegate>>)  ../../content/browser/scheduler/responsiveness/calculator.cc:84:11
  v------>  std::__Cr::__unique_if<content::responsiveness::Calculator>::__unique_single std::__Cr::make_unique<content::responsiveness::Calculator, std::__Cr::unique_ptr<content::ResponsivenessCalculatorDelegate, std::__Cr::default_delete<content::ResponsivenessCalculatorDelegate>>>(std::__Cr::unique_ptr<content::ResponsivenessCalculatorDelegate, std::__Cr::default_delete<content::ResponsivenessCalculatorDelegate>>&&)  ../../third_party/libc++/src/include/__memory/unique_ptr.h:621:30
  000000000397676f  content::responsiveness::Watcher::CreateCalculator()                              ../../content/browser/scheduler/responsiveness/watcher.cc:31:10
  0000000003977003  content::responsiveness::Watcher::SetUp()                                         ../../content/browser/scheduler/responsiveness/watcher.cc:199:17
  0000000003477ebb  content::BrowserMainLoop::PreMainMessageLoopRun()                                 ../../content/browser/browser_main_loop.cc:1055:28
  v------>  base::OnceCallback<int ()>::Run() &&                                              ../../base/functional/callback.h:156:12
  0000000003a332a3  content::StartupTaskRunner::WrappedTask()                                         ../../content/browser/startup_task_runner.cc:59:46
  v------>  base::OnceCallback<void ()>::Run() &&                                             ../../base/functional/callback.h:156:12
  0000000004f522b3  base::TaskAnnotator::RunTaskImpl(base::PendingTask&)                              ../../base/task/common/task_annotator.cc:202:34
  0000000004f692bb  void base::TaskAnnotator::RunTask<base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*)::$_3>(perfetto::StaticString, base::PendingTask&, base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*)::$_3&&)  ../../base/task/common/task_annotator.h:89:5
  v------>  base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*)  ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:473:23
  0000000004f68d77  base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()   ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:338:41
  0000000004fab057  base::MessagePumpForUI::DoNonDelayedLooperWork(bool)                              ../../base/message_loop/message_pump_android.cc:186:33
  v------>  base::MessagePumpForUI::OnNonDelayedLooperCallback()                              ../../base/message_loop/message_pump_android.cc:172:3
  0000000004faad5f  base::(anonymous namespace)::NonDelayedLooperCallback(int, int, void*)            ../../base/message_loop/message_pump_android.cc:43:9