FAQ
I'm stuck on an issue during testing and I was wondering if I could get
some help nailing down the problem. I've created a project to recreate the
error here: https://github.com/maestroh/segfault_test

When running my tests, I continue to get a segmentation fault error when
nodemon restarts. The only way I've been able to recreate the error is
through the following steps.

*Recreation Steps*
1. Create a test using mocha
2. Add a jsdom setup on the before step
3. Require simple-mock. I've also tried sinon. I don't have to use anything
in these packages. I only have to require them.
4. Add a gulp task to execute the mocha test
5. Add a gulp task for nodemon to restart on changes and re-run the tests

*When the tests re-run, I receive the following segfault error*
PID 7389 received SIGSEGV for address: 0x0
/home/nael/proj/segfault_test/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x10e5)[0x7f02527b50e5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x7f0252d8d340]
/home/nael/proj/segfault_test/node_modules/jsdom/node_modules/contextify/build/Release/contextify.node(_ZN17ContextifyContext20GlobalPropertySetterEN2v85LocalINS0_6StringEEENS1_INS0_5ValueEEERKNS0_12AccessorInfoE+0x6e)[0x7f02505ad25e]
gulp(_ZN2v88internal8JSObject26SetPropertyWithInterceptorEPNS0_6StringEPNS0_6ObjectE18PropertyAttributesNS0_14StrictModeFlagE+0x232)[0x81be22]
gulp(_ZN2v88internal8JSObject20SetPropertyForResultEPNS0_12LookupResultEPNS0_6StringEPNS0_6ObjectE18PropertyAttributesNS0_14StrictModeFlagENS0_10JSReceiver14StoreFromKeyedE+0x38e)[0x81b5fe]
gulp(_ZN2v88internal8JSObject20SetPropertyForResultEPNS0_12LookupResultEPNS0_6StringEPNS0_6ObjectE18PropertyAttributesNS0_14StrictModeFlagENS0_10JSReceiver14StoreFromKeyedE+0x20a)[0x81b47a]
gulp(_ZN2v88internal10JSReceiver11SetPropertyEPNS0_6StringEPNS0_6ObjectE18PropertyAttributesNS0_14StrictModeFlagENS1_14StoreFromKeyedE+0x99)[0x81d329]
gulp(_ZN2v88internal7StoreIC5StoreENS0_16InlineCacheStateENS0_14StrictModeFlagENS0_6HandleINS0_6ObjectEEENS4_INS0_6StringEEES6_+0x390)[0x7af920]
gulp(_ZN2v88internal12StoreIC_MissENS0_9ArgumentsEPNS0_7IsolateE+0x126)[0x7afe86]
[0x1ff8f9706362]


I only get the segfault when requiring sinon or simple-mock. Anyone know
how to further diagnose the problem? I'm thinking there is a problem with
how I'm setting up and tearing down jsdom, but I can't find anyone else
that's had the problem. One other thought is that I'm running in a virtual
machine. I'm wondering if the contextify build isn't getting created
correctly which results in the segfault.

Thanks for the help.

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/be427a1b-9b5a-4f50-8975-52de174f9a45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Aria Stewart at Nov 23, 2014 at 7:35 pm

    On Nov 23, 2014, at 8:00 PM, Nael Alismail wrote:

    I'm stuck on an issue during testing and I was wondering if I could get some help nailing down the problem. I've created a project to recreate the error here: https://github.com/maestroh/segfault_test

    When running my tests, I continue to get a segmentation fault error when nodemon restarts. The only way I've been able to recreate the error is through the following steps. [snip]
    When the tests re-run, I receive the following segfault error [snip]
    /home/nael/proj/segfault_test/node_modules/jsdom/node_modules/contextify/build/Release/contextify.node(_ZN17ContextifyContext20GlobalPropertySetterEN2v85LocalINS0_6StringEEENS1_INS0_5ValueEEERKNS0_12AccessorInfoE+0x6e)[0x7f02505ad25e]
    That is Contextify being set up, which is a really interestingly annoying piece of hackery. Its concepts now form the node 0.11 vm module.

    Which node are you using?
    I only get the segfault when requiring sinon or simple-mock. Anyone know how to further diagnose the problem? I'm thinking there is a problem with how I'm setting up and tearing down jsdom, but I can't find anyone else that's had the problem. One other thought is that I'm running in a virtual machine. I'm wondering if the contextify build isn't getting created correctly which results in the segfault.

    I wonder if those do similar hacks -- do either of those use contextify?

    Aria

    --
    Job board: http://jobs.nodejs.org/
    New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
    Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    To post to this group, send email to nodejs@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/9DA32552-6C2A-484D-8F39-5F1C59201DC0%40nbtsc.org.
    For more options, visit https://groups.google.com/d/optout.
  • Nael Alismail at Nov 23, 2014 at 8:29 pm
    I'm using node version 10.33. Good idea about either of those mocking
    frameworks using contextify. I just checked and neither do. What's strange
    is that the first time I run the tests, there's no problem. If I run the
    tests alone, there's no problem. The problem only seems to happen when
    nodemon restarts and runs the tests again.
    On Sunday, November 23, 2014 2:35:09 PM UTC-5, Aria Stewart wrote:

    On Nov 23, 2014, at 8:00 PM, Nael Alismail <nerdupg...@gmail.com
    <javascript:>> wrote:

    I'm stuck on an issue during testing and I was wondering if I could get
    some help nailing down the problem. I've created a project to recreate the
    error here: https://github.com/maestroh/segfault_test

    When running my tests, I continue to get a segmentation fault error when
    nodemon restarts. The only way I've been able to recreate the error is
    through the following steps.


    [snip]

    *When the tests re-run, I receive the following segfault error*


    [snip]


    /home/nael/proj/segfault_test/node_modules/jsdom/node_modules/contextify/build/Release/contextify.node(_ZN17ContextifyContext20GlobalPropertySetterEN2v85LocalINS0_6StringEEENS1_INS0_5ValueEEERKNS0_12AccessorInfoE+0x6e)[0x7f02505ad25e]


    That is Contextify being set up, which is a really interestingly annoying
    piece of hackery. Its concepts now form the node 0.11 vm module.

    Which node are you using?

    I only get the segfault when requiring sinon or simple-mock. Anyone know
    how to further diagnose the problem? I'm thinking there is a problem with
    how I'm setting up and tearing down jsdom, but I can't find anyone else
    that's had the problem. One other thought is that I'm running in a virtual
    machine. I'm wondering if the contextify build isn't getting created
    correctly which results in the segfault.



    I wonder if those do similar hacks -- do either of those use contextify?

    Aria
    --
    Job board: http://jobs.nodejs.org/
    New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
    Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    To post to this group, send email to nodejs@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/f59658dd-2cba-4dbe-aa50-f31b1a1aaadf%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedNov 23, '14 at 7:09p
activeNov 23, '14 at 8:29p
posts3
users2
websitenodejs.org
irc#node.js

2 users in discussion

Nael Alismail: 2 posts Aria Stewart: 1 post

People

Translate

site design / logo © 2022 Grokbase