emscripten-core / emscripten-core/emscripten
Error errno 29 when FS.write on preloaded data
Nessuno ha ancora preso questa issue.
- Lingua principale
- C++
- Stelle
- 27.6k
- Fork
- 3.6k
- Merge medio
- 1g 14h
- PR unite (30g)
- 125
Descrizione
Version: emscripten/emsdk:3.1.45
To reproduce you need to preload some data, then just call FS.writeFile('/somepreloadeddata'). You can find my compile arguments at https://github.com/soyuka/php-wasm/blob/main/Dockerfile but there's nothing fancy. It looks like the data is already open with a cursor somewhere in that file.
What works is to FS.unlink first then you're able to FS.writeFile again. I've tracked the call to the write call at (https://github.com/emscripten-core/emscripten/blob/3a55fe189e2d12298a0350b16fa551c5df5348a1/src/library_fs.js#L1286) and obviously when trying to write using fopen etc. it also fails.
I'm not sure if we can access current opened file descriptor so that we could try to close the opens one. I'm not even sure why these would be kept open as I haven't mounted anything (on start we probably mount the memfs though but why are these files kept open?).
Anyways, I'm enjoying your work a lot so thanks to everyone working on this project :).
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dagli argomenti di compilazione in Dockerfile e dalla chiamata a FS.write in src/library_fs.js intorno alla riga 1286. Riproduci FS.writeFile su dati precaricati, confrontalo con il caso FS.unlink-then-write e traccia il fallimento errno 29. Il lavoro è completato quando la scrittura segnalata riesce senza scollegare manualmente il file precaricato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, wasm
- Ambito
- compilers, operating-systems
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100