Skip to content
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

pthread sigmask/atfork no-op when using NNG #8545

Closed
aliasdevelopment opened this issue May 4, 2019 · 5 comments
Closed

pthread sigmask/atfork no-op when using NNG #8545

aliasdevelopment opened this issue May 4, 2019 · 5 comments
Labels

Comments

@aliasdevelopment
Copy link

aliasdevelopment commented May 4, 2019

I am trying to port an existing application which is using nng.

At runtime I get no-op errors relating to sigmask and atfork

Is it technically possible to support pthread_sigmask and pthread_atfork in emscripten?

@aliasdevelopment
Copy link
Author

aliasdevelopment commented May 4, 2019

I found "The Emscripten implementation does also not support multiprocessing via fork() and join()." on https://emscripten.org/docs/porting/pthreads.html.

Is this statement valid as a 'not support yet' statement or a 'is not possible' statement?

@aliasdevelopment
Copy link
Author

Both #7670 and #7672 are hinting changes allowing full posix sockets and multithreading aware websockets

@aliasdevelopment
Copy link
Author

aliasdevelopment commented May 6, 2019

The initial issue has been seen on emscripten branch master and incoming.

Tried juj:full_posix_sockets branch described in #7672 and is still getting the no-op

Using: -lwebsocket.js -s PROXY_POSIX_SOCKETS=1 -s USE_PTHREADS=1 -s PROXY_TO_PTHREAD=1
Using: firefox setting javascript.options.shared_memory = true

Firefox 65.0.1 and Firefox Nightly 68.0a1 (2019-05-03) produce the following when using emscripten juj:full_posix_sockets:

Preallocating 1 workers for a pthread spawn pool. app_one.html:1237:13
Network - Starting app_one.html:1237:13
Network - Call resolve app_one.html:1237:13
Network - Resolve start: ws://127.0.0.1:9999 app_one.html:1237:13
Preallocating 1 workers for a pthread spawn pool. app_one.html:1237:13
fork() is not supported: pthread_atfork is a no-op. app_one.js:9328:7
Preallocating 1 workers for a pthread spawn pool. app_one.html:1237:13
pthread_sigmask() is not supported: this is a no-op. app_one.js:9611:7
Preallocating 1 workers for a pthread spawn pool. app_one.html:1237:13
pthread_sigmask() is not supported: this is a no-op. app_one.js:9611:7
Preallocating 1 workers for a pthread spawn pool. app_one.html:1237:13
pthread_sigmask() is not supported: this is a no-op.
ReferenceError: WS is not defined

@femski
Copy link

femski commented Feb 18, 2020

I have installed and activated latest 1.39.8 build (also tried "master" build) and I still see:

fork() is not supported: pthread_atfork is a no-op

Also, pthread_sigmask throws exception.

I am trying to use libuv (posix only) to work under emscripten

Issue #7672 and Issue #7670 are both supposed to have been merged to "incoming" which I thought was now "master". Any idea when we can use pthread_sigmast/pthread_atfork in emscripten ?

cc: @juj

@stale
Copy link

stale bot commented Feb 18, 2021

This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant.

@stale stale bot added the wontfix label Feb 18, 2021
@stale stale bot closed this as completed Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants