Summary: | REGRESSION (iOS 11.2.2): Unhandled Promise Rejection: Error: Out of executable memory in function at index | ||
---|---|---|---|
Product: | WebKit | Reporter: | shader.yang |
Component: | WebAssembly | Assignee: | Nobody <webkit-unassigned> |
Status: | REOPENED --- | ||
Severity: | Major | CC: | alonzakai, annulen, ap, evan.exe, fpizlo, jfbastien, jujjyl, keith_miller, m, morten.sorvig, saam, walter, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 11 | ||
Hardware: | iPhone / iPad | ||
OS: | iOS 11 |
Description
shader.yang
2018-01-17 03:07:50 PST
This issue is likely because we generate more code in our changes to mitigate Spectre and run out of executable memory. There isn't a quick solution to this on our end, unfortunately. (In reply to Keith Miller from comment #1) > This issue is likely because we generate more code in our changes to > mitigate Spectre and run out of executable memory. There isn't a quick > solution to this on our end, unfortunately. Got it, thanks! (In reply to Keith Miller from comment #1) > This issue is likely because we generate more code in our changes to > mitigate Spectre and run out of executable memory. There isn't a quick > solution to this on our end, unfortunately. And more question, do you know whether this issue https://bugs.webkit.org/show_bug.cgi?id=183101 is related to Spectre patch too? Thanks! Would it be possible to increase the size of the executable memory pool for iOS devices? The code in ExecutableAllocator.cpp suggests a current size of 64MB for ARM64: #if defined(FIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB) && FIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB > 0 static const size_t fixedExecutableMemoryPoolSize = FIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB * 1024 * 1024; #elif CPU(ARM) static const size_t fixedExecutableMemoryPoolSize = 16 * 1024 * 1024; #elif CPU(ARM64) static const size_t fixedExecutableMemoryPoolSize = 64 * 1024 * 1024; #elif CPU(X86_64) static const size_t fixedExecutableMemoryPoolSize = 1024 * 1024 * 1024; #else static const size_t fixedExecutableMemoryPoolSize = 32 * 1024 * 1024; #endif Is this still an issue in iOS 12? The link reported here doesn't seem to do anything anymore. I can still reproduce this on 12.0 (16A366), using this test case: https://msorvig.github.io/qt-webassembly-examples/slate/slate.html We bumped the space to 128MB recently (in ToT WebKit). That will probably make this test case work. Marking as configuration changed for now. Looks like the change was reverted: https://bugs.webkit.org/show_bug.cgi?id=190453 If you need a new test case, I've made one here: http://packages.kognito.com/Safari_iOS_WASM_Bug (this loads on Safari/Edge/Chrome/Firefox on the "Desktop platform" and Chrome/Firefox on the "Android Platform"). Hello, iOS 12.2 has the configuration change this ticket references (https://bugs.webkit.org/show_bug.cgi?id=190453) that was hopefully going to resolve this issue, but unfortunately it still exists. What are the next steps? Can I provide you with any more information or test cases? Reopening because of report by Walter Stumpf above Okay apologies for not conducting a full review with iOS 12.2! So TLDR: I would rate this ticket as 99% resolved. In some various use cases this exact error can still happen (e.g. loading our Unity wasm app, navigating to a new page, when navigating back to the original page our app will often trigger this error on second load). But on a newly opened tab, our Unity app can consistently load. I'd still rate the behavior on 11.2.1 as more robust, but I think we can still work with the current implementation in 12.2. I apologize again for the confusion. Thanks again for the help, you've made every Unity webgl developer happy! This probably won't be fully resolved until we implement an interpreter. But it might be worth looking into if we could try to GC to delete old code before throwing this exception. It seems that the issue came back with the new iPadOS update. I checked few pages which worked on iOS 12 and they throw "Error: Out of executable memory in function at index" exceptionon on iPadOS 13 beta 2. I can confirm on iPad OS (beta 6) this bug is back. :( I have not tried iOS 13 on my iPhone yet, but on a fresh tab our wasm application (Unity game) cannot load on my iPad Pro. Please file new bugs with repro steps for the regressions seen in iOS 13 beta. An old bug that isn't fully resolved shouldn't be conflated with cases that used to work, but no longer do. No worries I made one here: https://bugs.webkit.org/show_bug.cgi?id=200686 Running Unity content http://clb.confined.space/dump/WebGL1-2019-12-11/ on Safari 12.1.1 on iPad Pro 2018 on iOS 12.3.1 works ok, but running the same page on Safari 13.0.3 on iPhone Xs on iOS 13.2.0 runs out of memory. The communication trail at https://bugs.webkit.org/show_bug.cgi?id=200686 and https://bugs.webkit.org/show_bug.cgi?id=200807 suggests this bug would be fixed, though testing above page suggests that is not the case. |