You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the executable test_service_request without arguments
Expected output
Load transport shared library BEFORE forking
Service executed: true
Service result: true
Service reply: true
Actual output
Load transport shared library BEFORE forking
Service executed: false
Service result: false
Service reply: false
Comments
If I run the executable test_service_request --random_arg to make it load the transport library after the fork, the output is:
Load transport shared library AFTER forking
Service executed: true
Service result: true
Service reply: true
The difference between both cases is that when loading the library before forking, the parent and the child share the same shared library in memory, which will make both processes share the same NodeShared singleton, and in turn, share use the same ZMQ context.
Possible solution
Create a NodeShared instance per process
The text was updated successfully, but these errors were encountered:
joxoby
pushed a commit
to joxoby/ign-transport
that referenced
this issue
May 15, 2020
There seems to be a problem when dealing with service request and forks:
Steps to reproduce
test_service_request
without argumentsExpected output
Actual output
Comments
If I run the executable
test_service_request --random_arg
to make it load the transport library after the fork, the output is:The difference between both cases is that when loading the library before forking, the parent and the child share the same shared library in memory, which will make both processes share the same
NodeShared
singleton, and in turn, share use the same ZMQ context.Possible solution
Create a
NodeShared
instance per processThe text was updated successfully, but these errors were encountered: