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

test(cactus-core): fix false negative test results #20

Closed
wants to merge 1 commit into from

Conversation

petermetz
Copy link
Owner

WORK IN PROGRESS - root cause is unknown

Signed-off-by: Peter Somogyvari peter.somogyvari@accenture.com

Pull Request Requirements

  • Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.
  • Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.
  • Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

  • Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
  • Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

@petermetz petermetz force-pushed the petermetz/issue2966 branch 2 times, most recently from 509b91e to d4cccf8 Compare February 6, 2024 22:49
The fix was to start statically importing the http helper library we use
in `packages/cactus-core/src/main/typescript/web-services/handle-rest-endpoint-exception.ts`
instead of how it was (dynamic imports at runtime).

1. There have been reports of dynamic imports causing segmentation
faults in the NodeJS process when Jest is involved.
2. It is looking like this bug was another instance of that manifesting
but slightly differently because this time around Jest decided to hide
the stack trace of it as well.
3. Because of `2)` we have no specific evidence of the theory. We can only
say that the change in this commit made the problem go away, but since
there never was any crash logs or stack traces on the CI environment,
this remains a conjecture.
4. Trying to reproduce the issue locally failed even when using the
exact same versions of NodeJS and npm (and all the dependencies of course).
5. Based on `4)` it is likely that the segmentation fault is due to a
race condition in the lower level (C/C++) code of NodeJS and/or Jest.

Fixes hyperledger-cacti#2966

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant