strongloop / strong-oracle

Deprecated: Node.js Driver for Oracle databases (Use https://github.com/oracle/node-oracledb instead)
Other
45 stars 18 forks source link

Segmentation fault #68

Open iambrandonn opened 8 years ago

iambrandonn commented 8 years ago

I'm receiving a segmentation fault when trying to connect my DB.

PID 28641 received SIGSEGV for address: 0x50
0   segfault-handler.node               0x00000001016f1649 _ZL16segfault_handleriP9__siginfoPv + 329
1   libsystem_platform.dylib            0x00007fff97d8d52a _sigtramp + 26
2   ???                                 0x0000000000000000 0x0 + 0
3   node                                0x0000000100131332 _ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS_13NewStringTypeEi + 98
4   oracle_bindings.node                0x0000000102690390 _ZN12OracleClient16EIO_AfterConnectEP9uv_work_s + 96
5   node                                0x000000010076b2a5 uv__work_done + 178
6   node                                0x000000010076ceb1 uv__async_event + 198
7   node                                0x000000010076d044 uv__async_io + 136
8   node                                0x000000010077bd36 uv__io_poll + 1554
9   node                                0x000000010076d4f7 uv_run + 321
10  node                                0x0000000100649a1f _ZN4node5StartEiPPc + 583
11  node                                0x0000000100001934 start + 52
12  ???                                 0x0000000000000002 0x0 + 2

This is the code I'm running:

var settings = {};
var oracle = require("strong-oracle")(settings);

var connectData = {
  hostname: "localhost",
  user: "my_user",
  password: "my_pass",
  database: "orcl"
};

oracle.connect(connectData, function(err, connection) {
  console.log('connected!');
  connection.close();
});

I am able to connect successfully with SQLDeveloper, node-oracledb, and SQLPlus.

Node version: 4.2.6 strong-oracle: 1.9.0 Instant Client: 12.1.0.2 (64-bit) OS X El Capitan

raymondfeng commented 8 years ago

I cannot reproduce it with instant client 11.2.0.4.0. Did you rebuild strong-oracle with instant client 12.1.0.2? If not, I don't think the module can be loaded.

raymondfeng commented 8 years ago

Hmm, with instant client 12.1.0.2, I started to see:

Segmentation fault: 11

or

ORA-24550: signal received: [si_signo=11] [si_errno=0] [si_code=1] [si_addr=0xffffffffffffffe8]
raymondfeng commented 8 years ago

Now I can reproduce it. strong-oracle seem to be completely broken with 12.1.0.2.

raymondfeng commented 8 years ago

More stacktraces:

PID 10596 received SIGSEGV for address: 0x50
0   segfault-handler.node               0x0000000101af01c8 _ZL16segfault_handleriP9__siginfoPv + 280
1   libsystem_platform.dylib            0x00007fff8de5452a _sigtramp + 26
2   ???                                 0x00007fff5fbf6290 0x0 + 140734799766160
3   node                                0x000000010014ccb2 _ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS_13NewStringTypeEi + 98
4   oracle_bindings.node                0x0000000103517630 _ZN12OracleClient16EIO_AfterConnectEP9uv_work_s + 96
5   node                                0x0000000100912279 uv__work_done + 178
6   node                                0x0000000100913ed8 uv__async_event + 198
7   node                                0x000000010091406b uv__async_io + 136
8   node                                0x0000000100923440 uv__io_poll + 1621
9   node                                0x000000010091451f uv_run + 321
10  node                                0x00000001007e89fd _ZN4node5StartEiPPc + 620
11  node                                0x0000000100000c34 start + 52
12  ???                                 0x0000000000000002 0x0 + 2

PID 10600 received SIGSEGV for address: 0xffffffffffffffe8
0   segfault-handler.node               0x0000000101af01c8 _ZL16segfault_handleriP9__siginfoPv + 280
1   libsystem_platform.dylib            0x00007fff8de5452a _sigtramp + 26
2   oracle_bindings.node                0x0000000104324ae8 _ZStL8__ioinit + 8910
3   oracle_bindings.node                0x000000010431786f _ZN12OracleClient24EIO_CreateConnectionPoolEP9uv_work_s + 89
4   node                                0x0000000100912532 worker + 90
5   node                                0x000000010091e73c uv__thread_start + 25
6   libsystem_pthread.dylib             0x00007fff91bf699d _pthread_body + 131
7   libsystem_pthread.dylib             0x00007fff91bf691a _pthread_body + 0
8   libsystem_pthread.dylib             0x00007fff91bf4351 thread_start + 13
Abort trap: 6
iambrandonn commented 8 years ago

11.2.0.4.0 works for me also.