Closed Bug 1756202 Opened 4 years ago Closed 3 years ago

Assertion failure: blockFrame (Why did we have an IB split?), at /layout/generic/nsInlineFrame.cpp:878

Categories

(Core :: Layout, defect)

x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1809764

People

(Reporter: jkratzer, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: regression, testcase, Whiteboard: [bugmon:bisected,confirmed])

Attachments

(1 file, 1 obsolete file)

Testcase found while fuzzing mozilla-central rev 6938c3b26d14 (built with: --enable-debug --enable-fuzzing).

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build 6938c3b26d14 --debug --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html
Assertion failure: blockFrame (Why did we have an IB split?), at /layout/generic/nsInlineFrame.cpp:878

    ==265465==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7efddac5ef78 bp 0x7ffe05fad580 sp 0x7ffe05fad540 T265465)
    ==265465==The signal is caused by a WRITE memory access.
    ==265465==Hint: address points to the zero page.
        #0 0x7efddac5ef78 in nsInlineFrame::UpdateStyleOfOwnedAnonBoxesForIBSplit(mozilla::ServoRestyleState&) /layout/generic/nsInlineFrame.cpp:878:3
        #1 0x7efddac5eb13 in nsIFrame::DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoRestyleState&) /layout/generic/nsIFrame.cpp:11326:42
        #2 0x7efddaaa51eb in UpdateStyleOfOwnedAnonBoxes /layout/generic/nsIFrame.h:3951:7
        #3 0x7efddaaa51eb in mozilla::RestyleManager::ProcessPostTraversal(mozilla::dom::Element*, mozilla::ServoRestyleState&, mozilla::ServoPostTraversalFlags) /layout/base/RestyleManager.cpp:2881:19
        #4 0x7efddaaa5128 in mozilla::RestyleManager::ProcessPostTraversal(mozilla::dom::Element*, mozilla::ServoRestyleState&, mozilla::ServoPostTraversalFlags) /layout/base/RestyleManager.cpp:2863:32
        #5 0x7efddaaa5128 in mozilla::RestyleManager::ProcessPostTraversal(mozilla::dom::Element*, mozilla::ServoRestyleState&, mozilla::ServoPostTraversalFlags) /layout/base/RestyleManager.cpp:2863:32
        #6 0x7efddaaa5128 in mozilla::RestyleManager::ProcessPostTraversal(mozilla::dom::Element*, mozilla::ServoRestyleState&, mozilla::ServoPostTraversalFlags) /layout/base/RestyleManager.cpp:2863:32
        #7 0x7efddaaa5128 in mozilla::RestyleManager::ProcessPostTraversal(mozilla::dom::Element*, mozilla::ServoRestyleState&, mozilla::ServoPostTraversalFlags) /layout/base/RestyleManager.cpp:2863:32
        #8 0x7efddaaa6b50 in mozilla::RestyleManager::DoProcessPendingRestyles(mozilla::ServoTraversalFlags) /layout/base/RestyleManager.cpp:3070:28
        #9 0x7efddaa7f08d in ProcessPendingRestyles /layout/base/RestyleManager.cpp:3177:3
        #10 0x7efddaa7f08d in mozilla::PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush) /layout/base/PresShell.cpp:4258:39
        #11 0x7efddaa459a0 in nsRefreshDriver::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsRefreshDriver::IsExtraTick) /layout/base/nsRefreshDriver.cpp:2393:22
        #12 0x7efddaa54a92 in operator() /layout/base/nsRefreshDriver.cpp:1614:25
        #13 0x7efddaa54a92 in mozilla::detail::RunnableFunction<nsRefreshDriver::EnsureTimerStarted(nsRefreshDriver::EnsureTimerStartedFlags)::$_1>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:531:5
        #14 0x7efdd59cf2ce in mozilla::RunnableTask::Run() /xpcom/threads/TaskController.cpp:467:16
        #15 0x7efdd59a84f6 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:770:26
        #16 0x7efdd59a71b8 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:606:15
        #17 0x7efdd59a7433 in mozilla::TaskController::ProcessPendingMTTask(bool) /xpcom/threads/TaskController.cpp:390:36
        #18 0x7efdd59d2776 in operator() /xpcom/threads/TaskController.cpp:124:37
        #19 0x7efdd59d2776 in mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:531:5
        #20 0x7efdd59bd443 in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1171:16
        #21 0x7efdd59c495a in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:467:10
        #22 0x7efdd64710a6 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:85:21
        #23 0x7efdd638e167 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:331:10
        #24 0x7efdd638e072 in RunHandler /ipc/chromium/src/base/message_loop.cc:324:3
        #25 0x7efdd638e072 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:306:3
        #26 0x7efdda74f388 in nsBaseAppShell::Run() /widget/nsBaseAppShell.cpp:137:27
        #27 0x7efddc7c3b63 in XRE_RunAppShell() /toolkit/xre/nsEmbedFunctions.cpp:878:20
        #28 0x7efdd6471f9a in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:235:9
        #29 0x7efdd638e167 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:331:10
        #30 0x7efdd638e072 in RunHandler /ipc/chromium/src/base/message_loop.cc:324:3
        #31 0x7efdd638e072 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:306:3
        #32 0x7efddc7c319c in XRE_InitChildProcess(int, char**, XREChildData const*) /toolkit/xre/nsEmbedFunctions.cpp:715:34
        #33 0x55e2b9c94d37 in content_process_main /browser/app/../../ipc/contentproc/plugin-container.cpp:57:28
        #34 0x55e2b9c94d37 in main /browser/app/nsBrowserApp.cpp:327:18
        #35 0x7efdec5840b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
        #36 0x55e2b9c704bc in _start (/home/jkratzer/builds/mc-debug/firefox-bin+0x154bc)
    
    UndefinedBehaviorSanitizer can not provide additional info.
    SUMMARY: UndefinedBehaviorSanitizer: SEGV /layout/generic/nsInlineFrame.cpp:878:3 in nsInlineFrame::UpdateStyleOfOwnedAnonBoxesForIBSplit(mozilla::ServoRestyleState&)
    ==265465==ABORTING
Attached file Testcase —

Bugmon Analysis
Verified bug as reproducible on mozilla-central 20220218215229-b21fa00b5f33.
The bug appears to have been introduced in the following build range:

Start: ab80197101b9c7163739f04019ba64fd08770e4b (20210827034222)
End: e629eccab1300878750673df16e0dce0fa4179a6 (20210827053332)
Pushlog: https://hg.mozilla.org/mozilla-unified/pushloghtml?fromchange=ab80197101b9c7163739f04019ba64fd08770e4b&tochange=e629eccab1300878750673df16e0dce0fa4179a6

Keywords: regression
Whiteboard: [bugmon:confirm] → [bugmon:bisected,confirmed]

Masayuki, could this be related to bug 1727479?

Flags: needinfo?(masayuki)

The bug changes editor's behavior, but the testcase here does not use contenteditable nor designMode. So I think that it's not related to this bug.

Flags: needinfo?(masayuki)

The severity field is not set for this bug.
:alaskanemily, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(emcdonough)
Attachment #9264595 - Attachment mime type: text/plain → text/html

I can reproduce the fatal assertion-failure (in a debug build), if I resize my Firefox window after loading the testcase. (The resize-triggered incremental reflow seems to be necessary on my end.)

No issues in non-debug builds, as far as I can tell.

Severity: -- → S3
Flags: needinfo?(emcdonough)

I've captured the assertion-failure in rr (with me loading the testcase and then making my Firefox window a little shorter and triggering the assertion-failure). I uploaded the trace to pernosco; I'll post a link once I've got it.

Also worth mentioning: when I load the testcase (before I resize my window & trigger the fatal assertion), I get these nonfatal assertions:

###!!! ASSERTION: Shouldn't be incomplete if availableBSize is UNCONSTRAINED.: 'aReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE', file layout/generic/nsBlockFrame.cpp:1983
###!!! ASSERTION: Last column should be complete if the available block-size is unconstrained!: 'mLastFrameStatus.IsComplete()', file layout/generic/nsColumnSetFrame.cpp:1040

Testcase crashes using the initial build (mozilla-central 20220218090822-6938c3b26d14) but not with tip (mozilla-central 20230211094336-b6bf621975fb.)

The bug appears to have been fixed in the following build range:

Start: 4096c0b1871e729512114be7190b465fc013dfd5 (20230207041506)
End: fc3ab5ee8ef31f037e2b78feb07262f5b70f1cb3 (20230207082407)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=4096c0b1871e729512114be7190b465fc013dfd5&tochange=fc3ab5ee8ef31f037e2b78feb07262f5b70f1cb3

jkratzer, can you confirm that the above bisection range is responsible for fixing this issue?
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Flags: needinfo?(jkratzer)
Keywords: bugmon

Awesome -- looks like this was fixed by bug 1809764 then.

Status: NEW → RESOLVED
Closed: 3 years ago
Duplicate of bug: 180976
Resolution: --- → DUPLICATE
Duplicate of bug: 1809764
No longer duplicate of bug: 180976
Flags: needinfo?(jkratzer)

Hmm, actually this wasn't fixed; it just changed from a fatal assert to a perma-hang. (Just noticed when testing with the attached crashtest.)

And I guess bugmon doesn't realize that that's still-bad. :) (which is reasonable, given that fuzzer testcases could have infinite loops etc, though this one doesn't)

TYLin, maybe you could take a look as a followup to bug 1809764?

Status: RESOLVED → REOPENED
No longer duplicate of bug: 1809764
Flags: needinfo?(aethanyc)
Resolution: DUPLICATE → ---
Depends on: 1809764
Attachment #9317393 - Attachment is obsolete: true

I cannot reproduce the hang on Nightly or my local debug build. Daniel, when you set pref logging.ColumnSet to debug, do you see the ColumnSet log being generated indefinitely?

Flags: needinfo?(aethanyc) → needinfo?(dholbert)

I'll take a look and let you know.
RE reproducibility: oddly, I can reliably reproduce on one linux machine but not on a different one. (Same build config on both, AFAICT... There has to be some explanation for the difference but I haven't found it yet.)

I pushed the crashtest to Try, and it looks like it's timed out on at least one platform so far (Linux 18.04 x64 WebRender tsan opt):
https://treeherder.mozilla.org/jobs?repo=try&revision=774fc65fedda0cbff97d5bdf537222a7fbc43aba&selectedTaskRun=c5DEJ5JXTESdnWN-s4PviQ.0

Having said that, though, we should probably spin off a followup bug for the hang, since it's clearly a bit fiddly, and the original issue does seem to have been fixed or avoided. I'll spin off a new bug for the hang.

Status: REOPENED → RESOLVED
Closed: 3 years ago → 3 years ago
Duplicate of bug: 1809764
Flags: needinfo?(dholbert)
Resolution: --- → DUPLICATE

(In reply to Daniel Holbert [:dholbert] from comment #16)

I'll spin off a new bug for the hang.

Filed: bug 1816574.

(In reply to Ting-Yu Lin [:TYLin] (UTC-8) from comment #14)

I cannot reproduce the hang on Nightly or my local debug build. Daniel, when you set pref logging.ColumnSet to debug, do you see the ColumnSet log being generated indefinitely?

I used the MOZ_LOG environmental-var equivalent -- but yes, it does seem to be logging indefinitely. See attachment just posted on the followup bug.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: