{"action":"created","issue":{"url":"https://api.github.com/repos/js-platform/node-webrtc/issues/345","repository_url":"https://api.github.com/repos/js-platform/node-webrtc","labels_url":"https://api.github.com/repos/js-platform/node-webrtc/issues/345/labels{/name}","comments_url":"https://api.github.com/repos/js-platform/node-webrtc/issues/345/comments","events_url":"https://api.github.com/repos/js-platform/node-webrtc/issues/345/events","html_url":"https://github.com/js-platform/node-webrtc/issues/345","id":285092552,"number":345,"title":"SIGSEGV in 0.0.64-0.0.65","user":{"login":"nazar-pc","id":928965,"avatar_url":"https://avatars0.githubusercontent.com/u/928965?v=4","gravatar_id":"","url":"https://api.github.com/users/nazar-pc","html_url":"https://github.com/nazar-pc","followers_url":"https://api.github.com/users/nazar-pc/followers","following_url":"https://api.github.com/users/nazar-pc/following{/other_user}","gists_url":"https://api.github.com/users/nazar-pc/gists{/gist_id}","starred_url":"https://api.github.com/users/nazar-pc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nazar-pc/subscriptions","organizations_url":"https://api.github.com/users/nazar-pc/orgs","repos_url":"https://api.github.com/users/nazar-pc/repos","events_url":"https://api.github.com/users/nazar-pc/events{/privacy}","received_events_url":"https://api.github.com/users/nazar-pc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2017-12-29T13:22:44Z","updated_at":"2018-02-06T19:20:01Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"There is still some memory-related issue which very rarely happens for me locally and sometimes on CI:\r\n```\r\nPID 16417 received SIGSEGV for address: 0x0\r\n/web/github/detox-core/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x1b19)[0x7f8c20d34b19]\r\n/lib/x86_64-linux-gnu/libpthread.so.0(+0x13150)[0x7f8c2332e150]\r\nnode(_ZN2v86Object3GetENS_5LocalINS_5ValueEEE+0xa)[0xaf766a]\r\n/web/github/detox-core/node_modules/wrtc/build/wrtc/v0.0.64/Release/node-v59-linux-x64/wrtc.node(_ZN11node_webrtc14PeerConnection3RunEP10uv_async_si+0x5a4)[0x7f8c201953a4]\r\nnode[0x1418ceb]\r\nnode[0x142abd8]\r\nnode(uv_run+0x156)[0x1419676]\r\nnode(_ZN4node5StartEP9uv_loop_siPKPKciS5_+0x4dd)[0x11fca6d]\r\nnode(_ZN4node5StartEiPPc+0x153)[0x11f93e3]\r\n/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f8c22f5c1c1]\r\nnode[0x89c371]\r\n```\r\n\r\nI'm currently investigating where and why it happens.\r\n\r\nI have no idea what I'm doing, but here is what I've got with gdb:\r\n```\r\n...\r\nThread 1 \"node\" received signal SIGSEGV, Segmentation fault.\r\n0x0000000000af766a in v8::Object::Get(v8::Local<v8::Value>) ()\r\n(gdb) backtrace\r\n#0  0x0000000000af766a in v8::Object::Get(v8::Local<v8::Value>) ()\r\n#1  0x00007fffe444d4d9 in node_webrtc::PeerConnection::Run (handle=0x23861e8, status=0) at ../src/peerconnection.cc:145\r\n#2  0x0000000001418ceb in ?? ()\r\n#3  0x000000000142abd8 in ?? ()\r\n#4  0x0000000001419676 in uv_run ()\r\n#5  0x00000000011fca6d in node::Start(uv_loop_s*, int, char const* const*, int, char const* const*) ()\r\n#6  0x00000000011f93e3 in node::Start(int, char**) ()\r\n#7  0x00007ffff6af81c1 in __libc_start_main (main=0x89a210 <main>, argc=2, argv=0x7fffffffe4b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe4a8) at ../csu/libc-start.c:308\r\n#8  0x000000000089c371 in _start ()\r\n(gdb) frame 1\r\n#1  0x00007fffe444d4d9 in node_webrtc::PeerConnection::Run (handle=0x23861e8, status=0) at ../src/peerconnection.cc:145\r\n145           Local<Function> callback = Local<Function>::Cast(pc->Get(Nan::New(\"oniceconnectionstatechange\").ToLocalChecked()));\r\n(gdb) print pc\r\n$1 = {val_ = 0x0}\r\n(gdb) print data->state\r\n$4 = 6\r\n```\r\n\r\nLine 145 is:\r\n```c\r\n      Local<Function> callback = Local<Function>::Cast(pc->Get(Nan::New(\"oniceconnectionstatechange\").ToLocalChecked()));\r\n```\r\n\r\nI think this should give enough information for fixing the issue."},"comment":{"url":"https://api.github.com/repos/js-platform/node-webrtc/issues/comments/363534565","html_url":"https://github.com/js-platform/node-webrtc/issues/345#issuecomment-363534565","issue_url":"https://api.github.com/repos/js-platform/node-webrtc/issues/345","id":363534565,"user":{"login":"markandrus","id":359154,"avatar_url":"https://avatars3.githubusercontent.com/u/359154?v=4","gravatar_id":"","url":"https://api.github.com/users/markandrus","html_url":"https://github.com/markandrus","followers_url":"https://api.github.com/users/markandrus/followers","following_url":"https://api.github.com/users/markandrus/following{/other_user}","gists_url":"https://api.github.com/users/markandrus/gists{/gist_id}","starred_url":"https://api.github.com/users/markandrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markandrus/subscriptions","organizations_url":"https://api.github.com/users/markandrus/orgs","repos_url":"https://api.github.com/users/markandrus/repos","events_url":"https://api.github.com/users/markandrus/events{/privacy}","received_events_url":"https://api.github.com/users/markandrus/received_events","type":"User","site_admin":false},"created_at":"2018-02-06T19:20:01Z","updated_at":"2018-02-06T19:20:01Z","author_association":"CONTRIBUTOR","body":"Hey @nazar-pc, I have a feeling there are some real segfaults; however, I saw that same FindConstraint segfault when I mistakenly built with a version of g++ newer than 4.8. libwebrtc is built with 4.8, and if you don't build with that version (or, I think, set `_GLIBCXX_USE_CXX11_ABI` to the correct value with a newer version), you will get such an issue. (I should try to document this and add it to CMakeLists.txt, if possible; something similar existing in binding.gyp.)\r\n\r\nOnce the CPU bug is fixed, I'll start testing for these issues with large numbers of RTCPeerConnections, since I think large numbers tends to bring it out—similar to your detox-core tests?"}}
{"actor":{"display_login":"markandrus"}}