Closed Bug 740304 Opened 12 years ago Closed 2 years ago

"Tell Mozilla about the crash" checkbox is unchecked by default on Linux

Categories

(Toolkit :: Crash Reporting, defect, P2)

All
Linux
defect

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox101 --- wontfix
firefox102 --- wontfix
firefox103 --- fixed

People

(Reporter: virgil.dicu, Assigned: gsvelto)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression, Whiteboard: [12b3])

Attachments

(1 file)

Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0

1. Delete your Mozilla Application folder.
2. Start Firefox 12 beta3.
3. Skip the import dialog.
4. Install crash me extension: http://ted.mielczarek.org/mozilla/crashme.html
5. Tools-Crash me-select any option.

The breakpad dialog's "Tell Mozilla about this crash so they can fix it" checkbox is unchecked.

The checkbox is checked when repeating the steps on Windows or Mac OS.

Can also reproduce on Firefox 4.0.1.
Whiteboard: [12b3]
Summary: "Tell Mozilla about the cash" checkbox is unchecked by default on Linux → "Tell Mozilla about the crash" checkbox is unchecked by default on Linux
The setting is saved in ~/".mozilla/firefox/Crash Reports/crashreporter.ini"

You're sure you deleted that file? When that file isn't present, we use the following logic:
http://mxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/client/crashreporter.cpp#383

MOZ_CRASHREPORTER_ENABLE_PERCENT defaults to 100:
http://mxr.mozilla.org/mozilla-central/source/configure.in#6093
(In reply to Ted Mielczarek [:ted] from comment #1)
> The setting is saved in ~/".mozilla/firefox/Crash Reports/crashreporter.ini"
> 
> You're sure you deleted that file? 

Yes, I've deleted the entire .mozilla directory under Ubuntu, which under Crash reports also contains the crashreporter.ini file. Tried this on a second Ubuntu 11.10 i686 machine today. The same result-the checkbox was unchecked.

I have deleted the same directory on Windows and Mac OS with the expected result-checkbox checked.
Also tried checking the box when receiving a crash and deleting the folder afterwards. The checkbox for "Tell Mozilla about the crash" was unchecked.
This is not a regression -- I've tested this all the way back to Firefox 4.0 and can reproduce this behaviour.

I stumbled upon this bug by accident and not only it's still valid but it's a regression. Specifically it seems that bug 688083 removed all accesses to nsICrashReporter.submitReports which prevents the code setting the pref to true by default from running the first time the browser is launched in a new installation.

Priority: -- → P2
Regressed by: 688083
Hardware: x86 → All

Note: we currently use browser.tabs.crashReporting.enabled to enable/disable the button in the about:tabcrashed page. We need to adjust the relevant code to reflect that change into nsICrashReporter.submitReports but we also need to ensure that when the .ini configuration file is missing then that value is true by default both in the crashed tabs and in the crash reporter client.

After further investigation I discovered that there's two separate issues at work. One is what I described in comment 5, but it's only part of the problem. That only prevents Firefox from writing a crashreporter.ini file in the first place, however while the macOS and Windows crash reporter client default to having the "submit" button clicked if no pref was found the Linux one doesn't; see the code here.

I'll fix that part here and file a separate bug to sync browser.tabs.crashReporting.enabled with nsICrashReporter.submitReports.

The crash reporter client should behave in the same way across all platforms.
Crucially the first time it's opened it needs to have the "submit this report"
and "include the URL" checkboxes checked by default. It should also preserve
the value of those checkboxes across runs. This patch does the following to
achieve this goal

  • Set the submit and include URL checkboxes by default if the crash reporter
    preferences INI file is not available or cannot be read on Linux
  • Remove the unused preference keys from the Windows implementation
  • Preserve the value of the include URL checkbox across runs on macOS

The names of the options used for both preferences are inconsistent across the
different platforms and I'll harmonize them in a follow-up.

Assignee: nobody → gsvelto
Status: NEW → ASSIGNED
Pushed by gsvelto@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/901f86bee0f7
Fix platform-dependent inconsistencies in the crash reporter client r=KrisWright

Backed out for causing build bustages

Failure line: gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:669: Unified_cpp_client0.obj] Error 1

Push with failures

Failure log

Backout link

[task 2022-06-14T13:13:25.569Z] 13:13:25     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang-cl -Xclang -std=c++17 -FoUnified_cpp_client0.obj -c  -Xclang -ftrivial-auto-var-init=pattern -guard:cf -DDEBUG=1 -DUNICODE -D_UNICODE '-DBIN_SUFFIX=".exe"' -DNO_STABS_SUPPORT -I/builds/worker/checkouts/gecko/toolkit/crashreporter/client -I/builds/worker/workspace/obj-build/toolkit/crashreporter/client -I/builds/worker/checkouts/gecko/toolkit/components/jsoncpp/include -I/builds/worker/checkouts/gecko/toolkit/crashreporter/breakpad-client -I/builds/worker/checkouts/gecko/toolkit/crashreporter/google-breakpad/src -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -MD -FI /builds/worker/workspace/obj-build/mozilla-config.h -DMOZILLA_CLIENT -Qunused-arguments -Qunused-arguments -W3 -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wcomma -Wenum-compare-conditional -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=free-nonheap-object -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-microsoft-enum-value -Wno-microsoft-include -Wno-invalid-noreturn -Wno-inconsistent-missing-override -Wno-implicit-exception-spec-mismatch -Wno-microsoft-exception-spec -Wno-unused-local-typedef -Wno-ignored-attributes -Wno-used-but-marked-unused -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wthread-safety -fcrash-diagnostics-dir=/builds/worker/artifacts -TP -Zc:sizedDealloc- -D_HAS_EXCEPTIONS=0 -Gy -Zc:inline -Gw -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING -GR- -Z7 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -Oy- -Werror -Wno-macro-redefined -Wno-c++11-narrowing -Wno-implicit-fallthrough -fno-strict-aliasing -Xclang -ffp-contract=off  -Xclang -MP -Xclang -dependency-file -Xclang .deps/Unified_cpp_client0.obj.pp -Xclang -MT -Xclang Unified_cpp_client0.obj   Unified_cpp_client0.cpp
[task 2022-06-14T13:13:25.569Z] 13:13:25     INFO -  In file included from Unified_cpp_client0.cpp:20:
[task 2022-06-14T13:13:25.569Z] 13:13:25     INFO -  /builds/worker/checkouts/gecko/toolkit/crashreporter/client/crashreporter_win.cpp(124,13): error: unused function 'RemoveUnusedValues' [-Werror,-Wunused-function]
[task 2022-06-14T13:13:25.570Z] 13:13:25     INFO -  static void RemoveUnusedValues(const wchar_t* key, LPCTSTR valueName) {
[task 2022-06-14T13:13:25.570Z] 13:13:25     INFO -              ^
[task 2022-06-14T13:13:25.570Z] 13:13:25     INFO -  1 error generated.
[task 2022-06-14T13:13:25.570Z] 13:13:25    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:667: Unified_cpp_client0.obj] Error 1
[task 2022-06-14T13:13:25.571Z] 13:13:25     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/toolkit/crashreporter/client'
[task 2022-06-14T13:13:25.571Z] 13:13:25    ERROR -  gmake[3]: *** [/builds/worker/checkouts/gecko/config/recurse.mk:72: toolkit/crashreporter/client/target-objects] Error 2
[task 2022-06-14T13:13:25.571Z] 13:13:25     INFO -  gmake[3]: *** Waiting for unfinished jobs....
[task 2022-06-14T13:13:25.571Z] 13:13:25     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/xpcom/tests'
[task 2022-06-14T13:13:25.571Z] 13:13:25     INFO -  xpcom/tests/TestBlockingProcess.obj
[task 2022-06-14T13:13:25.572Z] 13:13:25     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/xpcom/tests'
[task 2022-06-14T13:13:25.659Z] 13:13:25     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/toolkit/mozapps/update/updater/updater-xpcshell'
[task 2022-06-14T13:13:25.662Z] 13:13:25     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang-cl -Xclang -std=c++17 -Foprogressui_win.obj -c  -Xclang -ftrivial-auto-var-init=pattern -guard:cf -DDEBUG=1 -DTEST_UPDATER -DUNICODE -D_UNICODE -DSPRINTF_H_USES_VSNPRINTF -DNS_NO_XPCOM '-DMAR_CHANNEL_ID="firefox-mozilla-central"' '-DMOZ_APP_VERSION="103.0a1"' '-DMOZ_BACKGROUNDTASKS="1"' -I/builds/worker/checkouts/gecko/toolkit/mozapps/update/updater/updater-xpcshell -I/builds/worker/workspace/obj-build/toolkit/mozapps/update/updater/updater-xpcshell -I/builds/worker/checkouts/gecko/toolkit/xre -I/builds/worker/checkouts/gecko/toolkit/mozapps/update/common -I/builds/worker/checkouts/gecko/xpcom/base -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -MT -FI /builds/worker/workspace/obj-build/mozilla-config.h -DMOZILLA_CLIENT -Qunused-arguments -Qunused-arguments -W3 -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wcomma -Wenum-compare-conditional -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=free-nonheap-object -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-microsoft-enum-value -Wno-microsoft-include -Wno-invalid-noreturn -Wno-inconsistent-missing-override -Wno-implicit-exception-spec-mismatch -Wno-microsoft-exception-spec -Wno-unused-local-typedef -Wno-ignored-attributes -Wno-used-but-marked-unused -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wthread-safety -fcrash-diagnostics-dir=/builds/worker/artifacts -TP -Zc:sizedDealloc- -D_HAS_EXCEPTIONS=0 -Gy -Zc:inline -Gw -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING -GR- -Z7 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -Oy- -Werror -fno-strict-aliasing -Xclang -ffp-contract=off  -Xclang -MP -Xclang -dependency-file -Xclang .deps/progressui_win.obj.pp -Xclang -MT -Xclang progressui_win.obj   /builds/worker/checkouts/gecko/toolkit/mozapps/update/updater/progressui_win.cpp
[task 2022-06-14T13:13:25.663Z] 13:13:25     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/toolkit/mozapps/update/updater/updater-xpcshell'
[task 2022-06-14T13:13:25.663Z] 13:13:25     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/xpcom/tests'
[task 2022-06-14T13:13:25.663Z] 13:13:25     INFO -  xpcom/tests/TestPRIntN.obj
[task 2022-06-14T13:13:25.663Z] 13:13:25     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/xpcom/tests'
[task 2022-06-14T13:13:25.688Z] 13:13:25     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/xpcom/tests/gtest'
[task 2022-06-14T13:13:25.692Z] 13:13:25     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang-cl -Xclang -std=c++17 -FoUnified_cpp_xpcom_tests_gtest0.obj -c  -I/builds/worker/workspace/obj-build/dist/stl_wrappers -Xclang -ftrivial-auto-var-init=pattern -guard:cf -DDEBUG=1 -DUNICODE -D_UNICODE -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -D_SECURE_ATL -DCHROMIUM_BUILD -DU_STATIC_IMPLEMENTATION -DOS_WIN=1 -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DCOMPILER_MSVC -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/xpcom/tests/gtest -I/builds/worker/workspace/obj-build/xpcom/tests/gtest -I/builds/worker/checkouts/gecko/xpcom/base -I/builds/worker/checkouts/gecko/toolkit/components/telemetry/tests/gtest -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -MD -FI /builds/worker/workspace/obj-build/mozilla-config.h -DMOZILLA_CLIENT -Qunused-arguments -Qunused-arguments -W3 -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wcomma -Wenum-compare-conditional -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=free-nonheap-object -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-microsoft-enum-value -Wno-microsoft-include -Wno-invalid-noreturn -Wno-inconsistent-missing-override -Wno-implicit-exception-spec-mismatch -Wno-microsoft-exception-spec -Wno-unused-local-typedef -Wno-ignored-attributes -Wno-used-but-marked-unused -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wthread-safety -fcrash-diagnostics-dir=/builds/worker/artifacts -TP -Zc:sizedDealloc- -D_HAS_EXCEPTIONS=0 -Gy -Zc:inline -Gw -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING -GR- -Z7 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -Oy- -Werror -fno-strict-aliasing -Xclang -ffp-contract=off  -Xclang -MP -Xclang -dependency-file -Xclang .deps/Unified_cpp_xpcom_tests_gtest0.obj.pp -Xclang -MT -Xclang Unified_cpp_xpcom_tests_gtest0.obj   Unified_cpp_xpcom_tests_gtest0.cpp
[task 2022-06-14T13:13:25.693Z] 13:13:25     INFO -  In file included from Unified_cpp_xpcom_tests_gtest0.cpp:47:
[task 2022-06-14T13:13:25.693Z] 13:13:25     INFO -  In file included from /builds/worker/checkouts/gecko/xpcom/tests/gtest/TestAvailableMemoryWatcherWin.cpp:28:
[task 2022-06-14T13:13:25.694Z] 13:13:25     INFO -  /builds/worker/checkouts/gecko/toolkit/components/telemetry/tests/gtest/TelemetryTestHelpers.h(17,22): warning: The fully qualified types are preferred over the shorthand typedefs for JS::Handle/JS::Rooted types outside SpiderMonkey.
[task 2022-06-14T13:13:25.694Z] 13:13:25     INFO -                       JS::HandleValue aSnapshot, uint32_t expectedValue);
[task 2022-06-14T13:13:25.694Z] 13:13:25     INFO -                       ^~~~~~~~~~~~~~~
Flags: needinfo?(gsvelto)
Blocks: 1774345

I've updated the patch with a fix for the bustage, landing again.

Flags: needinfo?(gsvelto)
Pushed by gsvelto@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a9cc52f8793b
Fix platform-dependent inconsistencies in the crash reporter client r=KrisWright
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
Flags: qe-verify+

Starting from the problem raised initially - "Tell Mozilla about the crash" checkbox is unchecked on Linux, there is no longer an issue with the latest Nightly on Ubuntu 22, the checkbox is checked by default. But as far as the patch details given in comment 8 is concerned I don’t see any inconsistencies between platforms when using about:crashcontent to simulate the tab crash), but the “Include the URLs…" checkboxes are not checked by default. When simulated the browser crash (using about:crashparent) the “Include the address of the page I was on” is checked by default on Mac and Ubuntu, but not on Windows. Tested with the latest Nightly, clean profiles, on Windows 10, Ubuntu 22 and macOS 12. What am I missing here? What steps are applicable for manual testing across platforms?
Thank you!

Flags: needinfo?(gsvelto)

Thanks, it seems that there are still issues, I'm opening a follow-up bug to fix them.

Flags: needinfo?(gsvelto)
Blocks: 1781087
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: