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

Node.js Version 9.X and 10.X support. #398

Merged
merged 2 commits into from
Nov 5, 2018
Merged

Node.js Version 9.X and 10.X support. #398

merged 2 commits into from
Nov 5, 2018

Conversation

rhtpandeyIN
Copy link
Contributor

  1. Node.js version 9.X support for node-ibm_db
  2. Node.js version 10.X support for node-ibm_db

Resolved issue #396, #387

@alobaidizt
Copy link

Thank you!

@alobaidizt
Copy link

Hello.. When will this PR be merged?

@bimalkjha
Copy link
Member

@alobaidizt We are testing the changes on different platforms to avoid any regression. We'll merge the code soon. Thanks.

@bimalkjha
Copy link
Member

@rhtpandeyIN Currently, I got below result for test files on Mac with node.js 10.1.0. Mostly floating exception. We need to check it.
Running test 1 for [DB2] : test-all-data-types ... success
Running test 2 for [DB2] : test-bad-connection-string ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 3 for [DB2] : test-bad-pool-connection-issue-42 ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 4 for [DB2] : test-basic-test ... success
Running test 5 for [DB2] : test-binding-connection-timeOut ... success
Running test 6 for [DB2] : test-binding-statement-executeSync ... success
Running test 7 for [DB2] : test-binding-transaction-commit ... success
Running test 8 for [DB2] : test-binding-transaction-commitSync ... success
Running test 9 for [DB2] : test-blob-file ... success
Running test 10 for [DB2] : test-blob-insert ... success
Running test 11 for [DB2] : test-blocking-issue210 ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 12 for [DB2] : test-call-async ... success
Running test 13 for [DB2] : test-call-stmt ... success
Running test 14 for [DB2] : test-closed ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 15 for [DB2] : test-connection-object ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 16 for [DB2] : test-date ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 17 for [DB2] : test-describe-column ... success
Running test 18 for [DB2] : test-describe-database ... success
Running test 19 for [DB2] : test-describe-table ... success
Running test 20 for [DB2] : test-domains-open ... success
Running test 21 for [DB2] : test-global-open-close ... success
Running test 22 for [DB2] : test-ibm-db-issue14 ... success
Running test 23 for [DB2] : test-ibm-db-issue17 ... success
Running test 24 for [DB2] : test-ibm-db-issue18 ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 25 for [DB2] : test-instantiate-one-and-end ... success
Running test 26 for [DB2] : test-issue-54 ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 27 for [DB2] : test-issue-get-column-value-2 ... success
Running test 28 for [DB2] : test-issue211 ... success
Running test 29 for [DB2] : test-issue253 ... success
Running test 30 for [DB2] : test-max-pool-size ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 31 for [DB2] : test-memory-leaks-new-objects ... success
Running test 32 for [DB2] : test-multi-open-close ... success
Running test 33 for [DB2] : test-multi-open-query-close ... success
Running test 34 for [DB2] : test-multi-openSync-closeSync ... success
Running test 35 for [DB2] : test-open-close ... success
Running test 36 for [DB2] : test-open-connectTimeout ... success
Running test 37 for [DB2] : test-openSync ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 38 for [DB2] : test-pool-close ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 39 for [DB2] : test-pool-connect ... success
Running test 40 for [DB2] : test-pool-idle-connection ... success
Running test 41 for [DB2] : test-pool-rollbackTransaction ... success
Running test 42 for [DB2] : test-pool-uncommited ... success
Running test 43 for [DB2] : test-prepareSync-bad-sql ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 44 for [DB2] : test-prepareSync-multiple-execution ... success
Running test 45 for [DB2] : test-promisified-connection-pool ... success
Running test 46 for [DB2] : test-query-create-table-fetchSync ... success
Running test 47 for [DB2] : test-query-create-table ... success
Running test 48 for [DB2] : test-query-drop-table ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 49 for [DB2] : test-query-insert ... success
Running test 50 for [DB2] : test-query-select-fetch ... success
Running test 51 for [DB2] : test-query-select-fetchMode-array ... success
Running test 52 for [DB2] : test-query-select ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 53 for [DB2] : test-queryStream ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 54 for [DB2] : test-querySync-select-with-exception ... fail Caught Signal SIGFPE

Stdout:

Stderr:

Running test 55 for [DB2] : test-querySync-select ... success
Running test 56 for [DB2] : test-require-and-end ... success
Running test 57 for [DB2] : test-sp-resultset-execute ... success
Running test 58 for [DB2] : test-sp-resultset ... success
Running test 59 for [DB2] : test-transaction-commit-sync ... success
Running test 60 for [DB2] : test-transaction-commit ... success

Results : 16 of 60 tests failed.

Total execution time = 6 min 2 sec.
BLR-D-MACOS01.local:/Users/bjha/nodework/install/node-ibm_db/test>

@bimalkjha bimalkjha closed this May 14, 2018
@bimalkjha bimalkjha reopened this May 14, 2018
@alobaidizt
Copy link

Thank you @bimakjha for your update! :)

@ukulanne
Copy link

Do y'all need help testing this on AIX? If you point me to directions / instructions can help you with that.

@bimalkjha
Copy link
Member

@ukulanne Yes, please follow below steps:
npm install git+https://github.com/rhtpandeyIN/node-ibm_db.git
cd node_modules/ibm_db/test
vi config.testConnectionStrings.json and update database connection info
node run-tests.js -> It will run all test files. Share the failures if any here.
Thanks.

@ukulanne
Copy link

I was swamped into another project and have not had chance to test this until now:

[panda test]$ node run-tests.js

Warning : there are 23 disabled tests

Running test 1 for [DB2] : test-all-data-types ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 2 for [DB2] : test-bad-connection-string ... success
Running test 3 for [DB2] : test-bad-pool-connection-issue-42 ... fail Caught Signal SIGILL

Stdout:

After first iteration and before start of second iteration,
restart the server using 'db2stop force; db2start' command.

start0

Stderr:

Running test 4 for [DB2] : test-basic-test ... fail Caught Signal SIGILL

Stdout:
Trying to open a connection ...

Stderr:

Running test 5 for [DB2] : test-binding-connection-timeOut ... fail Caught Signal SIGILL

Stdout:
Connecting...

Stderr:

Running test 6 for [DB2] : test-binding-statement-executeSync ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 7 for [DB2] : test-binding-transaction-commit ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 8 for [DB2] : test-binding-transaction-commitSync ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 9 for [DB2] : test-blob-file ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 10 for [DB2] : test-blob-insert ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 11 for [DB2] : test-blocking-issue210 ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 12 for [DB2] : test-call-async ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 13 for [DB2] : test-call-stmt ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 14 for [DB2] : test-chinese-char ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 15 for [DB2] : test-closed ... success
Running test 16 for [DB2] : test-connection-object ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 17 for [DB2] : test-date ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 18 for [DB2] : test-describe-column ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 19 for [DB2] : test-describe-database ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 20 for [DB2] : test-describe-table ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 21 for [DB2] : test-domains-open ... success
Running test 22 for [DB2] : test-global-open-close ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 23 for [DB2] : test--db-issue14 ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 24 for [DB2] : test-ibm-db-issue17 ... fail Caught Signal SIGILL

Stdout:
Test program to access DB2 sample database

Stderr:

Running test 25 for [DB2] : test-ibm-db-issue18 ... fail Caught Signal SIGILL

Stdout:
Test program to access DB2 sample database

Stderr:

Running test 26 for [DB2] : test-instantiate-one-and-end ... success
Running test 27 for [DB2] : test-issue-54 ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 28 for [DB2] : test-issue-get-column-value-2 ... fail Caught Signal SIGILL

Stdout:
Count 0, time Mon Jun 25 2018 14:09:05 GMT-0500 (Central Daylight Time)

Stderr:

Running test 29 for [DB2] : test-issue211 ... fail Caught Signal SIGILL

Stdout:
node-ibm_db logs enabled.

Stderr:

Running test 30 for [DB2] : test-issue253 ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 31 for [DB2] : test-max-pool-size ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 32 for [DB2] : test-memory-leaks-new-objects ... success
Running test 33 for [DB2] : test-multi-open-close ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 34 for [DB2] : test-multi-open-query-close ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 35 for [DB2] : test-multi-openSync-closeSync ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 36 for [DB2] : test-open-close ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 37 for [DB2] : test-open-connectTimeout ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 38 for [DB2] : test-openSync ... fail Caught Signal SIGILL

Stdout:
Attempting to connect to: DRIVER={DB2 ODBC Driver};DATABASE=qfit;UID=;PWD=;HOSTNAME=;PORT=;PROTOCOL=TCPIP;

Stderr:

Running test 39 for [DB2] : test-pool-close ... fail Caught Signal SIGILL

Stdout:

Stderr:
Opening connection # 0
Opening connection # 1
Opening connection # 2
Opening connection # 3
Opening connection # 4
Opening connection # 5
Opening connection # 6
Opening connection # 7
Opening connection # 8
Opening connection # 9
Opening connection # 10

Running test 40 for [DB2] : test-pool-connect ... fail Caught Signal SIGILL

Stdout:

Stderr:
Opening connection # 0
Opening connection # 1
Opening connection # 2
Opening connection # 3
Opening connection # 4
Opening connection # 5
Opening connection # 6
Opening connection # 7
Opening connection # 8
Opening connection # 9
Opening connection # 10

Running test 41 for [DB2] : test-pool-idle-connection ... fail Caught Signal SIGILL

Stdout:
Trying to open a new connection at => 2018.06.25 14:09:19

Stderr:

Running test 42 for [DB2] : test-pool-rollbackTransaction ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 43 for [DB2] : test-pool-uncommited ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 44 for [DB2] : test-prepareSync-bad-sql ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 45 for [DB2] : test-prepareSync-multiple-execution ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 46 for [DB2] : test-promisified-connection-pool ... success
Running test 47 for [DB2] : test-query-create-table-fetchSync ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 48 for [DB2] : test-query-create-table ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 49 for [DB2] : test-query-drop-table ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 50 for [DB2] : test-query-insert ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 51 for [DB2] : test-query-select-fetch ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 52 for [DB2] : test-query-select-fetchMode-array ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 53 for [DB2] : test-query-select ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 54 for [DB2] : test-queryStream ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 55 for [DB2] : test-querySync-select-with-exception ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 56 for [DB2] : test-querySync-select ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 57 for [DB2] : test-require-and-end ... success
Running test 58 for [DB2] : test-sp-resultset-execute ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 59 for [DB2] : test-sp-resultset ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 60 for [DB2] : test-transaction-commit-sync ... fail Caught Signal SIGILL

Stdout:

Stderr:

Running test 61 for [DB2] : test-transaction-commit ... fail Caught Signal SIGILL

Stdout:

Stderr:

Results : 54 of 61 tests failed.

Total execution time = 1 min 19 sec.

@bimalkjha
Copy link
Member

Thanks @ukulanne for testing it on AIX. Could you please check why node test-all-data-types.js fails with signal SIGILL? Any possible solution?
@rhtpandeyIN Please look into the code change. It is causing similar failures on AIX as we saw on Mac.
Thanks.

@ukulanne
Copy link

ukulanne commented Jun 25, 2018

@bimaljha [panda test]$ node test-all-data-types.js
Illegal instruction (core dumped)

I also get the core dump with a simple test aplication:

[panda aix-server-example]$ ls
db2.js hello.js node_modules package-lock.json package.json server.js server.js~
[panda aix-server-example]$ node server.js
[START] AIX nodejs server application started on host:
[START] AIX nodejs server application started on port: 3000
[INFO] Server started with pid: 16646254
[INFO] Server running under: aix ppc64
[INFO] Nodejs version: v10.5.0
[INFO] Nodejs path: node

Running this same sample app runs fine on linux x86
[panda@sunnydale aix-server-example]$ ls
hello.js node_modules package.json package-lock.json server.js
[panda@sunnydale aix-server-example]$ node server.js
[START] AIX nodejs server application started on host:
[START] AIX nodejs server application started on port: 3000
[INFO] Server started with pid: 20034
[INFO] Server running under: linux x64
[INFO] Nodejs version: v10.5.0
[INFO] Nodejs path: node
[ { USER_ID: 301,
INTRANET: 'some answer',
FULLNAME: 'some name',
IS_AUTHORIZED: 1 } ]
done

The core dump seems to happen right after connecting to the db. Unfortunately right now the gdb rpm available at https://www.ibm.com/developerworks/aix/library/aix-toolbox/alpha.html#G conflicts with the binutils rpm.

@ukulanne
Copy link

[panda aix-server-example]$ gdb node core
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

Type "apropos word" to search for commands related to "word"...
Reading symbols from node...done.

warning: core file may not match specified executable file.
Core was generated by `node'.
Program terminated with signal SIGILL, Illegal instruction.
#0 0x09000000068e21bc in ?? ()
from /gsa/ausgsa-h3/01/arlrios/src/git/aix-server-example/node_modules/ibm_db/installer/clidriver/lib/icc/N/icc/osslib/libcryptoIBM083.so.1.0.1

@kaue
Copy link

kaue commented Jun 28, 2018

Please add support for node v10 =)

@ukulanne
Copy link

@bimalkjha @rhtpandeyIN Is there anything else I can do to try debug this problem so it can work on AIX. Any pointers would be helpful. Thanks.

@amcintyre99
Copy link

Nan 2.11.0 released Aug 25 with Node 10 support. Does that mean you can merge this branch now and cut a new ibm_db release?

thanks!!

@ukulanne
Copy link

Nan 2.11.0 released Aug 25 with Node 10 support. Does that mean you can merge this branch now and cut a new ibm_db release?

I am finding the same problems reported on #439 with Nan 2.11

@bimalkjha bimalkjha merged commit 5457060 into ibmdb:master Nov 5, 2018
bimalkjha added a commit that referenced this pull request Dec 4, 2018
bimalkjha added a commit that referenced this pull request Dec 5, 2018
 * Update README.md (Bimal Kumar Jha)
 * Adding windows binary support for Node V9.X, V10.X, V11.X (#492) (Rohit Pandey)
 * Fix STEPLIB typos for SDSNLOD2 library (#488) (Joran Siu)
 * Revert "Fix ApiDocumentation.md to use Github Markdown anchors" (#491) (Bimal Kumar Jha)
 * Remove extraneous comma in zos test config (#479) (Joran Siu)
 * Node.js Version 9.X and 10.X support. (#398) (Rohit Pandey)
 * Change links to add user-content- prefix, trim whitespace (#477) (Michael Varrieur)
 * fix test case (Bimal Jha)
@ibmdb ibmdb deleted a comment from ukulanne Aug 4, 2022
@ibmdb ibmdb locked as resolved and limited conversation to collaborators Aug 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants