You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
panic: Failed to get browsing context info from constellation.: Disconnected at components/script/script_thread.rs:2917 #36747
changed the title [-]Panic: Failed to get browsing context info from constellation.: Disconnected at components/script/script_thread.rs:2917[/-][+]panic: Failed to get browsing context info from constellation.: Disconnected at components/script/script_thread.rs:2917[/+]on Apr 29, 2025
The error is due to a Disconnected error on result_receiver .recv() .expect("Failed to get browsing context info from constellation."), pointing towards the constellation having dropped the result_sender in the message before responding, so this is rather a sympton of the lack of clean shutdown investigated at #30849
Actually I can reproduce the crash, it is intermittent. We navigate the iframe and the main page in a loop, which seems wrong, and then if you try to close the browser, you get the crash sometimes.
Ok so the loop if because of the form submission on the main window, and the resulting navigation should actually be canceled by the call to window.frames.stop, but
Also interesting to note we always end-up creating a new script-thread for each navigation, but those all point to the same webview, which seems wrong. Incidentally, it makes it hard to cancel the navigation, since it originates in one script-thread, but ends-up in a new one.
Ok so actually creating new script-threads sort of makes sense, because we also destroy the previous one.
To stop the infinite navigation loop, we need to implement the cancelling of stop. There are two cases:
Intra script-thread navigation: the pipeline changes, but the browsing context stays the same. So we can set the ongoing-navigation on the browsing context, and cancel it locally. When the new layout info comes in, ignore it.
Inter script-thread navigation: we need to send a message to constellation, but the effect will be inherently racy, since the outcome of the navigation will happen in another newly created script-thread(also not sure how this makes sense with the browsing context).
I think I'll try to find some simple first step to take in that direction, because the spec uses this navigable concept which we don't have yet, and to have it we'd need something to survive the navigation(so not the pipeline since it is closed and a new one is created), so a little like the browsing context, although it's not clear to me if we really re-use it, in particular when we end-up creating a new script-thread.
Activity
[-]Panic: Failed to get browsing context info from constellation.: Disconnected at components/script/script_thread.rs:2917[/-][+]panic: Failed to get browsing context info from constellation.: Disconnected at components/script/script_thread.rs:2917[/+]gterzian commentedon May 1, 2025
Looks like it relates to #31973The error is due to a
Disconnectederror onresult_receiver .recv() .expect("Failed to get browsing context info from constellation."), pointing towards the constellation having dropped theresult_senderin the message before responding, so this is rather a sympton of the lack of clean shutdown investigated at #30849gterzian commentedon Aug 7, 2025
This seems to have been fixed now, probably by #38424 and #38322
Confirmed locally on Mac.
Can anybody try on Linux please?
gterzian commentedon Aug 13, 2025
I can't reproduce the crash, but I do get the load event repeated in a loop, which doesn't happen if I load the page in firefox.
gterzian commentedon Aug 13, 2025
Actually I can reproduce the crash, it is intermittent. We navigate the iframe and the main page in a loop, which seems wrong, and then if you try to close the browser, you get the crash sometimes.
gterzian commentedon Aug 14, 2025
Ok so the loop if because of the form submission on the main window, and the resulting navigation should actually be canceled by the call to
window.frames.stop, butservo/components/script/dom/window.rs
Line 867 in 97a114b
gterzian commentedon Aug 14, 2025
Also interesting to note we always end-up creating a new script-thread for each navigation, but those all point to the same webview, which seems wrong. Incidentally, it makes it hard to cancel the navigation, since it originates in one script-thread, but ends-up in a new one.
gterzian commentedon Aug 14, 2025
Ok so actually creating new script-threads sort of makes sense, because we also destroy the previous one.
To stop the infinite navigation loop, we need to implement the cancelling of
stop. There are two cases:ongoing-navigationon the browsing context, and cancel it locally. When the new layout info comes in, ignore it.I think I'll try to find some simple first step to take in that direction, because the spec uses this navigable concept which we don't have yet, and to have it we'd need something to survive the navigation(so not the pipeline since it is closed and a new one is created), so a little like the browsing context, although it's not clear to me if we really re-use it, in particular when we end-up creating a new script-thread.
script: abort planned form navigations (#38676)
script: when handling page headers, stop if pipeline closed already (#…