-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TiDB in Webassembly crashes in some mobile browsers #13322
Comments
Seems in Go1.12, the runtime will allocate 1GB initial memory (see golang/go#27462). So I tried with Go1.13 and set |
@5kbpers you also adjust the mac proc number to 1, and it still can't work on mobile phone, right? |
do you have any idea? @syrusakbary |
Use https://github.com/rustwasm/twiggy, I find most of the size is occupied by the data section, but I have no idea which static var uses so large size.
|
Through
|
I am so surprised that Wasm needs some dependencies like etcdserverpb, debugpb, etc. IMO, if we only use a standalone TiDB, we should not depend on these. I think we need to refactor the code now. |
We should remove the etcd and TiKV dependence when we only use a standalone TiDB. |
Closing this issue since there is no good way to solve chrome crashing. If there is any opportunity we can reopen this again. |
via the graalvm language research framework i found out that compiling stuff with a lot of so called Nodes where every function call is a node causes such problems. there is at present a magic number of 40 000 nodes that can safe get compiled |
@frank-dspeed Thanks for letting us know this! And do you know is there any good way to work around this? We have been plagued by this problem all the time. |
@lucklove splitting it up into independent wasm is the way to go and then reuse them |
wasm needs an overall more modular coding style and mindset you will never want to compile an application to wasm you want to support all functions of the application as wasm so you can, for example, include them inside node.js + wasi to have a high-level language to use them and do efficient prototyping. this will also lead to being so modular that we can improve even a single sorting algo via replacing a single wasm in the stack. |
I have for example at present the idea to expose many data structures as wasm and a way to access them so you can create them like objects with a fixed size and operate efficiently on them. others are going the same way already https://unpkg.com/browse/[email protected]/merkle_tree_wasm.js I would code more of the interface inside the wasm and expose a more friendly API but this shows where it goes. I am also looking only for that into tikv and tidb i want to make the functionality useable as was modules so that I can do coprocessing on the data where the data is :) my response to universal grid computing my research showed that this is the best we can archive today. i want feature parity with apache ignite inside the wasm universe :) |
The parent issue to this was closed as frozen. This one is also closed, but without any info whether it's still an issue or not? |
@Zireael07 it is a issue that can not get fixed lets call it upstream issues nothing can be done at present inside here! |
Bug Report
TiDB in Webassembly(#13069) always gets stuck and even crash in some mobile browsers(iOS Safari, Android Chrome, etc.).
In my iOS13.2:
The text was updated successfully, but these errors were encountered: