Closed Bug 1749497 Opened 3 years ago Closed 3 years ago

Perma Late Beta Assertion failure: mSource == source (String was replaced!), at /builds/worker/checkouts/gecko/xpcom/io/nsStringStream.cpp when Gecko 97 switches to Late Beta on 2022-01-21

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

VERIFIED FIXED
98 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox96 --- unaffected
firefox97 + fixed
firefox98 + verified

People

(Reporter: ctuns, Assigned: nika)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

[Tracking Requested - why for this release]:

[Tracking Requested - why for this release]:

Central-as-beta simulation:
How to run these simulations:

[task 2022-01-11T12:23:22.423Z] 12:23:22     INFO -  TEST-START | StringStream.ReplacedInReadSegments
[task 2022-01-11T12:23:22.423Z] 12:23:22     INFO -  Assertion failure: mSource == source (String was replaced!), at /builds/worker/checkouts/gecko/xpcom/io/nsStringStream.cpp:365
[task 2022-01-11T12:23:22.423Z] 12:23:22     INFO -  #01: ???[/builds/worker/workspace/build/application/firefox/gtest/libxul.so +0x692438c]
[task 2022-01-11T12:23:22.423Z] 12:23:22     INFO -  #02: ???[/builds/worker/workspace/build/application/firefox/gtest/libxul.so +0x45b5b4b]
[task 2022-01-11T12:23:22.424Z] 12:23:22     INFO -  #03: ???[/builds/worker/workspace/build/application/firefox/gtest/libxul.so +0x4f0cbed]
[task 2022-01-11T12:23:22.424Z] 12:23:22     INFO -  #04: ???[/builds/worker/workspace/build/application/firefox/gtest/libxul.so +0x4f0ed9e]
[task 2022-01-11T12:23:22.424Z] 12:23:22     INFO -  #05: ???[/builds/worker/workspace/build/application/firefox/gtest/libxul.so +0x4f10114]
[task 2022-01-11T12:23:22.424Z] 12:23:22     INFO -  #06: ???[/builds/worker/workspace/build/application/firefox/gtest/libxul.so +0x4f27f24]
[task 2022-01-11T12:23:22.424Z] 12:23:22     INFO -  #07: ???[/builds/worker/workspace/build/application/firefox/gtest/libxul.so +0x4f2741a]
[task 2022-01-11T12:23:22.425Z] 12:23:22     INFO -  #08: ???[/builds/worker/workspace/build/application/firefox/gtest/libxul.so +0x4f4fe8f]
[task 2022-01-11T12:23:22.425Z] 12:23:22     INFO -  #09: ???[/builds/worker/workspace/build/application/firefox/gtest/libxul.so +0x110ef206]
[task 2022-01-11T12:23:22.425Z] 12:23:22     INFO -  #10: ???[/builds/worker/workspace/build/application/firefox/gtest/libxul.so +0x110ffe4d]
[task 2022-01-11T12:23:22.425Z] 12:23:22     INFO -  #11: ???[/builds/worker/workspace/build/application/firefox/gtest/libxul.so +0x11100cc4]
[task 2022-01-11T12:23:22.425Z] 12:23:22     INFO -  #12: ???[/builds/worker/workspace/build/application/firefox/firefox +0x107f5d]
[task 2022-01-11T12:23:22.426Z] 12:23:22     INFO -  #13: __libc_start_main[/lib/x86_64-linux-gnu/libc.so.6 +0x21b97]
[task 2022-01-11T12:23:22.426Z] 12:23:22     INFO -  #14: ???[/builds/worker/workspace/build/application/firefox/firefox +0x566dd]
[task 2022-01-11T12:23:22.427Z] 12:23:22     INFO -  #15: ??? (???:???)
[task 2022-01-11T12:23:22.427Z] 12:23:22     INFO -  AddressSanitizer:DEADLYSIGNAL
[task 2022-01-11T12:23:22.427Z] 12:23:22     INFO -  =================================================================
[task 2022-01-11T12:23:22.427Z] 12:23:22    ERROR -  ==1506==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000001 (pc 0x7f04da2563c0 bp 0x7ffccb3caa30 sp 0x7ffccb3ca9b0 T0)
[task 2022-01-11T12:23:22.427Z] 12:23:22     INFO -  ==1506==The signal is caused by a WRITE memory access.
[task 2022-01-11T12:23:22.427Z] 12:23:22     INFO -  ==1506==Hint: address points to the zero page.
[task 2022-01-11T12:23:23.208Z] 12:23:23     INFO -      #0 0x7f04da2563c0 in nsStringInputStream::ReadSegments(nsresult (*)(nsIInputStream*, void*, char const*, unsigned int, unsigned int, unsigned int*), void*, unsigned int, unsigned int*) /builds/worker/checkouts/gecko/xpcom/io/nsStringStream.cpp:365:3
[task 2022-01-11T12:23:23.209Z] 12:23:23     INFO -      #1 0x7f04d7ee7b4a in StringStream_ReplacedInReadSegments_Test::TestBody() /builds/worker/checkouts/gecko/xpcom/tests/gtest/TestStringStream.cpp:143:16
[task 2022-01-11T12:23:23.209Z] 12:23:23     INFO -      #2 0x7f04d883ebec in testing::Test::Run() /builds/worker/checkouts/gecko/testing/gtest/gtest/src/gtest.cc:2519:5
[task 2022-01-11T12:23:23.209Z] 12:23:23     INFO -      #3 0x7f04d8840d9d in testing::TestInfo::Run() /builds/worker/checkouts/gecko/testing/gtest/gtest/src/gtest.cc:2695:11
[task 2022-01-11T12:23:23.210Z] 12:23:23     INFO -      #4 0x7f04d8842113 in testing::TestCase::Run() /builds/worker/checkouts/gecko/testing/gtest/gtest/src/gtest.cc:2813:28
[task 2022-01-11T12:23:23.211Z] 12:23:23     INFO -      #5 0x7f04d8859f23 in testing::internal::UnitTestImpl::RunAllTests() /builds/worker/checkouts/gecko/testing/gtest/gtest/src/gtest.cc:5179:43
[task 2022-01-11T12:23:23.211Z] 12:23:23     INFO -      #6 0x7f04d8859419 in testing::UnitTest::Run() /builds/worker/checkouts/gecko/testing/gtest/gtest/src/gtest.cc:4788:10
[task 2022-01-11T12:23:23.211Z] 12:23:23     INFO -      #7 0x7f04d8881e8e in RUN_ALL_TESTS /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h:2342:46
[task 2022-01-11T12:23:23.211Z] 12:23:23     INFO -      #8 0x7f04d8881e8e in mozilla::RunGTestFunc(int*, char**) /builds/worker/checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:156:10
[task 2022-01-11T12:23:23.211Z] 12:23:23     INFO -      #9 0x7f04e4a21205 in XREMain::XRE_mainStartup(bool*) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4389:16
[task 2022-01-11T12:23:23.211Z] 12:23:23     INFO -      #10 0x7f04e4a31e4c in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5522:12
[task 2022-01-11T12:23:23.212Z] 12:23:23     INFO -      #11 0x7f04e4a32cc3 in XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5593:21
[task 2022-01-11T12:23:23.212Z] 12:23:23     INFO -      #12 0x558db3ceaf5c in do_main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:225:22
[task 2022-01-11T12:23:23.212Z] 12:23:23     INFO -      #13 0x558db3ceaf5c in main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:395:16
[task 2022-01-11T12:23:23.213Z] 12:23:23     INFO -      #14 0x7f04fc4bdb96 in __libc_start_main /tmp/glibc/csu/../csu/libc-start.c:310
[task 2022-01-11T12:23:23.213Z] 12:23:23     INFO -      #15 0x558db3c396dc in _start (/builds/worker/workspace/build/application/firefox/firefox+0x566dc)
[task 2022-01-11T12:23:23.213Z] 12:23:23     INFO -  AddressSanitizer can not provide additional info.
[task 2022-01-11T12:23:23.216Z] 12:23:23     INFO -  SUMMARY: AddressSanitizer: SEGV /builds/worker/checkouts/gecko/xpcom/io/nsStringStream.cpp:365:3 in nsStringInputStream::ReadSegments(nsresult (*)(nsIInputStream*, void*, char const*, unsigned int, unsigned int, unsigned int*), void*, unsigned int, unsigned int*)
[task 2022-01-11T12:23:23.216Z] 12:23:23     INFO -  ==1506==ABORTING
[task 2022-01-11T12:23:23.255Z] 12:23:23     INFO -  gtest INFO | gtest | process wait complete, returncode=1
[task 2022-01-11T12:23:23.255Z] 12:23:23     INFO -  mozcrash checking /builds/worker/workspace/build/tests/gtest for minidumps...
[task 2022-01-11T12:23:23.256Z] 12:23:23  WARNING -  gtest TEST-UNEXPECTED-FAIL | gtest | test failed with return code 1
[task 2022-01-11T12:23:23.256Z] 12:23:23     INFO -  gtest INFO | rungtests.py exits with code 1
[task 2022-01-11T12:23:23.297Z] 12:23:23    ERROR - Return code: 1
[task 2022-01-11T12:23:23.297Z] 12:23:23    ERROR - No tests run or test summary not found
[task 2022-01-11T12:23:23.297Z] 12:23:23     INFO - TinderboxPrint: gtest-gtest<br/><em class="testfail">T-FAIL</em>
[task 2022-01-11T12:23:23.297Z] 12:23:23    ERROR - # TBPL FAILURE #
[task 2022-01-11T12:23:23.297Z] 12:23:23  WARNING - setting return code to 2
[task 2022-01-11T12:23:23.297Z] 12:23:23    ERROR - The gtest suite: gtest ran with return status: FAILURE
[task 2022-01-11T12:23:23.297Z] 12:23:23     INFO - Running post-action listener: _package_coverage_data
[task 2022-01-11T12:23:23.297Z] 12:23:23     INFO - Running post-action listener: _resource_record_post_action
[task 2022-01-11T12:23:23.297Z] 12:23:23     INFO - Running post-action listener: process_java_coverage_data
[task 2022-01-11T12:23:23.298Z] 12:23:23     INFO - [mozharness: 2022-01-11 12:23:23.298001Z] Finished run-tests step (success)
[task 2022-01-11T12:23:23.298Z] 12:23:23     INFO - Running post-run listener: _resource_record_post_run
[task 2022-01-11T12:23:23.355Z] 12:23:23     INFO - Validating Perfherder data against /builds/worker/workspace/mozharness/external_tools/performance-artifact-schema.json
[task 2022-01-11T12:23:23.358Z] 12:23:23     INFO - PERFHERDER_DATA: {"framework": {"name": "job_resource_usage"}, "suites": [{"name": "gtest.gtest.overall", "extraOptions": ["taskcluster-m5.xlarge"], "subtests": [{"name": "cpu_percent", "value": 15.224213836477988}, {"name": "io_write_bytes", "value": 6634463232}, {"name": "io.read_bytes", "value": 0}, {"name": "io_write_time", "value": 845948}, {"name": "io_read_time", "value": 0}]}, {"name": "gtest.gtest.start-pulseaudio", "subtests": [{"name": "time", "value": 0.016000747680664062}]}, {"name": "gtest.gtest.install", "subtests": [{"name": "time", "value": 52.672059774398804}, {"name": "cpu_percent", "value": 25.172058823529415}]}, {"name": "gtest.gtest.stage-files", "subtests": [{"name": "time", "value": 1.2303080558776855}]}, {"name": "gtest.gtest.run-tests", "subtests": [{"name": "time", "value": 105.77533984184265}, {"name": "cpu_percent", "value": 10.092142857142857}]}]}
[task 2022-01-11T12:23:23.358Z] 12:23:23     INFO - Total resource usage - Wall time: 159s; CPU: 10%; Read bytes: 0; Write bytes: 6634463232; Read time: 0; Write time: 845948
[task 2022-01-11T12:23:23.358Z] 12:23:23     INFO - TinderboxPrint: CPU usage<br/>10.1%
[task 2022-01-11T12:23:23.358Z] 12:23:23     INFO - TinderboxPrint: I/O read bytes / time<br/>0 / 0
[task 2022-01-11T12:23:23.358Z] 12:23:23     INFO - TinderboxPrint: I/O write bytes / time<br/>6,634,463,232 / 845,948
[task 2022-01-11T12:23:23.358Z] 12:23:23     INFO - TinderboxPrint: CPU idle<br/>514.4 (81.0%)
[task 2022-01-11T12:23:23.358Z] 12:23:23     INFO - TinderboxPrint: CPU iowait<br/>24.0 (3.8%)
[task 2022-01-11T12:23:23.358Z] 12:23:23     INFO - TinderboxPrint: CPU system<br/>8.0 (1.3%)
[task 2022-01-11T12:23:23.358Z] 12:23:23     INFO - TinderboxPrint: CPU user<br/>88.6 (14.0%)
[task 2022-01-11T12:23:23.358Z] 12:23:23     INFO - TinderboxPrint: Swap in / out<br/>0 / 0
[task 2022-01-11T12:23:23.359Z] 12:23:23     INFO - start-pulseaudio - Wall time: 0s; CPU: Can't collect data; Read bytes: 0; Write bytes: 0; Read time: 0; Write time: 0
[task 2022-01-11T12:23:23.359Z] 12:23:23     INFO - install - Wall time: 53s; CPU: 25%; Read bytes: 0; Write bytes: 1327063040; Read time: 0; Write time: 137144
[task 2022-01-11T12:23:23.359Z] 12:23:23     INFO - stage-files - Wall time: 1s; CPU: Can't collect data; Read bytes: 0; Write bytes: 0; Read time: 0; Write time: 0
[task 2022-01-11T12:23:23.360Z] 12:23:23     INFO - run-tests - Wall time: 106s; CPU: 10%; Read bytes: 0; Write bytes: 4798545920; Read time: 0; Write time: 674700
[task 2022-01-11T12:23:23.385Z] 12:23:23  WARNING - returning nonzero exit status 2

Hello Nika, can you please take a look at this? I think this is caused by Bug 1748719.

Flags: needinfo?(nika)
Summary: Perma Assertion failure: mSource == source (String was replaced!), at /builds/worker/checkouts/gecko/xpcom/io/nsStringStream.cpp when Gecko 98 merges to Beta on 2022-02-07 → Perma Late Beta Assertion failure: mSource == source (String was replaced!), at /builds/worker/checkouts/gecko/xpcom/io/nsStringStream.cpp when Gecko 98 merges to Beta on 2022-02-07

So, in bug 1748719 I upgraded an assertion from a MOZ_DIAGNOSTIC_ASSERT to a MOZ_RELEASE_ASSERT (https://searchfox.org/mozilla-central/rev/7271a078fa0c1b858a52614ea60ac82fdd8b3d23/xpcom/io/nsStringStream.cpp#365), which should normally be fine, but it appears that we have a test (the test which is failing here) which we have disabled when MOZ_DIAGNOSTIC_ASSERT is enabled as it would normally hit this assertion (https://searchfox.org/mozilla-central/rev/7271a078fa0c1b858a52614ea60ac82fdd8b3d23/xpcom/tests/gtest/TestStringStream.cpp#101-105).

In the patch I wrote the behaviour which could be expected if that assertion was to be ignored has changed somewhat and it wouldn't make much sense for us to ignore the assertion completely anymore. We could possibly drop the test given that it's intentionally hitting this error case, and it's probably not worth the effort to try to make nsStringInputStream gracefully handle API misuse so it's easier to test.

Flags: needinfo?(nika)

Hello,

We got a new fail (beata as realease simulation) which might be related to Bug 1748719, can you please take a look?
Failure log : https://treeherder.mozilla.org/logviewer?job_id=363993040&repo=try&lineNumber=4312

Nika, could you fix this issue this week?

Flags: needinfo?(nika)
Summary: Perma Late Beta Assertion failure: mSource == source (String was replaced!), at /builds/worker/checkouts/gecko/xpcom/io/nsStringStream.cpp when Gecko 98 merges to Beta on 2022-02-07 → Perma Late Beta Assertion failure: mSource == source (String was replaced!), at /builds/worker/checkouts/gecko/xpcom/io/nsStringStream.cpp when Gecko 97 switches to Late Beta on 2022-01-21

The behaviour which this test was intended to test was only used in
release builds, due to the diagnostic assertion in other builds. The new
equivalent of this assertion has been upgraded to a release assertion,
so the test should no longer be required.

Assignee: nobody → nika
Status: NEW → ASSIGNED

Oops, I thought I had already submitted my patch for this bug :-S

Flags: needinfo?(nika)
Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3fa2317dc1ca Remove failing beta-only StringStream test, r=xpcom-reviewers,mccr8
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch

(This change is test-only so it should be upliftable to beta without a beta approval request.)

Fix verified in today's central as late beta simulation

Status: RESOLVED → VERIFIED
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: