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

Can't use edge with Node 0.12.7 and Mono 4.0.2 #305

rudism opened this issue Aug 7, 2015 · 4 comments

Can't use edge with Node 0.12.7 and Mono 4.0.2 #305

rudism opened this issue Aug 7, 2015 · 4 comments


Copy link

@rudism rudism commented Aug 7, 2015

I'm on Arch Linux with Node, NPM, and Mono installed from the standard Arch repo, latest versions as of 8/7/15.

$ node --version
$ npm --version
$ node-gyp --version
$ mono --version
Mono JIT compiler version 4.0.2 (Stable Mon Jul 13 18:57:35 UTC 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors.
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen

I have a very simple test project set up. Here is the package.json file:

  "name": "edge-test",
  "version": "1.0.0",
  "description": "testing edgejs",
  "dependencies": {
    "edge": "^0.10.1"

Here is my app.js file:

console.log('before require');
var edge = require('edge');
console.log('after require');

There are no apparent problems when doing an npm install:

$ npm install
npm WARN package.json edge-test@1.0.0 No repository field.
npm WARN package.json edge-test@1.0.0 No README data
npm WARN package.json edge-test@1.0.0 No license field.
> edge@0.10.1 install /home/rudism/source/test-edge/node_modules/edge
> node tools/install.js

make: Entering directory '/home/rudism/source/test-edge/node_modules/edge/build'
  CXX(target) Release/
  CXX(target) Release/
  CXX(target) Release/
  CXX(target) Release/
  CXX(target) Release/
  CXX(target) Release/
  CXX(target) Release/
  CXX(target) Release/
  CXX(target) Release/
  CXX(target) Release/
  CXX(target) Release/
  SOLINK_MODULE(target) Release/
  COPY Release/edge.node
  ACTION binding_gyp_build_managed_target_compile_mono_embed src/mono/monoembedding.exe
  TOUCH Release/
make: Leaving directory '/home/rudism/source/test-edge/node_modules/edge/build'
edge@0.10.1 node_modules/edge
├── edge-cs@0.2.7
└── nan@1.9.0

However, running the app produces the following error:

$ node app.js
before require

Native stacktrace:

        /usr/lib/ [0x7f86097750ba]
        /usr/lib/ [0x7f86096ea880]
        /usr/lib/ [0x7f860c4ae660]
        /usr/lib/ [0x7f86098e5690]
        /usr/lib/ [0x7f86098edb48]
        /usr/lib/ [0x7f86098e6b8f]
        /usr/lib/ [0x7f86098e5f58]
        /usr/lib/ [0x7f86098dcbb8]
        /usr/lib/ [0x7f86098dd4a1]
        /usr/lib/ [0x7f86098e7aba]
        /usr/lib/ [0x7f86098e7bde]
        /usr/lib/ [0x7f860989dd01]
        /usr/lib/ [0x7f86098723fc]
        /usr/lib/ [0x7f86096ebb56]
        /home/rudism/source/test-edge/node_modules/edge/build/Release/edge.node(_ZN13MonoEmbedding10InitializeEv+0x81) [0x7f8609c410c1]
        /home/rudism/source/test-edge/node_modules/edge/build/Release/edge.node(_Z4initN2v86HandleINS_6ObjectEEE+0x47) [0x7f8609c40f97]
        node(_ZN4node6DLOpenERKN2v820FunctionCallbackInfoINS0_5ValueEEE+0x2dd) [0x96de7d]
        node(_ZN2v88internal25FunctionCallbackArguments4CallEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEE+0xaa) [0x5f3aaa]
        node() [0x610a69]

Debug info from gdb:

No threads.

Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

Aborted (core dumped)

If there's any other information I can provide to help identify the cause of this problem, please let me know.


This comment has been minimized.

Copy link

@khalidsalomao khalidsalomao commented Sep 1, 2015

Hi rudism,

I haven't used edge on linux yet, but I have some experience with mono on linux and there was a recent bug in mono that was fixed in kernel 3.13.0-54-generic.

This bug caused apps with threading to crash without explicit reason. So you could try to update your kernel! (It is a long shot... but could be it...)

Some references:


This comment has been minimized.

Copy link

@rudism rudism commented Sep 1, 2015

I'm not sure that's it. The Arch machine I'm reproducing it on is up to kernel 4.1.6, but I have a Centos7 box on kernel 3.10.0 where edge is working just fine. I thought at first it might be related to the node version, but it looks like they're both on 0.12.7 now and still only the one works.

Mono in general on my Arch system is stable (I'm neck-deep in it all day long every day for work), there's just something strange going on that breaks edge.

(I should note that I have two independant Arch machines and this problem occurs on both of them, so it's probably not something I specifically broke in my particular environment.)


This comment has been minimized.

Copy link

@tjanczuk tjanczuk commented Sep 25, 2015

Support for Node.js 4.x just shipped (edge@4.0.0). It runs on Mono Does this fix your issue?


This comment has been minimized.

Copy link

@JPMenezes JPMenezes commented Jul 20, 2017

Hi Tomasz,

I'm having this same problem on Arch Linux:
node v8.1.4
(had to apply this fix: #559)
kernel 4.11.9
mono 5.0.0

Any suggestion/fix for this?

Thank you.

So I tried the Docker image and it works. I also tried creating the Docker image by myself with the Dockerfile but I had (SIGSEGV) problems so I started testing multiple combinations of edge, mono and node.

My conclusions are:

  • node is not the problem. 8.2.0 is the latest version on Arch and is working fine.
  • edge must be installed ("npm install edge") with mono but I can install afterwards and use DLLs compiled with it. mono 5.0.0, the latest version on Arch, is not an option yet. Note: I downloaded the "old" mono packages for Arch from
  • "npm install edge" fails and the manual fix (#559) is required. This means that after running "npm install edge" the project.csproj file must be placed on the lib/bootstrap/ folder and edge installation must be continued manually with "node tools/install.js"

The following steps should work for an Arch Linux user, assuming the existence of a project.csproj file on ~/edge folder with the contents of the Project element as described by (here: #559):

sudo pacman -U ~/Downloads/mono-
npm install edge
cd node_modules/edge
cp ~/edge/project.csproj lib/bootstrap/
sudo pacman -U ~/Downloads/mono-
node tools/install.js
cd samples/
node 101_hello_lambda.js

Compiling the Sample105.cs file and running the 105_add7_dll.js sample that "edges" the generated DLL file also work:

curl > Sample105.cs
mcs -sdk:4.5 Sample105.cs -target:library
node 105_add7_dll.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.