Skip to content

Commit 8c290e4

Browse files
authored
Merge pull request #30 from joelpurra/feature/node-9
With the introduction of Node.js version 9, building `getdns-node` started to fail. This pull-request: - Updates Node.js to target v4, 6, 8, 9. - Updates the Native Abstractions for Node.js (NAN) from v2.4.0 to v2.8.0 - Fixes compatibility issues with Node.js v9.5.0. - Fixes TLS tests. - Fixes build warnings. **Testing** **[`node` versions](https://nodejs.org/en/download/releases/)** - 4.8.7 - 6.13.0 - 8.9.4 - 9.5.0 **[`getdns` versions](https://getdnsapi.net/releases/)** - v1.0.0 - v1.1.2 - v1.2.1 - v1.3.0 This yields 16 combinations of `getdns` and `node` to build/install and test. Combinations were tested using my helper scripts in [getdns-developer-support](https://github.com/joelpurra/getdns-developer-support). ```shell # - Build a tagged version of getdns. # - For each build, run a getdns-node test script: # - For each listed version of node: # - Clone the getdns-node branch feature/node-9. # - Uses npm to builds/install/test in a new per-combination directory. cd "${GETDNS_DEV_ROOT}/getdns" "${GETDNS_DEV_ROOT}/getdns-developer-support/src/getdns/getdns-build.sh" \ "${GETDNS_DEV_ROOT}/getdns-developer-support/src/getdns-node/node-version-builds/node-version-builds.sh" \ -- "${GETDNS_DEV_ROOT}/getdns-node" \ "feature/node-9" ``` **Build output** ```shell ls -l getdns-v*.log ``` ```text -rw-r--r-- 1 joelpurra staff 10757 Feb 17 17:35 getdns-v1.0.0-node-v4.8.7.npm-install.log -rw-r--r-- 1 joelpurra staff 4046 Feb 17 17:36 getdns-v1.0.0-node-v4.8.7.npm-test.log -rw-r--r-- 1 joelpurra staff 16719 Feb 17 17:37 getdns-v1.0.0-node-v6.13.0.npm-install.log -rw-r--r-- 1 joelpurra staff 3000 Feb 17 17:37 getdns-v1.0.0-node-v6.13.0.npm-test.log -rw-r--r-- 1 joelpurra staff 4795 Feb 17 17:37 getdns-v1.0.0-node-v8.9.4.npm-install.log -rw-r--r-- 1 joelpurra staff 5671 Feb 17 17:38 getdns-v1.0.0-node-v9.5.0.npm-install.log -rw-r--r-- 1 joelpurra staff 4056 Feb 17 17:38 getdns-v1.0.0-node-v9.5.0.npm-test.log -rw-r--r-- 1 joelpurra staff 10748 Feb 17 17:40 getdns-v1.1.2-node-v4.8.7.npm-install.log -rw-r--r-- 1 joelpurra staff 4053 Feb 17 17:40 getdns-v1.1.2-node-v4.8.7.npm-test.log -rw-r--r-- 1 joelpurra staff 16733 Feb 17 17:41 getdns-v1.1.2-node-v6.13.0.npm-install.log -rw-r--r-- 1 joelpurra staff 4053 Feb 17 17:41 getdns-v1.1.2-node-v6.13.0.npm-test.log -rw-r--r-- 1 joelpurra staff 5700 Feb 17 17:42 getdns-v1.1.2-node-v8.9.4.npm-install.log -rw-r--r-- 1 joelpurra staff 4055 Feb 17 17:42 getdns-v1.1.2-node-v8.9.4.npm-test.log -rw-r--r-- 1 joelpurra staff 4809 Feb 17 17:43 getdns-v1.1.2-node-v9.5.0.npm-install.log -rw-r--r-- 1 joelpurra staff 5159 Feb 17 17:44 getdns-v1.2.1-node-v4.8.7.npm-install.log -rw-r--r-- 1 joelpurra staff 16733 Feb 17 17:45 getdns-v1.2.1-node-v6.13.0.npm-install.log -rw-r--r-- 1 joelpurra staff 4007 Feb 17 17:46 getdns-v1.2.1-node-v6.13.0.npm-test.log -rw-r--r-- 1 joelpurra staff 4796 Feb 17 17:46 getdns-v1.2.1-node-v8.9.4.npm-install.log -rw-r--r-- 1 joelpurra staff 5688 Feb 17 17:47 getdns-v1.2.1-node-v9.5.0.npm-install.log -rw-r--r-- 1 joelpurra staff 4037 Feb 17 17:47 getdns-v1.2.1-node-v9.5.0.npm-test.log -rw-r--r-- 1 joelpurra staff 5087 Feb 17 17:49 getdns-v1.3.0-node-v4.8.7.npm-install.log -rw-r--r-- 1 joelpurra staff 16726 Feb 17 17:50 getdns-v1.3.0-node-v6.13.0.npm-install.log -rw-r--r-- 1 joelpurra staff 3076 Feb 17 17:50 getdns-v1.3.0-node-v6.13.0.npm-test.log -rw-r--r-- 1 joelpurra staff 5670 Feb 17 17:51 getdns-v1.3.0-node-v8.9.4.npm-install.log -rw-r--r-- 1 joelpurra staff 4029 Feb 17 17:51 getdns-v1.3.0-node-v8.9.4.npm-test.log -rw-r--r-- 1 joelpurra staff 5671 Feb 17 17:51 getdns-v1.3.0-node-v9.5.0.npm-install.log -rw-r--r-- 1 joelpurra staff 4027 Feb 17 17:52 getdns-v1.3.0-node-v9.5.0.npm-test.log ``` **Passing installations and tests** The tests are executed both during installation, and afterwards. This is due to (historical?) concerns with `npm` and installing packages which require a build step; it should perhaps be disabled. ```shell grep ' passing (' *.npm-install.log ``` 11 combinations build/install and succefully complete the first round of test. ```text getdns-v1.0.0-node-v4.8.7.npm-install.log: 65 passing (5s) getdns-v1.0.0-node-v6.13.0.npm-install.log: 65 passing (5s) getdns-v1.0.0-node-v9.5.0.npm-install.log: 65 passing (5s) getdns-v1.1.2-node-v4.8.7.npm-install.log: 65 passing (5s) getdns-v1.1.2-node-v6.13.0.npm-install.log: 65 passing (5s) getdns-v1.1.2-node-v8.9.4.npm-install.log: 65 passing (5s) getdns-v1.2.1-node-v6.13.0.npm-install.log: 65 passing (6s) getdns-v1.2.1-node-v9.5.0.npm-install.log: 65 passing (6s) getdns-v1.3.0-node-v6.13.0.npm-install.log: 65 passing (6s) getdns-v1.3.0-node-v8.9.4.npm-install.log: 65 passing (6s) getdns-v1.3.0-node-v9.5.0.npm-install.log: 65 passing (6s) ``` ```shell grep ' passing (' *.npm-test.log ``` 9 combinations pass the repeated test run. ```text getdns-v1.0.0-node-v4.8.7.npm-test.log: 65 passing (5s) getdns-v1.0.0-node-v9.5.0.npm-test.log: 65 passing (6s) getdns-v1.1.2-node-v4.8.7.npm-test.log: 65 passing (5s) getdns-v1.1.2-node-v6.13.0.npm-test.log: 65 passing (6s) getdns-v1.1.2-node-v8.9.4.npm-test.log: 65 passing (6s) getdns-v1.2.1-node-v6.13.0.npm-test.log: 65 passing (6s) getdns-v1.2.1-node-v9.5.0.npm-test.log: 65 passing (6s) getdns-v1.3.0-node-v8.9.4.npm-test.log: 65 passing (6s) getdns-v1.3.0-node-v9.5.0.npm-test.log: 65 passing (6s) ``` **Failing tests** It seems that the only problem running tests is an intermittent `SIGSEGV`. There is no consistent failure across a specific version of either `getdns` or `node`; for this reason I am ignoring failures as they are intermittent. ```shell grep 'SIGSEGV' *.npm-install.log ``` 5 combinations pass build/installation, but fail during the first round of testing. ```text getdns-v1.0.0-node-v8.9.4.npm-install.log:PID 85503 received SIGSEGV for address: 0x10 getdns-v1.1.2-node-v9.5.0.npm-install.log:PID 94431 received SIGSEGV for address: 0x10 getdns-v1.2.1-node-v4.8.7.npm-install.log:PID 1092 received SIGSEGV for address: 0x10 getdns-v1.2.1-node-v8.9.4.npm-install.log:PID 2462 received SIGSEGV for address: 0x10 getdns-v1.3.0-node-v4.8.7.npm-install.log:PID 9535 received SIGSEGV for address: 0x10 ``` ```shell grep 'SIGSEGV' *.npm-test.log ``` 2 combinations fail during the repeated test run. ```text getdns-v1.0.0-node-v6.13.0.npm-test.log:PID 84966 received SIGSEGV for address: 0x10 getdns-v1.3.0-node-v6.13.0.npm-test.log:PID 10301 received SIGSEGV for address: 0x10 ``` **Intermittent failures** All intermittent failures had the same error output. Will have to debug this later; input appreciated. ```text PID 10301 received SIGSEGV for address: 0x10 0 segfault-handler.node 0x0000000101df91a8 _ZL16segfault_handleriP9__siginfoPv + 280 1 libsystem_platform.dylib 0x00007fff7d96df5a _sigtramp + 26 2 ??? 0x0000000102002400 0x0 + 4328530944 3 libunbound.2.dylib 0x0000000106bb78e9 comm_point_close + 32 4 libunbound.2.dylib 0x0000000106bb9ddb portcomm_loweruse + 58 5 libunbound.2.dylib 0x0000000106bbb59e serviced_delete + 67 6 libunbound.2.dylib 0x0000000106b8c6b8 outbound_list_clear + 30 7 libunbound.2.dylib 0x0000000106b84300 iter_clear + 46 8 libunbound.2.dylib 0x0000000106b8a373 mesh_state_delete + 646 9 libunbound.2.dylib 0x0000000106b6e2f1 libworker_delete_env + 71 10 libunbound.2.dylib 0x0000000106b6e250 libworker_delete_event + 23 11 libunbound.2.dylib 0x0000000106b69f58 ub_ctx_delete + 845 12 libgetdns.6.dylib 0x0000000106b0f20e getdns_context_destroy + 158 13 getdns.node 0x0000000106ab9579 _ZN9GNContext7DestroyERKN3Nan20FunctionCallbackInfoIN2v85ValueEEE + 105 14 getdns.node 0x0000000106abe549 _ZN3Nan3impL23FunctionCallbackWrapperERKN2v820FunctionCallbackInfoINS1_5ValueEEE + 153 15 node 0x000000010017b1b4 _ZN2v88internal25FunctionCallbackArguments4CallEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEE + 356 16 node 0x00000001001c55e5 _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperEPNS0_7IsolateENS1_16BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE3EEE + 1765 17 node 0x00000001001cfdd1 _ZN2v88internalL21Builtin_HandleApiCallEiPPNS0_6ObjectEPNS0_7IsolateE + 465 18 ??? 0x0000312d0b7092a7 0x0 + 54069535216295 ```
2 parents c27c336 + 424392c commit 8c290e4

File tree

8 files changed

+2560
-105
lines changed

8 files changed

+2560
-105
lines changed

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ before_install:
4242
- sudo unbound-anchor -v -a "/etc/unbound/getdns-root.key" || [ -f /etc/unbound/getdns-root.key ]
4343
node_js:
4444
- "4"
45-
- "5"
4645
- "6"
47-
- "7"
46+
- "8"
47+
- "9"
4848
- "node"
49-
matrix:
50-
allow_failures:
51-
- node_js: "5"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ getdns-node has a few advantages over the [default DNS module in Node.js](https:
4141

4242
## Installation and Requirements
4343

44-
- [Node.js](https://nodejs.org/) **v7.x.x**, **v6.x.x**, **v4.x.x**; current and [long-term support (LTS)](https://github.com/nodejs/LTS) versions.
44+
- [Node.js](https://nodejs.org/) **v9.x.x**, **v8.x.x**, **v6.x.x**, **v4.x.x**; current and [long-term support (LTS)](https://github.com/nodejs/LTS) versions.
4545
- [getdns](https://getdnsapi.net/) C library **v1.0.0** or later; see [getdns releases](https://getdnsapi.net/releases/) or [getdnsapi/getdns](https://github.com/getdnsapi/getdns).
4646
- [Unbound](https://unbound.net/) DNS resolver **v1.4.16** or later, installed with a trust anchor for DNSSEC validation.
4747
- [OpenSSL](https://www.openssl.org/) **v1.0.2** or later.

0 commit comments

Comments
 (0)