Bug 255094 - REGRESSION (STP 167): Infinite load on reddit.com
Summary: REGRESSION (STP 167): Infinite load on reddit.com
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: Safari Technology Preview
Hardware: Mac (Apple Silicon) macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2023-04-06 09:07 PDT by Jon
Modified: 2023-05-23 02:44 PDT (History)
12 users (show)

See Also:


Attachments
stp167-reddit (665.06 KB, image/png)
2023-04-06 19:05 PDT, Karl Dubost
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon 2023-04-06 09:07:11 PDT
Staring with STP 167 (Safari 16.4, WebKit 18616.1.8.2), reddit.com seems to get into some sort of infinite loading state that makes the whole page unresponsive. Even the web inspector is laggy. Switching away from the tab and back also breaks the rendering of whatever content was already downloaded. From what could see, loading started normally but then resources loaded beyond the first batch took forever to actually load (looked like about 50s in the inspector) and then the loading just kept going. During that time the UI isn't responsive, I can't cancel loading, nor can I reload. I can't bring up the context menu, and the inspector itself starts to become unresponsive.

I've confirmed Reddit works correctly in system Safari 16.4, Chrome, and STP 166 on another machine. I've also disabled all extensions with no difference.

Due to the inspector not really working either, I'm not sure how to investigate this further.
Comment 1 Jon 2023-04-06 09:43:23 PDT
I'm also noticing similar behavior on google.com. Load appears complete but the page is unresponsive (can't enter a search, reload seems to fail, inspector unresponsive) and the loading in the inspector is still going. In that case I get some error messages from the console:

[Error] Unrecognized Content-Security-Policy directive 'require-trusted-types-for'.

[Error] Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy. (RotateCookiesPage, line 0, x4)
[Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (cspreport, line 0)
[Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (cspreport, line 0)
[Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (cspreport, line 0)
[Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (cspreport, line 0)
Comment 2 Jon 2023-04-06 09:45:41 PDT
Reddit itself eventually shows the following console errors:

[Error] Resource blocked by content blocker
	(anonymous function) (Reddit.757f8686b356f1d2d647.js:1:443653)
	(anonymous function) (Reddit.757f8686b356f1d2d647.js:1:443965)
	./src/reddit/index.tsx (Reddit.757f8686b356f1d2d647.js:1:443965)
	r (runtime~Reddit.d586335e990150b5986b.js:1:604)
	t (runtime~Reddit.d586335e990150b5986b.js:1:432)
	o (runtime~Reddit.d586335e990150b5986b.js:1:295)
	Global Code (Reddit.757f8686b356f1d2d647.js:1)
[Error] Fetch API cannot load https://w3-reporting.reddit.com/policy due to access control checks.
	(anonymous function) (Reddit.757f8686b356f1d2d647.js:1:443653)
	(anonymous function) (Reddit.757f8686b356f1d2d647.js:1:443965)
	./src/reddit/index.tsx (Reddit.757f8686b356f1d2d647.js:1:443965)
	r (runtime~Reddit.d586335e990150b5986b.js:1:604)
	t (runtime~Reddit.d586335e990150b5986b.js:1:432)
	o (runtime~Reddit.d586335e990150b5986b.js:1:295)
	Global Code (Reddit.757f8686b356f1d2d647.js:1)
[Error] Resource blocked by content blocker
	(anonymous function) (vendors~Chat~Governance~Reddit.129ad206362dbdcb7a01.js:1:865813)
	(anonymous function) (vendors~Chat~Governance~Reddit.129ad206362dbdcb7a01.js:1:864554)
	(anonymous function) (Chat~Governance~Reddit.a4b7c54ae7e27fe693be.js:1:171914)
	Promise
	m (Chat~Governance~Reddit.a4b7c54ae7e27fe693be.js:1:171406)
	(anonymous function) (Chat~Governance~Reddit.a4b7c54ae7e27fe693be.js:1:151333)
[Error] XMLHttpRequest cannot load https://www.reddit.com/counters/client-screenview due to access control checks.
	(anonymous function) (vendors~Chat~Governance~Reddit.129ad206362dbdcb7a01.js:1:865813)
	(anonymous function) (vendors~Chat~Governance~Reddit.129ad206362dbdcb7a01.js:1:864554)
	(anonymous function) (Chat~Governance~Reddit.a4b7c54ae7e27fe693be.js:1:171914)
	Promise
	m (Chat~Governance~Reddit.a4b7c54ae7e27fe693be.js:1:171406)
	(anonymous function) (Chat~Governance~Reddit.a4b7c54ae7e27fe693be.js:1:151333)
[Error] Unhandled Promise Rejection: TypeError: Load failed
	(anonymous function) (Reddit.757f8686b356f1d2d647.js:1:443653)
Comment 3 Jon 2023-04-06 10:12:40 PDT
I just noticed this on mmo-champion.com. Page loaded quickly but never seemed to complete, leaving it unresponsive to scrolls or load commands.
Comment 4 Jon 2023-04-06 10:41:40 PDT
Latest WebKit archive build seems to work just fine, as do builds back to 262150, but earlier archives crash on launch on macOS 13.3.
Comment 5 Jon 2023-04-06 11:28:07 PDT
Seems maps.google.com also has this issue. In that case, the UI shows loading as complete (the refresh button is back), but in the inspector I can see there are still resources loading and the map itself is completely unresponsive. Attempts to reload the page hang.
Comment 6 Jon 2023-04-06 11:29:19 PDT
twitter.com also doesn't seem to load. I was able to click the stop loading button, and it seemed to stop, but the button stayed as the stop button and attempts to reload or otherwise interact with the UI failed.
Comment 7 Jon 2023-04-06 11:43:19 PDT
I've noticed that some sites have different loading behavior depending on whether they were loaded from a link outside the browser or manually loaded in a new tab. For instance, loading a wowhead.com link fails due to a freeze, but manually loading it works fine. Trying to load a Twitter link fails, but manually loading it gets further, though still freezes during the load.
Comment 8 Jon 2023-04-06 11:47:46 PDT
Interestingly, the linking behavior seems to apply from links from the loaded page itself. For instance, loading wowhead.com directly works fine, but clicking a link to one of the stories on the front-page hangs during load.
Comment 9 Radar WebKit Bug Importer 2023-04-06 13:05:07 PDT
<rdar://problem/107723675>
Comment 10 Jon 2023-04-06 13:21:31 PDT
Many other sites have demonstrated this issue, including GitHub and Azure. 

Is there any way to reinstall an old version of STP? The links from Apple seem to have a random hash in the download link, so I can't just get last week's build. I'd rather not have to manually set up Safari to handle my browsing for the week.
Comment 11 Karl Dubost 2023-04-06 19:05:41 PDT
Created attachment 465805 [details]
stp167-reddit

So reddit is working for me. 
So maybe there is something else at play to be able to reproduce.
Comment 12 Karl Dubost 2023-04-06 19:07:13 PDT
maps.google.com doesn't load indeed.
Comment 13 Karl Dubost 2023-04-06 19:18:23 PDT
Attempting regression testing
Comment 14 Karl Dubost 2023-04-06 19:37:27 PDT
regression led to nothing
and after restarting STP 167, maps.google.com loads. 

Jon, does it reproduce consistently for you after restarting STP 167?
Comment 15 Karl Dubost 2023-04-06 19:41:21 PDT
Oh that seems to happen only when devtools are opened? Maybe?
Comment 16 Jon 2023-04-06 20:06:09 PDT
Well damn, so sorry, it does work after restarting, even when reloading my previous session. What could that possibly be, especially when it's restarted when the update is applied? In any case, thanks for regressing, sorry for wasting your time. (I only used the inspector once loads started to fail and even it was breaking.)
Comment 17 Karl Dubost 2023-04-06 20:15:57 PDT
Don't be sorry. There is something happening definitely. 
I can replicate, but not all the time, and can't be reliably reproduced.
Still digging around.
Comment 18 Saagar Jha 2023-04-07 19:50:35 PDT
I'm seeing similar behavior, and mine goes away after a restart but not for very long.
Comment 19 Jon 2023-04-10 10:44:24 PDT
I've found that if I play a video on Reddit (say from YouTube), pause it, switch to another tab, then switch back, I can't restart the video and page loading for that tab and most others is broken.
Comment 20 Jon 2023-04-10 10:51:39 PDT
In fact, if all I do is start a video and then close the tab, loading is then broken in the same way I was seeing before.
Comment 21 John Tsombakos 2023-04-12 06:18:11 PDT
Came here to report the same. Happening on Reddit.com for me (currently trying to load a page, sitting for a good 10 minutes now. Have seen it on other sites also. Something in 166 is definitely gone wrong.
Comment 22 John Tsombakos 2023-04-12 06:19:54 PDT
Additionally, when this happens, the back button is unresponsive, and trying to select to get into the Dev tools does nothing. I have to close the window, or quit and restart the app to get working again.
Comment 23 Jon 2023-04-12 07:08:22 PDT
Yeah, it's strange. While the tab is open an stuck loading, a variety of Safari's UI is unresponsive, including refresh and back navigation. Once the tab is closed, the other tabs work normally as long as they don't try to perform the same type of loading that triggers the issue.
Comment 24 Fujii Hironori 2023-04-12 13:39:42 PDT
Could you check the latest build archive? https://webkit.org/build-archives/
Comment 25 Karl Dubost 2023-04-13 07:20:25 PDT
I tried to have a regression range a couple of times. 
At my third attempt, I have found this one, *BUT* I'm not sure this is really it.

Let's ask Chris what he thinks about, but with a big grain of salt.
https://commits.webkit.org/compare/262096@main...262095@main
Bug 254423
Comment 26 Chris Dumez 2023-04-13 07:55:46 PDT
(In reply to Karl Dubost from comment #25)
> I tried to have a regression range a couple of times. 
> At my third attempt, I have found this one, *BUT* I'm not sure this is
> really it.
> 
> Let's ask Chris what he thinks about, but with a big grain of salt.
> https://commits.webkit.org/compare/262096@main...262095@main
> Bug 254423

I doubt it. This is a pure performance optimization (reversing some capacity in vectors when we know we're about to append elements to it). It is extremely unlikely to cause such regression.

Does this still reproduce on trunk? Yusuke had introduced a regression with a JSC "bind" patch recently, which impacted reddit.com. He later fixed it on trunk. I am curious if it is the same issue.
Comment 27 Jon 2023-04-13 08:05:48 PDT
The latest build archives seem to work fine (video on Reddit, then switching to a new tab and back works), but given they aren't a full reproduction of my workflow, it'd be nice to run STP with the newer builds to confirm. If we get a new STP build soon it may be a nonissue.
Comment 28 Simon Fraser (smfr) 2023-04-13 11:32:32 PDT
This was fixed by bug 254752.

*** This bug has been marked as a duplicate of bug 254752 ***
Comment 29 John Tsombakos 2023-04-13 11:37:37 PDT
(completely out of context - Is Simon Fraser the same from the old FilterTop Days?)

Hopefully the fix will come out soon!
Comment 30 Jon 2023-04-19 14:33:31 PDT
Unfortunately this is still and issue with STP 168. Hopefully the next one will have it, switching over to Chrome for my media consumption is pretty annoying.
Comment 31 John Tsombakos 2023-04-24 05:21:36 PDT
Confirming this problem is still happening on 168. Not only on Reddit, various other sites cause the issue to happen - STP becomes all but unresponsive, until the application is closed and relaunched
Comment 32 Alexey Proskuryakov 2023-05-03 17:23:22 PDT
Reopening, as apparently bug 254752 didn't fix this.
Comment 33 Jon 2023-05-03 17:24:56 PDT
This does seem fixed with STP 169, as I've been able to watch YouTube and Reddit videos with other page loads dying.

I'm also noticing some text form weirdness (lag when inputting newlines) and FOUC in these last few builds. I'll see if I can narrow them down for a report.
Comment 34 Jon 2023-05-03 17:29:59 PDT
Without other page loads dying I mean.
Comment 35 Yusuke Suzuki 2023-05-03 17:47:34 PDT
(In reply to Jon from comment #33)
> This does seem fixed with STP 169, as I've been able to watch YouTube and
> Reddit videos with other page loads dying.

OK, thank you for your confirmation!
Comment 36 Saagar Jha 2023-05-04 01:22:41 PDT
FWIW I think it's still broken for me.
Comment 37 John Tsombakos 2023-05-04 05:14:42 PDT
It is still broken for me. Went to a Reddit page with a video, video didn't load (kept spinning), tried to go back a page, but page just kept trying to load.

I've had problems on nsscreencasts.com. Watching a video, pause to do something else, then try to continue video, and it's non-responsive. Have to relaunch the app to get it working again.
Comment 38 Alexey Proskuryakov 2023-05-04 09:34:23 PDT
Thank you for the updates!

This is getting quite confusing, could you please file new reports about these issues? Please provide detailed steps to reproduce and configuration details in those.
Comment 39 Chris Dumez 2023-05-08 14:51:57 PDT
FYI, https://github.com/WebKit/WebKit/pull/13599 fixes a very bad regression was was introduced in STP 167 that would cause our processes have very low priority, resulting in bad performance and media playback issues. This could explain at least some of what you're seeing here.
Comment 40 Saagar Jha 2023-05-23 01:24:14 PDT
Can't speak for the others but the latest Safari Technology Preview build seems to have resolved this for me. Thanks!
Comment 41 Karl Dubost 2023-05-23 02:44:08 PDT
It seems it depends on the people, I have read that some people still had the issues. So that might have some of the things, but maybe not all of them.