swissspidy / media-experiments

WordPress media experiments
GNU General Public License v2.0
73 stars 1 forks source link

Unexpected C errors from wasm-vips #611

Closed swissspidy closed 1 week ago

swissspidy commented 1 month ago

In #602 some tests seem to fail on WebKit due to unexpected errors from wasm-vips.

I haven't been able to reproduce that yet when running locally but I am documenting the failure here just in case.

In bigImageSizeThreshold.spec.ts the logged errors are as follows:

GLib (gthread-posix.c): Unexpected error from C library during 'pthread_key_create': Resource temporarily unavailable.  Aborting.
worker sent an error! http://localhost:8889/wp-content/plugins/media-experiments/build/vips.worker.js:598: RuntimeError: Aborted(). Build with -sASSERTIONS for more info.
[object ErrorEvent]
Aborted(). Build with -sASSERTIONS for more info.

In images/cover.spec.ts it's slightly different:

GLib (gthread-posix.c): Unexpected error from C library during 'pthread_mutex_unlock': Operation not permitted.  Aborting.
Aborted()
Unhandled Promise Rejection: RuntimeError: Aborted(). Build with -sASSERTIONS for more info.

In images/importExternal.spec.ts:

Unhandled Promise Rejection: unwind
worker sent an error! http://localhost:8889/wp-content/plugins/media-experiments/build/vips.worker.js:598: RuntimeError: Aborted(). Build with -sASSERTIONS for more info.
Unhandled Promise Rejection: unwind
worker sent an error! http://localhost:8889/wp-content/plugins/media-experiments/build/vips.worker.js:598: RuntimeError: Aborted(). Build with -sASSERTIONS for more info.
[object ErrorEvent]
Aborted(). Build with -sASSERTIONS for more info.
GLib (gthread-posix.c): Unexpected error from C library during 'pthread_key_create': Resource temporarily unavailable.  Aborting.
kleisauke commented 1 month ago

Upstream WebKit bug report: https://bugs.webkit.org/show_bug.cgi?id=276953.

kleisauke commented 2 weeks ago

WebKit issue https://bugs.webkit.org/show_bug.cgi?id=276953 has been confirmed as fixed. This workaround: https://github.com/swissspidy/media-experiments/blob/71cee15895775cd84cfab139ead02ff4ab9feedc/tests/e2e/playwright.config.ts#L82-L89

can be removed once a new version of Playwright is released that includes commit https://github.com/microsoft/playwright/commit/4d26036b7bcc56d47db9a0dea3e7f968302b09d7.

swissspidy commented 2 weeks ago

That's great to hear! Thanks for keeping me in the loop!