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

fix travis build issue #157

Open
zmofei opened this issue Dec 12, 2018 · 2 comments
Open

fix travis build issue #157

zmofei opened this issue Dec 12, 2018 · 2 comments

Comments

@zmofei
Copy link
Member

zmofei commented Dec 12, 2018

This morning, I found that all the c++ build job related to "TOOLSET=asan" returns an error, even we try to rebuild the old jobs which already passed:

image

image

Debug w/ @springmeyer, we thought this is a new Travis error due to a new leak in node.js.

To fix this issue we need to add echo "leak:node::Start" >> ${SUPPRESSION_FILE} in scripts/sanitize.sh

diff --git a/scripts/sanitize.sh b/scripts/sanitize.sh
index 4168cca..28c9344 100755
--- a/scripts/sanitize.sh
+++ b/scripts/sanitize.sh
@@ -24,6 +24,7 @@ SUPPRESSION_FILE="/tmp/leak_suppressions.txt"
 echo "leak:__strdup" > ${SUPPRESSION_FILE}
 echo "leak:v8::internal" >> ${SUPPRESSION_FILE}
 echo "leak:node::CreateEnvironment" >> ${SUPPRESSION_FILE}
+echo "leak:node::Start" >> ${SUPPRESSION_FILE}
 echo "leak:node::Init" >> ${SUPPRESSION_FILE}
 export ASAN_SYMBOLIZER_PATH=$(pwd)/mason_packages/.link/bin/llvm-symbolizer
 export MSAN_SYMBOLIZER_PATH=$(pwd)/mason_packages/.link/bin/llvm-symbolizer

OR see this PR https://github.com/mapbox/node-cpp-skel/pull/156/files.

This will fix the issue.

cc w/ @mapbox/maps-api @flippmoke @mapsam @millzpaugh

@mapsam
Copy link
Contributor

mapsam commented Dec 12, 2018

Good find @zmofei - thanks for putting together a PR!

@springmeyer
Copy link
Contributor

Thanks @zmofei 👍 This adjustment will keep things passing and will avoid builds erroring on what we don't have control over. For the record I think what is happening is that:

  • node.js has memory leaks, likely intentional and unavoidable, due to creating a few persistent resources at startup
  • The suppression file has been useful for ignoring these such that if any leaks are detected in our code, we'll get notified
  • In this case node v10.14.2 was released, and because our travis config lists 10 and not an explicit version, our jobs upgraded immediately. And v10.14.2 has a new memory leak inside the node::Start function.

There may be value in reporting the leaks to the node.js project, but so far I've not felt like this is actionable because its not clear from the message exactly where they are coming from:

=================================================================
==5708==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x2b7243330af2 in operator new(unsigned long) /home/travis/build/mapbox/mason/mason_packages/.build/llvm-6.0.1/build/../projects/compiler-rt/lib/asan/asan_new_delete.cc:92:3
    #1 0x8e4100 in node::Start(int, char**) (/home/travis/.nvm/versions/node/v10.14.2/bin/node+0x8e4100)
    #2 0x2b7244ea6f44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f44)

But perhaps @flippmoke or @ericfischer might have ideas on where this leak is coming from in node? The diff between v10.14.1 and v10.14.2 is pretty large so its not immediately obvious to me where to look:

git diff v10.14.1 v10.14.2 src/ > d.diff

https://gist.github.com/springmeyer/a925043ab79dee2b98054111bbd3e0b6

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

No branches or pull requests

3 participants