tjanczuk / edge

Run .NET and Node.js code in-process on Windows, MacOS, and Linux
http://tjanczuk.github.io/edge
Other
5.41k stars 641 forks source link

SIGSEGV while requiring module in meteor js #231

Closed kjami closed 1 month ago

kjami commented 9 years ago

Hi,

Thanks for the good work. I have been using edge module to call c# methods in a dll. I have successfully been able to call c# methods using edge in node js application. Since our company is using MeteorJS, and it only supports Npm modules inside Meteor packages, I have created a local meteor package and used Meteor's Npm.depends and Npm.require to get the edge npm module. But when I run the project I get the following stack trace and the meteor application is restarting. I have no idea what the stack trace is all about. Can you please look into this stack trace and let me know if I can do anything to avoid this issue.

I have tested other npm modules just to make sure that it is not the problem of accessing npm modules itself.

Stack Trace:

W20150127-16:12:23.928(8)? (STDERR)           
W20150127-16:12:23.930(8)? (STDERR) Native stacktrace:
W20150127-16:12:23.930(8)? (STDERR) 
W20150127-16:12:23.930(8)? (STDERR) 
W20150127-16:12:23.930(8)? (STDERR) Debug info from gdb:
W20150127-16:12:23.930(8)? (STDERR) 
W20150127-16:12:24.905(8)? (STDERR) (lldb) command source -s 0 '/tmp/mono-gdb-commands.ZfFf2s'
W20150127-16:12:24.905(8)? (STDERR) Executing commands in '/private/tmp/mono-gdb-commands.ZfFf2s'.
W20150127-16:12:24.905(8)? (STDERR) (lldb) process attach --pid 5763
W20150127-16:12:27.640(8)? (STDERR) Process 5763 stopped
W20150127-16:12:27.640(8)? (STDERR) Executable module set to "/Users/kishorj/.meteor/packages/meteor-tool/.1.0.40.1ea2549++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/bin/node".
W20150127-16:12:27.640(8)? (STDERR) Architecture set to: x86_64-apple-macosx.
W20150127-16:12:27.640(8)? (STDERR) (lldb) thread list
W20150127-16:12:27.677(8)? (STDERR) Process 5763 stopped
W20150127-16:12:27.677(8)? (STDERR) * thread #1: tid = 0x1b93f, 0x00007fff932b28fe libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
W20150127-16:12:27.677(8)? (STDERR)   thread #2: tid = 0x1b940, 0x00007fff932ad52e libsystem_kernel.dylib`mach_msg_trap + 10
W20150127-16:12:27.677(8)? (STDERR)   thread #3: tid = 0x1b941, 0x00007fff932b322e libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
W20150127-16:12:27.677(8)? (STDERR)   thread #4: tid = 0x1b942, 0x00007fff932ad56a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'SamplerThread'
W20150127-16:12:27.677(8)? (STDERR)   thread #5: tid = 0x1b945, 0x00007fff932b2132 libsystem_kernel.dylib`__psynch_cvwait + 10
W20150127-16:12:27.678(8)? (STDERR)   thread #6: tid = 0x1b946, 0x00007fff932b2132 libsystem_kernel.dylib`__psynch_cvwait + 10
W20150127-16:12:27.678(8)? (STDERR)   thread #7: tid = 0x1b947, 0x00007fff932b2132 libsystem_kernel.dylib`__psynch_cvwait + 10
W20150127-16:12:27.678(8)? (STDERR)   thread #8: tid = 0x1b948, 0x00007fff932b2132 libsystem_kernel.dylib`__psynch_cvwait + 10
W20150127-16:12:27.678(8)? (STDERR) (lldb) thread backtrace all
W20150127-16:12:27.695(8)? (STDERR) * thread #1: tid = 0x1b93f, 0x00007fff932b28fe libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
W20150127-16:12:27.695(8)? (STDERR)   * frame #0: 0x00007fff932b28fe libsystem_kernel.dylib`__wait4 + 10
W20150127-16:12:27.695(8)? (STDERR)     frame #1: 0x000000010459e5d9 libmonoboehm-2.0.1.dylib`mono_handle_native_sigsegv + 421
W20150127-16:12:27.695(8)? (STDERR)     frame #2: 0x000000010450deb3 libmonoboehm-2.0.1.dylib`mono_sigsegv_signal_handler + 194
W20150127-16:12:27.696(8)? (STDERR)     frame #3: 0x00007fff8d7c8f1a libsystem_platform.dylib`_sigtramp + 26
W20150127-16:12:27.696(8)? (STDERR)     frame #4: 0x00000001046ec8ae libmonoboehm-2.0.1.dylib`GC_push_all_eager + 64
W20150127-16:12:27.696(8)? (STDERR)     frame #5: 0x00000001046f2b1f libmonoboehm-2.0.1.dylib`GC_push_all_stacks + 409
W20150127-16:12:27.696(8)? (STDERR)     frame #6: 0x00000001046eb6af libmonoboehm-2.0.1.dylib`GC_mark_some + 417
W20150127-16:12:27.696(8)? (STDERR)     frame #7: 0x00000001046e561e libmonoboehm-2.0.1.dylib`GC_stopped_mark + 230
W20150127-16:12:27.697(8)? (STDERR)     frame #8: 0x00000001046e546a libmonoboehm-2.0.1.dylib`GC_try_to_collect_inner + 336
W20150127-16:12:27.697(8)? (STDERR)     frame #9: 0x00000001046edebe libmonoboehm-2.0.1.dylib`GC_init_inner + 755
W20150127-16:12:27.697(8)? (STDERR)     frame #10: 0x00000001046edbb2 libmonoboehm-2.0.1.dylib`GC_init + 30
W20150127-16:12:27.697(8)? (STDERR)     frame #11: 0x00000001046b0b58 libmonoboehm-2.0.1.dylib`mono_gc_base_init + 72
W20150127-16:12:27.697(8)? (STDERR)     frame #12: 0x000000010468954a libmonoboehm-2.0.1.dylib`mono_init_internal + 152
W20150127-16:12:27.697(8)? (STDERR)     frame #13: 0x000000010450e92c libmonoboehm-2.0.1.dylib`mini_init + 1651
W20150127-16:12:27.697(8)? (STDERR)     frame #14: 0x0000000102fa7699 edge.node`MonoEmbedding::Initialize() + 167
W20150127-16:12:27.697(8)? (STDERR)     frame #15: 0x0000000102fa750c edge.node`init(v8::Handle) + 41
W20150127-16:12:27.698(8)? (STDERR)     frame #16: 0x00000001003cbafe node`node::DLOpen(v8::Arguments const&) + 669
W20150127-16:12:27.698(8)? (STDERR)     frame #17: 0x000000010014f58b node`v8::internal::Builtin_HandleApiCall(v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>, v8::internal::Isolate*) + 459
W20150127-16:12:27.698(8)? (STDERR)     frame #18: 0x00000dfbe500618e
W20150127-16:12:27.698(8)? (STDERR)     frame #19: 0x00000dfbe5059e76
W20150127-16:12:27.698(8)? (STDERR)     frame #20: 0x00000dfbe5049287
W20150127-16:12:27.698(8)? (STDERR)     frame #21: 0x00000dfbe500a96e
W20150127-16:12:27.698(8)? (STDERR)     frame #22: 0x00000dfbe5325c28
W20150127-16:12:27.698(8)? (STDERR)     frame #23: 0x00000dfbe53f48f7
W20150127-16:12:27.699(8)? (STDERR)     frame #24: 0x00000dfbe56172c0
W20150127-16:12:27.699(8)? (STDERR)     frame #25: 0x00000dfbe502851e
W20150127-16:12:27.699(8)? (STDERR)     frame #26: 0x00000dfbe5062ff0
W20150127-16:12:27.699(8)? (STDERR)     frame #27: 0x00000dfbe505dd85
W20150127-16:12:27.699(8)? (STDERR)     frame #28: 0x00000dfbe5059e76
W20150127-16:12:27.699(8)? (STDERR)     frame #29: 0x00000dfbe5049287
W20150127-16:12:27.699(8)? (STDERR)     frame #30: 0x00000dfbe500a96e
W20150127-16:12:27.699(8)? (STDERR)     frame #31: 0x00000dfbe5325c28
W20150127-16:12:27.700(8)? (STDERR)     frame #32: 0x00000dfbe5063949
W20150127-16:12:27.700(8)? (STDERR)     frame #33: 0x00000dfbe50ad9aa
W20150127-16:12:27.700(8)? (STDERR)     frame #34: 0x00000dfbe56168ee
W20150127-16:12:27.700(8)? (STDERR)     frame #35: 0x00000dfbe5616604
W20150127-16:12:27.700(8)? (STDERR)     frame #36: 0x00000dfbe56166fe
W20150127-16:12:27.700(8)? (STDERR)     frame #37: 0x00000dfbe50a475f
W20150127-16:12:27.700(8)? (STDERR)     frame #38: 0x00000dfbe500a96e
W20150127-16:12:27.701(8)? (STDERR)     frame #39: 0x00000dfbe505412a
W20150127-16:12:27.701(8)? (STDERR)     frame #40: 0x00000dfbe5075547
W20150127-16:12:27.701(8)? (STDERR)     frame #41: 0x00000dfbe500a96e
W20150127-16:12:27.701(8)? (STDERR)     frame #42: 0x00000dfbe50a3d7d
W20150127-16:12:27.701(8)? (STDERR)     frame #43: 0x00000dfbe50245e7
W20150127-16:12:27.701(8)? (STDERR)     frame #44: 0x00000dfbe50118b7
W20150127-16:12:27.701(8)? (STDERR)     frame #45: 0x00000001001801fd node`v8::internal::Invoke(bool, v8::internal::Handle, v8::internal::Handle, int, v8::internal::Handle*, bool*) + 445
W20150127-16:12:27.702(8)? (STDERR)     frame #46: 0x000000010012780e node`v8::Function::Call(v8::Handle, int, v8::Handle*) + 462
W20150127-16:12:27.702(8)? (STDERR)     frame #47: 0x0000000100bf3334 fibers.node`Fiber::RunFiber(void**) + 276
W20150127-16:12:27.702(8)? (STDERR)     frame #48: 0x0000000100bf3c7d fibers.node`Coroutine::trampoline(void*) + 29
W20150127-16:12:27.702(8)? (STDERR)     frame #49: 0x0000000100bf4b52 fibers.node`coro_init + 66
W20150127-16:12:27.702(8)? (STDERR)     frame #50: 0x0000000100bf4915 fibers.node`trampoline + 37
W20150127-16:12:27.702(8)? (STDERR)     frame #51: 0x00007fff8d7c8f2d libsystem_platform.dylib`_sigtramp + 45
W20150127-16:12:27.702(8)? (STDERR)     frame #52: 0x00007fff932b2727 libsystem_kernel.dylib`__sigsuspend + 11
W20150127-16:12:27.702(8)? (STDERR)     frame #53: 0x00007fff92b34289 libsystem_malloc.dylib`szone_malloc_should_clear + 1142
W20150127-16:12:27.703(8)? (STDERR) 
W20150127-16:12:27.703(8)? (STDERR)   thread #2: tid = 0x1b940, 0x00007fff932ad52e libsystem_kernel.dylib`mach_msg_trap + 10
W20150127-16:12:27.703(8)? (STDERR)     frame #0: 0x00007fff932ad52e libsystem_kernel.dylib`mach_msg_trap + 10
W20150127-16:12:27.703(8)? (STDERR)     frame #1: 0x00007fff932ac69f libsystem_kernel.dylib`mach_msg + 55
W20150127-16:12:27.703(8)? (STDERR)     frame #2: 0x00007fff94161b14 CoreFoundation`__CFRunLoopServiceMachPort + 212
W20150127-16:12:27.703(8)? (STDERR)     frame #3: 0x00007fff94160fdb CoreFoundation`__CFRunLoopRun + 1371
W20150127-16:12:27.703(8)? (STDERR)     frame #4: 0x00007fff94160838 CoreFoundation`CFRunLoopRunSpecific + 296
W20150127-16:12:27.703(8)? (STDERR)     frame #5: 0x00007fff94216ed1 CoreFoundation`CFRunLoopRun + 97
W20150127-16:12:27.704(8)? (STDERR)     frame #6: 0x00000001004205a4 node`uv__cf_loop_runner + 67
W20150127-16:12:27.704(8)? (STDERR)     frame #7: 0x0000000100414a82 node`uv__thread_start + 25
W20150127-16:12:27.704(8)? (STDERR)     frame #8: 0x00007fff8ec1f2fc libsystem_pthread.dylib`_pthread_body + 131
W20150127-16:12:27.704(8)? (STDERR)     frame #9: 0x00007fff8ec1f279 libsystem_pthread.dylib`_pthread_start + 176
W20150127-16:12:27.704(8)? (STDERR)     frame #10: 0x00007fff8ec1d4b1 libsystem_pthread.dylib`thread_start + 13
W20150127-16:12:27.704(8)? (STDERR) 
W20150127-16:12:27.704(8)? (STDERR)   thread #3: tid = 0x1b941, 0x00007fff932b322e libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
W20150127-16:12:27.704(8)? (STDERR)     frame #0: 0x00007fff932b322e libsystem_kernel.dylib`kevent64 + 10
W20150127-16:12:27.705(8)? (STDERR)     frame #1: 0x00007fff9337bd91 libdispatch.dylib`_dispatch_mgr_invoke + 247
W20150127-16:12:27.705(8)? (STDERR)     frame #2: 0x00007fff9337ba6a libdispatch.dylib`_dispatch_mgr_thread + 52
W20150127-16:12:27.705(8)? (STDERR) 
W20150127-16:12:27.705(8)? (STDERR)   thread #4: tid = 0x1b942, 0x00007fff932ad56a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'SamplerThread'
W20150127-16:12:27.705(8)? (STDERR)     frame #0: 0x00007fff932ad56a libsystem_kernel.dylib`semaphore_wait_trap + 10
W20150127-16:12:27.706(8)? (STDERR)     frame #1: 0x00000001003c4348 node`v8::internal::MacOSSemaphore::Wait() + 24
W20150127-16:12:27.706(8)? (STDERR)     frame #2: 0x00000001002d7ba7 node`v8::internal::RuntimeProfilerRateLimiter::SuspendIfNecessary() + 119
W20150127-16:12:27.706(8)? (STDERR)     frame #3: 0x00000001003c43f8 node`v8::internal::SamplerThread::Run() + 56
W20150127-16:12:27.706(8)? (STDERR)     frame #4: 0x00000001003c3c1c node`v8::internal::ThreadEntry(void*) + 60
W20150127-16:12:27.706(8)? (STDERR)     frame #5: 0x00007fff8ec1f2fc libsystem_pthread.dylib`_pthread_body + 131
W20150127-16:12:27.706(8)? (STDERR)     frame #6: 0x00007fff8ec1f279 libsystem_pthread.dylib`_pthread_start + 176
W20150127-16:12:27.706(8)? (STDERR)     frame #7: 0x00007fff8ec1d4b1 libsystem_pthread.dylib`thread_start + 13
W20150127-16:12:27.706(8)? (STDERR) 
W20150127-16:12:27.707(8)? (STDERR)   thread #5: tid = 0x1b945, 0x00007fff932b2132 libsystem_kernel.dylib`__psynch_cvwait + 10
W20150127-16:12:27.708(8)? (STDERR)     frame #0: 0x00007fff932b2132 libsystem_kernel.dylib`__psynch_cvwait + 10
W20150127-16:12:27.708(8)? (STDERR)     frame #1: 0x00007fff8ec1fea0 libsystem_pthread.dylib`_pthread_cond_wait + 693
W20150127-16:12:27.708(8)? (STDERR)     frame #2: 0x000000010041dd76 node`uv_cond_wait + 9
W20150127-16:12:27.708(8)? (STDERR)     frame #3: 0x000000010041e573 node`worker + 208
W20150127-16:12:27.708(8)? (STDERR)     frame #4: 0x0000000100414a82 node`uv__thread_start + 25
W20150127-16:12:27.709(8)? (STDERR)     frame #5: 0x00007fff8ec1f2fc libsystem_pthread.dylib`_pthread_body + 131
W20150127-16:12:27.710(8)? (STDERR)     frame #6: 0x00007fff8ec1f279 libsystem_pthread.dylib`_pthread_start + 176
W20150127-16:12:27.711(8)? (STDERR)     frame #7: 0x00007fff8ec1d4b1 libsystem_pthread.dylib`thread_start + 13
W20150127-16:12:27.711(8)? (STDERR) 
W20150127-16:12:27.712(8)? (STDERR)   thread #6: tid = 0x1b946, 0x00007fff932b2132 libsystem_kernel.dylib`__psynch_cvwait + 10
W20150127-16:12:27.712(8)? (STDERR)     frame #0: 0x00007fff932b2132 libsystem_kernel.dylib`__psynch_cvwait + 10
W20150127-16:12:27.712(8)? (STDERR)     frame #1: 0x00007fff8ec1fea0 libsystem_pthread.dylib`_pthread_cond_wait + 693
W20150127-16:12:27.712(8)? (STDERR)     frame #2: 0x000000010041dd76 node`uv_cond_wait + 9
W20150127-16:12:27.713(8)? (STDERR)     frame #3: 0x000000010041e573 node`worker + 208
W20150127-16:12:27.713(8)? (STDERR)     frame #4: 0x0000000100414a82 node`uv__thread_start + 25
W20150127-16:12:27.713(8)? (STDERR)     frame #5: 0x00007fff8ec1f2fc libsystem_pthread.dylib`_pthread_body + 131
W20150127-16:12:27.713(8)? (STDERR)     frame #6: 0x00007fff8ec1f279 libsystem_pthread.dylib`_pthread_start + 176
W20150127-16:12:27.713(8)? (STDERR)     frame #7: 0x00007fff8ec1d4b1 libsystem_pthread.dylib`thread_start + 13
W20150127-16:12:27.714(8)? (STDERR) 
W20150127-16:12:27.714(8)? (STDERR)   thread #7: tid = 0x1b947, 0x00007fff932b2132 libsystem_kernel.dylib`__psynch_cvwait + 10
W20150127-16:12:27.714(8)? (STDERR)     frame #0: 0x00007fff932b2132 libsystem_kernel.dylib`__psynch_cvwait + 10
W20150127-16:12:27.723(8)? (STDERR)     frame #1: 0x00007fff8ec1fea0 libsystem_pthread.dylib`_pthread_cond_wait + 693
W20150127-16:12:27.724(8)? (STDERR)     frame #2: 0x000000010041dd76 node`uv_cond_wait + 9
W20150127-16:12:27.724(8)? (STDERR)     frame #3: 0x000000010041e573 node`worker + 208
W20150127-16:12:27.726(8)? (STDERR)     frame #4: 0x0000000100414a82 node`uv__thread_start + 25
W20150127-16:12:27.726(8)? (STDERR)     frame #5: 0x00007fff8ec1f2fc libsystem_pthread.dylib`_pthread_body + 131
W20150127-16:12:27.726(8)? (STDERR)     frame #6: 0x00007fff8ec1f279 libsystem_pthread.dylib`_pthread_start + 176
W20150127-16:12:27.726(8)? (STDERR)     frame #7: 0x00007fff8ec1d4b1 libsystem_pthread.dylib`thread_start + 13
W20150127-16:12:27.726(8)? (STDERR) 
W20150127-16:12:27.726(8)? (STDERR)   thread #8: tid = 0x1b948, 0x00007fff932b2132 libsystem_kernel.dylib`__psynch_cvwait + 10
W20150127-16:12:27.727(8)? (STDERR)     frame #0: 0x00007fff932b2132 libsystem_kernel.dylib`__psynch_cvwait + 10
W20150127-16:12:27.727(8)? (STDERR)     frame #1: 0x00007fff8ec1fea0 libsystem_pthread.dylib`_pthread_cond_wait + 693
W20150127-16:12:27.727(8)? (STDERR)     frame #2: 0x000000010041dd76 node`uv_cond_wait + 9
W20150127-16:12:27.727(8)? (STDERR)     frame #3: 0x000000010041e573 node`worker + 208
W20150127-16:12:27.727(8)? (STDERR)     frame #4: 0x0000000100414a82 node`uv__thread_start + 25
W20150127-16:12:27.727(8)? (STDERR)     frame #5: 0x00007fff8ec1f2fc libsystem_pthread.dylib`_pthread_body + 131
W20150127-16:12:27.728(8)? (STDERR)     frame #6: 0x00007fff8ec1f279 libsystem_pthread.dylib`_pthread_start + 176
W20150127-16:12:27.728(8)? (STDERR)     frame #7: 0x00007fff8ec1d4b1 libsystem_pthread.dylib`thread_start + 13
W20150127-16:12:27.728(8)? (STDERR) (lldb) detach
W20150127-16:12:27.728(8)? (STDERR) 
W20150127-16:12:27.728(8)? (STDERR) =================================================================
W20150127-16:12:27.728(8)? (STDERR) Got a SIGSEGV while executing native code. This usually indicates
W20150127-16:12:27.729(8)? (STDERR) a fatal error in the mono runtime or one of the native libraries 
W20150127-16:12:27.729(8)? (STDERR) used by your application.
W20150127-16:12:27.729(8)? (STDERR) =================================================================
W20150127-16:12:27.729(8)? (STDERR) 
W20150127-16:12:27.729(8)? (STDERR) Process 5763 detached
W20150127-16:12:27.729(8)? (STDERR) (lldb) quit
W20150127-16:12:27.729(8)? (STDERR) (lldb) XR1L

Please let me know if you want more information. Thanks.

cristiandley commented 9 years ago

@kjami Im Having the same issue, have you found any solution to this issue? @tjanczuk Have you had this issue ?

thanks guys!

kjami commented 9 years ago

Hi Cristian,

No, I didn't find any solution for this. I avoided using edge and developed local meteor package that does the same thing as .Net library that I was supposed to use. In my case, I only need few methods of the library and it took me less than a week to replicate all of them. It is optimum for our company because we avoid other issues like installing mono on linux to deploy the application and the main advantage is even if there are bugs in the new code at a later date, we can solve them unlike issues like the current one, which anyone in our company doesn't have any idea about.

Nevertheless, I like Edge when used with Node.

Regards, Kishor Jami.

On Thu, Mar 5, 2015 at 1:56 AM, Cristian Leyes notifications@github.com wrote:

@kjami https://github.com/kjami Im Having the same issue, have you found any solution to this issue?

— Reply to this email directly or view it on GitHub https://github.com/tjanczuk/edge/issues/231#issuecomment-77209723.

Kishor Jami