Repository navigation
Conversation
|
Review requested:
|
|
Thanks for working on this! The commit and lint checks are currently failing. Have you also verified that this builds successfully locally? Please follow the guide below: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66569 +/- ##
==========================================
- Coverage 90.51% 90.51% -0.01%
==========================================
Files 805 805
Lines 285878 285878
Branches 55200 55201 +1
==========================================
- Hits 258756 258754 -2
- Misses 17214 17223 +9
+ Partials 9908 9901 -7
🚀 New features to boost your workflow:
|
Hello Yuya. This PR is part of a number of PRs to be opened for the z/OS port; in our environment, which includes all the port, node builds successfully. |
|
The QUIC build failure has been fixed in #66603. Rebasing onto the latest main should resolve it. |
c903803 to
c484ca3
Compare
jasnell
left a comment
There was a problem hiding this comment.
The license of the zos_setlibpath.cc file needs to be clarified before this can be merged.
- Add new src/node_zos.h and src/node_zos.cc, used by src/node.cc. - Add new src/zos_setlibpath.cc and link its .o directly into node so the __setlibpath object's constructor finds libnode.so and add its path to LIBPATH, so it can be loaded. - Pass '-Wl,-bedit=no' when linking libnode.so to reduce its size. - Use z/OS specific signal handling logic, as signals on z/OS must be handled in a dedicated thread. - Force V8 flag --nohard_abort due to absence of XPLINK headers in JS generated code. - Include display of zoslib build version. Signed-off-by: Gaby Baghdadi <baghdadi@ca.ibm.com>
Address review comments:
- Add comments explaining why the z/OS-specific code is needed:
the SIGABRT handler (see zosSignalExit()) and the --nohard_abort V8
flag.
- Remove the copyright headers from the new node_zos.{h,cc} and
zos_setlibpath.cc files.
Other changes:
- Create the z/OS signal handler thread after blocking all signals on
the main thread, so it starts with every signal blocked. It installs
its own alternate signal stack before unblocking them, so no signal
can be delivered on a thread without one.
- Remove zosIgnorePipeChildSignals(). All signals are blocked on the
main thread, and SIGPIPE is already ignored by ResetSignalHandlers().
- Zero-initialize the struct sigaction in zosSignalExit().
- Check the result of sigaltstack() and report alternate stack setup
failures in zosStart().
- Check pthread_cancel() for any non-zero return, not just -1.
- Do not append directories to LIBPATH if already present.
- Handle SIGUSR1 for the inspector on z/OS, where the main thread blocks
all signals.
- Call RegisterProduct() from zosStart() so that Node.js is registered
for Tailored Fit Pricing.
Assisted-by: IBM Bob
Signed-off-by: Gaby Baghdadi <baghdadi@ca.ibm.com>
Updates here apply to z/OS only.
src/node_zos.handsrc/node_zos.cc, used bysrc/node.ccandsrc/inspector_agent.cc.src/zos_setlibpath.ccand link its.odirectly intonode, so that the__setlibpathobject's constructor findslibnode.soand adds its directory toLIBPATH, allowing it to be loaded.-Wl,-bedit=nowhen linkinglibnode.soto reduce its size.SIGUSR1handling uses its own thread for the same reason (src/inspector_agent.cc).SA_ONSTACKandSA_SIGINFOare used for handlers so that they run on the alternate stack, which keeps them from interfering with the z/OS Language Environment (LE), and so thatsa_sigactionis honored.--nohard_abort: a trap with V8 frames on the stack ends withSIGKILLon z/OS because those frames lack XPLINK metadata, so LE can't traverse the stack.