Skip to content

Conversation

@jyavenard
Copy link
Member

@jyavenard jyavenard commented Feb 1, 2024

e70021f

REGRESSION (273804@main): [ macOS wk1 Debug ] http/tests/media/video-throttled-load-metadata.html is a constant crash
https://bugs.webkit.org/show_bug.cgi?id=268480
rdar://122025990

Reviewed by Youenn Fablet.

273804@main incorrectly removed the delayed task removal to perform the operation immediately.
However, this method is called while iterating the HashTable from which we are removing the task causing
the iterator to become invalid.
Re-introduce the delayed operation, add comment in code.

Covered by existing tests.

* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm:
(WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived):

Canonical link: https://commits.webkit.org/273892@main

cad1c56

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 tv-sim
✅ 🛠 🧪 merge ✅ 🛠 watch
✅ 🛠 watch-sim

@jyavenard jyavenard self-assigned this Feb 1, 2024
@jyavenard jyavenard added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Feb 1, 2024
Copy link
Contributor

@youennf youennf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Quick question with the model though: why do we need to remove it once consumed?
Could we remove it from the map before calling giveResponseToTasksWithFinishedRanges? And pass ownership to giveResponseToTasksWithFinishedRanges?

@jyavenard
Copy link
Member Author

jyavenard commented Feb 1, 2024

LGTM. Quick question with the model though: why do we need to remove it once consumed? Could we remove it from the map before calling giveResponseToTasksWithFinishedRanges? And pass ownership to giveResponseToTasksWithFinishedRanges?

TBH, I don't know. The extent of my involvement with the RangeResponseGenerator has been to make it thread-safe. I haven't touched to the basic logic.

As it is, the task is removed from the map only once all the requested data has been delivered. And sometimes, the data is delivered asynchronously to the PlatformMediaResource.

So we can't always determine when it's okay to remove it.

@jyavenard jyavenard added the merge-queue Applied to send a pull request to merge-queue label Feb 1, 2024
…throttled-load-metadata.html is a constant crash

https://bugs.webkit.org/show_bug.cgi?id=268480
rdar://122025990

Reviewed by Youenn Fablet.

273804@main incorrectly removed the delayed task removal to perform the operation immediately.
However, this method is called while iterating the HashTable from which we are removing the task causing
the iterator to become invalid.
Re-introduce the delayed operation, add comment in code.

Covered by existing tests.

* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm:
(WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived):

Canonical link: https://commits.webkit.org/273892@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/REGRESSION-273804main--macOS-wk1-Debug--httptestsmediavideo-throttled-load-metadata-html-is-a-constant-crash branch from cad1c56 to e70021f Compare February 1, 2024 10:26
@webkit-commit-queue webkit-commit-queue merged commit e70021f into WebKit:main Feb 1, 2024
@webkit-commit-queue
Copy link
Collaborator

Committed 273892@main (e70021f): https://commits.webkit.org/273892@main

Reviewed commits have been landed. Closing PR #23644 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Feb 1, 2024
@jyavenard jyavenard deleted the eng/REGRESSION-273804main--macOS-wk1-Debug--httptestsmediavideo-throttled-load-metadata-html-is-a-constant-crash branch June 13, 2024 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Bugs Unclassified bugs are placed in this component until the correct component can be determined.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants