IMAGINARY / kiosk-browser

Hardened Web Browser with Kiosk-mode
Apache License 2.0
21 stars 2 forks source link

Running several kiosk-browser processes may result in crashes #73

Open porst17 opened 1 year ago

porst17 commented 1 year ago

It seems that Electron does not natively support running multiple instances. Sometimes one of the kiosk-browser processes would just crash when files and folders required for caching are accessed by more than one process.

porst17 commented 1 year ago

Here are the logs of such a crash. Three kiosk-browsers are started simultaneously on a clean install (where no cache is present yet). The logs are obtained using the environment variables ELECTRON_ENABLE_LOGGING and ELECTRON_LOG_FILE.

First instance:

[1841:1114/113702.258222:ERROR:simple_version_upgrade.cc(152)] Failed to write a new fake index.
[1948:0100/000000.326945:WARNING:sandbox_linux.cc(380)] InitializeSandbox() called with multiple threads in process gpu-process.

Second instance:

[1842:1114/113702.258183:ERROR:simple_version_upgrade.cc(165)] Disk cache backend fake index file has wrong size.
[1842:1114/113702.258435:ERROR:simple_file_enumerator.cc(21)] opendir /home/kiosk/.config/kiosk-browser/Code Cache/wasm: No such file or directory (2)
[1842:1114/113702.258475:ERROR:simple_index_file.cc(614)] Could not reconstruct index from disk
[1842:1114/113702.258514:ERROR:simple_file_enumerator.cc(21)] opendir /home/kiosk/.config/kiosk-browser/Code Cache/js: No such file or directory (2)
[1842:1114/113702.258526:ERROR:simple_index_file.cc(614)] Could not reconstruct index from disk
[1842:1114/113702.261858:ERROR:block_files.cc(441)] Failed to open /home/kiosk/.config/kiosk-browser/GPUCache/data_3
[1842:1114/113702.276082:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
[1950:1114/113702.327304:WARNING:sandbox_linux.cc(380)] InitializeSandbox() called with multiple threads in process gpu-process.

Third instance:

[1843:1114/113702.258211:ERROR:simple_version_upgrade.cc(165)] Disk cache backend fake index file has wrong size.
[1843:1114/113702.258223:ERROR:simple_version_upgrade.cc(152)] Failed to write a new fake index.
[1843:1114/113702.258335:ERROR:simple_backend_impl.cc(739)] Simple Cache Backend: wrong file structure on disk: 8 path: /home/kiosk/.config/kiosk-browser/Code Cache/wasm
[1843:1114/113702.258367:ERROR:simple_backend_impl.cc(739)] Simple Cache Backend: wrong file structure on disk: 10 path: /home/kiosk/.config/kiosk-browser/Code Cache/js
[1843:1114/113702.262252:ERROR:block_files.cc(441)] Failed to open /home/kiosk/.config/kiosk-browser/DawnCache/data_3
[1949:1114/113702.333782:WARNING:sandbox_linux.cc(380)] InitializeSandbox() called with multiple threads in process gpu-process.

It was the first instance that crashed.