{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/795acba3ecda5352f28a3b0cbee3fd16?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"795acba3ecda5352f28a3b0cbee3fd16","url":"https://api.github.com/users/ncb000gt","login":"ncb000gt","id":62615},"milestone":null,"assignee":null,"updated_at":"2011-11-07T14:03:33Z","labels":[],"comments":7,"closed_at":null,"url":"https://api.github.com/repos/ncb000gt/node.bcrypt.js/issues/32","body":"I haven't been able to trace roots yet, but I wanted to capture what I've found.\r\n\r\nI created https://gist.github.com/1187800 script to just blast async gen_salt calls through. This causes a segfault. I traced it down with gdb and node_g and consistently got:\r\n\r\n      (gdb) run test.js\r\n      Starting program: /usr/local/bin/node_g test.js\r\n      [Thread debugging using libthread_db enabled]\r\n      [New Thread 0x7ffff627f700 (LWP 885)]\r\n      [New Thread 0x7ffff7f39700 (LWP 886)]\r\n      [New Thread 0x7ffff7ef8700 (LWP 887)]\r\n      [New Thread 0x7ffff7eb7700 (LWP 888)]\r\n      [New Thread 0x7ffff7e76700 (LWP 889)]\r\n      \r\n      Program received signal SIGSEGV, Segmentation fault.\r\n      [Switching to Thread 0x7ffff7e76700 (LWP 889)]\r\n      sha1_block_data_order () at sha1-x86_64.s:81\r\n      81\tsha1-x86_64.s: No such file or directory.\r\n\t      in sha1-x86_64.s\r\n\r\nI know that it relates to libcrypto because the sha1-x86_64.s bits turn up related to openssl when searching for information. Plus, before I added `libssl-dbg` `gdb` would inform me that `/lib/libcrypto` was the issue.\r\n\r\n      $ ldd build/default/bcrypt_lib.node\r\n      linux-vdso.so.1 =>  (0x00007fff95990000)\r\n      libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x00007fdab5ce6000)\r\n      libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fdab59e0000)\r\n      libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdab575a000)\r\n      libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fdab5544000)\r\n      libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdab51b0000)\r\n      libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00007fdab4e20000)\r\n      /lib64/ld-linux-x86-64.so.2 (0x00007fdab617e000)\r\n      libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdab4c1c000)\r\n      libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fdab4a04000)\r\n\r\nI couldn't find much related other than this is using libcrypto (libssl on ubuntu) 0.9.8.\r\n\r\nThat was about where I ended up tracing this down. Will look more at later.","html_url":"https://github.com/ncb000gt/node.bcrypt.js/issues/32","number":32,"title":"Segfault related to OpenSSL","id":1547939,"created_at":"2011-09-02T03:52:08Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/795acba3ecda5352f28a3b0cbee3fd16?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"795acba3ecda5352f28a3b0cbee3fd16","url":"https://api.github.com/users/ncb000gt","login":"ncb000gt","id":62615},"updated_at":"2011-11-07T14:03:33Z","url":"https://api.github.com/repos/ncb000gt/node.bcrypt.js/issues/comments/2653765","body":"https://github.com/joyent/node/blob/master/src/node_crypto.cc#L4095\r\n\r\n=\\\r\n\r\nYea. This looks to be the exact same issue as above.\r\n\r\n    (gdb) run examples/forever_gen_salt.js\r\n    Starting program: /home/ncampbell/Code/node/node_g examples/forever_gen_salt.js\r\n    [Thread debugging using libthread_db enabled]\r\n    [New Thread 0x7ffff645a700 (LWP 6204)]\r\n    [New Thread 0x7ffff7f12700 (LWP 6205)]\r\n    [New Thread 0x7ffff7ed1700 (LWP 6206)]\r\n    [New Thread 0x7ffff7e90700 (LWP 6207)]\r\n    [New Thread 0x7ffff7e4f700 (LWP 6208)]\r\n\r\n    Program received signal SIGSEGV, Segmentation fault.\r\n    [Switching to Thread 0x7ffff7f12700 (LWP 6205)]\r\n    sha1_block_data_order () at sha1-x86_64.s:186\r\n    186\tsha1-x86_64.s: No such file or directory.\r\n        \tin sha1-x86_64.s\r\n\r\nI don't have time right now. But I'll try to investigate more later tonight or during the week. As a note- there is a possibility that this bug is in libssl and not in node/node.bcrypt.js. It is unlikely, far more likely that we're doing it wrong, but still something to consider...","id":2653765,"created_at":"2011-11-07T14:03:33Z"}}