-
Notifications
You must be signed in to change notification settings - Fork 44
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
SIGSEGV (Address boundary error) while atempting to open connection #270
Comments
can you provide details of what was being done
I dont have enough information from above to determine what is happening - you need ODBC installed with Sql Server Driver 2017.3+ |
actually sorry i see it was on open and went down in openssl - this has been extensively doscussed in various issues and is not easy to fix - it is related to default version of openssl being used on your system not being compatible with native MS driver and is only fixable with something like a change in LD path e.g. from home /home/me LD_PRELOAD=/home/me/libssl.so.1.1 |
Hi,
I saw the other issues and I also did try preload the libssl, but without success. Give me some time to try again, I’ll come back later.
Thank you,
…On Mon, Dec 19, 2022, at 20:36, TimelordUK wrote:
actually sorry i see it was on open and went down in openssl - this has been extensively doscussed in various issues and is not easy to fix - it is related to default version of openssl being used on your system not being compatible with native MS driver and is only fixable with something like a change in LD path
e.g. from home /home/me
libssl.so.1.1 -> ***@***.***/lib/libssl.so.3
LD_PRELOAD=/home/me/libssl.so.1.1
—
Reply to this email directly, view it on GitHub <#270 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AG3NLDLLOSOQZJWV63EOMQTWODBORANCNFSM6AAAAAATBAQFMY>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
looking again at a ubunti install - if I run a node process without the LD SSL patch above it crashes and looking at the loaded libs I see below If I run the ms sqlcmd connection tool which connects fine I see the second set of loaded libs yet actually they are the same - they are using the same SSL / odbc / gcc runtime yet in case of node it does fail with SEGV in last example I patch LD as above node now works and we see a new ssl running MS command line - working no LD patch me@me:~/dev/js/v8/node_modules/msnodesqlv8$ lsof -p 7387 | grep -i -e gcc -e stdc -e odbc -e ssl
sqlcmd 7387 me mem REG 8,16 598104 11601 /usr/lib/x86_64-linux-gnu/libssl.so.1.1
sqlcmd 7387 me mem REG 8,16 608957 68879 /usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0
sqlcmd 7387 me mem REG 8,16 2080528 7709 /opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.1.so.1.1
sqlcmd 7387 me mem REG 8,16 104984 12332 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
sqlcmd 7387 me mem REG 8,16 1956992 12642 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
sqlcmd 7387 me mem REG 8,16 2453791 68863 /usr/lib/x86_64-linux-gnu/libodbc.so.2.0.0
me@me:~/dev/js/v8/node_modules/msnodesqlv8$ lsof -p 7534 | grep -i -e gcc -e stdc -e odbc -e ssl
node msnodesqlv8 no patch - looks same version loaded yet crashes
node 7534 me mem REG 8,16 598104 11601 /usr/lib/x86_64-linux-gnu/libssl.so.1.1
node 7534 me mem REG 8,16 608957 68879 /usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0
node 7534 me mem REG 8,16 2080528 7709 /opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.1.so.1.1
node 7534 me mem REG 8,16 2453791 68863 /usr/lib/x86_64-linux-gnu/libodbc.so.2.0.0
node 7534 me mem REG 8,16 104984 12332 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
node 7534 me mem REG 8,16 1956992 12642 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
this is node with patch and note new ssl - this is working
me@me:~/dev/js/v8/node_modules/msnodesqlv8$ lsof -p 7611 | grep -i -e gcc -e stdc -e odbc -e ssl
node 7611 me mem REG 8,16 608957 68879 /usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0
node 7611 me mem REG 8,16 2080528 7709 /opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.1.so.1.1
node 7611 me mem REG 8,16 2453791 68863 /usr/lib/x86_64-linux-gnu/libodbc.so.2.0.0
node 7611 me mem REG 8,16 5242296 100436 /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.5/lib/libcrypto.so.3
node 7611 me mem REG 8,16 104984 12332 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
node 7611 me mem REG 8,16 1956992 12642 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
node 7611 me mem REG 8,16 807584 100439 /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.5/lib/libssl.so.3 |
if i include crypto it still all looks same from sqlcmd that works and node - this is weirder than i thought me@me:~/dev/js/v8/node_modules/msnodesqlv8$ lsof -p 7534 | grep -i -e gcc -e stdc -e odbc -e ssl -e crypto
node 7534 me mem REG 8,16 2954080 11600 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
node 7534 me mem REG 8,16 598104 11601 /usr/lib/x86_64-linux-gnu/libssl.so.1.1
node 7534 me mem REG 8,16 608957 68879 /usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0
node 7534 me mem REG 8,16 2080528 7709 /opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.1.so.1.1
node 7534 me mem REG 8,16 2453791 68863 /usr/lib/x86_64-linux-gnu/libodbc.so.2.0.0
node 7534 me mem REG 8,16 191040 12432 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
node 7534 me mem REG 8,16 104984 12332 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
node 7534 me mem REG 8,16 1956992 12642 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
me@me:~/dev/js/v8/node_modules/msnodesqlv8$ lsof -p 7387 | grep -i -e gcc -e stdc -e odbc -e ssl -e crypto
sqlcmd 7387 me mem REG 8,16 2954080 11600 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
sqlcmd 7387 me mem REG 8,16 598104 11601 /usr/lib/x86_64-linux-gnu/libssl.so.1.1
sqlcmd 7387 me mem REG 8,16 191040 12432 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
sqlcmd 7387 me mem REG 8,16 608957 68879 /usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0
sqlcmd 7387 me mem REG 8,16 2080528 7709 /opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.1.so.1.1
sqlcmd 7387 me mem REG 8,16 104984 12332 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
sqlcmd 7387 me mem REG 8,16 1956992 12642 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
sqlcmd 7387 me mem REG 8,16 2453791 68863 /usr/lib/x86_64-linux-gnu/libodbc.so.2.0.0 |
I have the exact same problem under a similar environment.
I wasn't able to fix the issue by forcing a different OpenSSL version with Came across this announcement on the NodeJS blog and decided to give v18 a try. It worked. I still don't know what's causing the original problem but maybe this can help to narrow the search. |
Very interesting thanks a lot for pointing out release notes and relation to ssl |
I'm dealing with SIGSEGV problem also, ODBC Driver: ODBC Driver 17 for SQL Server I'm getting Thanks! |
Only reliable solution I have found so far Tom this problem is to install
and Build OpenSSL 3.2 from arc code. This is being done on app veyor test
server for Ubuntu. The script being used for testing is in tool however
this requires root privileges to install
Before that you could try running node version 16 which should work on
installed current ssl version. Something was changed from node 18 causing
this problem.
Alpine Linux seems to work fine on default ssl version. I have made this
work on Debian Ubuntu and Lubuntu on test servers
On Mon, 29 May 2023 at 11:09, Amir Eretz Tzvi ***@***.***> wrote:
I'm dealing with the same problem (NodeJS version 18.16.0, NPM version
8.15.0)
I'm getting Segmentation fault (core dumped) while trying to make a
connection,
Does anyone know what cause this?
I've tried to remove node_modules and run npm install again and it didn't
work,
Thanks!
…
—
Reply to this email directly, view it on GitHub
<#270 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXWJG4ETELCXLWOSJJWCPLXIRYVHANCNFSM6AAAAAATBAQFMY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
here on appveyor script is being run as part of install pre test for node 18 only - test suite then runs https://ci.appveyor.com/project/TimelordUK/node-sqlserver-v8/branch/master/job/7h7u9annw75jj8lp |
log from appveyor omputing checksum with sha256sum
[00:00:12] Checksums matched!
[00:00:16] Now using node v18.16.0 (npm v9.5.1)
[00:00:16] npm install
[00:00:22] npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
[00:00:23] npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
[00:00:23] npm WARN deprecated har-validator@5.1.5: this library is no longer supported
[00:00:25] npm WARN deprecated @types/electron@1.6.10: This is a stub types definition for electron (https://github.com/electron/electron). electron provides its own type definitions, so you don't need @types/electron installed!
[00:00:29] npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
[00:00:29] npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
[00:00:30] npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
[00:00:37]
[00:00:37] > msnodesqlv8@4.1.0 install
[00:00:37] > prebuild-install || node-gyp rebuild
[00:00:37]
[00:00:38]
[00:00:38] added 876 packages, and audited 877 packages in 22s
[00:00:38]
[00:00:38] 132 packages are looking for funding
[00:00:38] run `npm fund` for details
[00:00:38]
[00:00:38] 8 vulnerabilities (3 moderate, 5 high)
[00:00:38]
[00:00:38] To address issues that do not require attention, run:
[00:00:38] npm audit fix
[00:00:38]
[00:00:38] To address all issues (including breaking changes), run:
[00:00:38] npm audit fix --force
[00:00:38]
[00:00:38] Run `npm audit` for details.
[00:00:38] Starting 'services'
[00:00:38] Starting Microsoft SQL Server 2017
[00:00:39] Running "build_script" scripts
[00:00:39] node --version
[00:00:39] v18.16.0
[00:00:39] npm run build
[00:00:40]
[00:00:40] > msnodesqlv8@4.1.0 build
[00:00:40] > tsc
[00:00:40]
[00:00:54] chmod 775 /home/appveyor/projects/node_modules/msnodesqlv8/tool/install_openssl.sh
[00:00:55] /home/appveyor/projects/node_modules/msnodesqlv8/tool/install_openssl.sh
[00:00:55] node version 18 folder /home/appveyor/projects/node_modules/msnodesqlv8
[00:00:55] Cloning into 'openssl'... |
FWIW, I was also able to get it working with OpenSSL 3.0.2 on Ubuntu 22.04. I can also attest that the "install_openssl.sh" script to build the latest openssl 3.2 works as well. |
i have built a docker image bringing things together which works for docker i have found this image to work
i build docker build . -t msnodesqlv8-ubuntu launch a shell docker run -it msnodesqlv8-ubuntu bash cd
cd app
git clone https://github.com/TimelordUK/msnodesqlv8_yarn_sample.git
yarn install change the index.js for a valid connection string - note will need ip address rather than host unless you set up resolution yarn test Done in 15.26s.
apprunner@184c7c6d8c08:~/app/msnodesqlv8_yarn_sample$ ping DESKTOP-VIUCH90
bash: ping: command not found
apprunner@184c7c6d8c08:~/app/msnodesqlv8_yarn_sample$ vim index.js
apprunner@184c7c6d8c08:~/app/msnodesqlv8_yarn_sample$ yarn test
yarn run v1.22.19
$ node index
using connection 'Driver={ODBC Driver 18 for SQL Server}; Server=192.000.0.000;UID=linux; PWD=linux; Database=node;Encrypt=no;' run query 'SELECT top 2 * FROM syscolumns'
{
"beginAt": "2023-05-29T18:56:30.565Z",
"submittedAt": "2023-05-29T18:56:30.566Z",
"endAt": "2023-05-29T18:56:30.640Z",
"elapsed": 75,
"first": [
{
"name": "rsid",
"id": 3,
"xtype": 127,
"typestat": 1,
"xusertype": 127,
"length": 8,
"xprec": 19,
"xscale": 0,
"colid": 1,
"xoffset": 0,
"bitpos": 0,
"reserved": 0,
"colstat": 0,
"cdefault": 0, docker build . -t msnodesqlv8-ubuntu
[+] Building 603.2s (25/25) FINISHED
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.49kB 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:22.04 0.0s
=> [ 1/21] FROM docker.io/library/ubuntu:22.04 0.0s
=> CACHED [ 2/21] RUN echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf.d/00-docker 0.0s
=> CACHED [ 3/21] RUN echo 'APT::Install-Recommends "0";' >> /etc/apt/apt.conf.d/00-docker 0.0s
=> [ 4/21] RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y vim git build-essential curl perl dialog apt-utils ca-certificates apt-tra 83.7s
=> [ 5/21] RUN mkdir -p /etc/ssl/certs/ 0.6s
=> [ 6/21] RUN curl https://packages.microsoft.com/keys/microsoft.asc | tee | apt-key add - 1.0s
=> [ 7/21] RUN curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list 0.8s
=> [ 8/21] RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - 3.4s
=> [ 9/21] RUN echo msodbcsql18 msodbcsql/ACCEPT_EULA boolean true | debconf-set-selections 0.7s
=> [10/21] RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y python3 unixodbc unixodbc-dev nodejs 11.5s
=> [11/21] RUN ACCEPT_EULA=Y apt-get install -y msodbcsql18 2.4s
=> [12/21] RUN ACCEPT_EULA=Y apt-get install -y mssql-tools18 2.2s
=> [13/21] RUN mkdir -p $HOME/projects 0.6s
=> [14/21] RUN git clone https://github.com/openssl/openssl.git $HOME/projects/openssl 54.1s
=> [15/21] RUN ( cd $HOME/projects/openssl ; ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared; make; make install) 432.6s
=> [16/21] RUN (cd /etc/ld.so.conf.d/; echo '/usr/local/ssl/lib64/' | tee openssl-3.2.0.1s.conf) 0.7s
=> [17/21] RUN ldconfig -v 0.6s
=> [18/21] RUN npm install --g yarn 2.9s
=> [19/21] RUN useradd -ms /bin/bash apprunner 0.8s
=> [20/21] RUN mkdir -p $HOME/app 0.6s
=> [21/21] RUN cd $HOME/app 0.5s
=> exporting to image 3.4s
=> => exporting layers 3.3s
=> => writing image sha256:1fc7851e63c80307bb37d8bea8ebdf546714fb34d479cb411e8bc91b307809f9 0.0s
=> => naming to docker.io/library/msnodesqlv8-ubuntu 0.0s
Administrator in dev\docker\ubuntu-msnodesqlv8 took 10m3s
❯ docker run -it msnodesqlv8-ubuntu bash
apprunner@184c7c6d8c08:/$ cd
apprunner@184c7c6d8c08:~$ cd app
apprunner@184c7c6d8c08:~/app$ Driver={ODBC Driver 18 for SQL Server}; Server=DESKTOP-VIUCH90;UID=linux; PWD=linux; Database=node;Encrypt=no;^C
apprunner@184c7c6d8c08:~/app$ git clone https://github.com/TimelordUK/msnodesqlv8_yarn_sample.git
Cloning into 'msnodesqlv8_yarn_sample'...
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 14 (delta 4), reused 14 (delta 4), pack-reused 0
Receiving objects: 100% (14/14), 7.90 KiB | 7.90 MiB/s, done.
Resolving deltas: 100% (4/4), done.
apprunner@184c7c6d8c08:~/app$ cd msnodesqlv8_yarn_sample/
apprunner@184c7c6d8c08:~/app/msnodesqlv8_yarn_sample$ vim index.js
apprunner@184c7c6d8c08:~/app/msnodesqlv8_yarn_sample$ yarn install
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages... |
I've tried to build this image but I get an error: |
does this work FROM ubuntu:22.04 RUN DEBIAN_FRONTEND=noninteractive RUN mkdir -p /etc/ssl/certs/ RUN mkdir -p $HOME/projects Administrator in dev\docker\ubuntu-msnodesqlv8 took 16s
❯ docker run -it msnodesqlv8-ubuntu bash
apprunner@8b3b24f942f1:/$ node --version
v18.16.0
apprunner@8b3b24f942f1:/$ npm --version
9.5.1
apprunner@8b3b24f942f1:/$ yarn --version
0.32+git
apprunner@8b3b24f942f1:/$ |
This is what i get after building an image by your latest Dockerfile:
|
can you do a clean build and capture log with latest - are you behind a firewall is it actually installing the node18 docker build --no-cache --progress=plain . 2>&1 | tee build.log note from log grep nodejs .\build.log
#10 5.128 ## Run `sudo apt-get install -y nodejs` to install Node.js 18.x and npm
#20 [17/20] RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y nodejs yarn
#20 4.300 cmdtest libyaml-0-2 nodejs python3-cliapp python3-importlib-metadata
#20 4.489 Get:1 https://deb.nodesource.com/node_18.x jammy/main amd64 nodejs amd64 18.16.0-deb-1nodesource1 [28.7 MB]
#20 10.33 Selecting previously unselected package nodejs.
#20 10.33 Preparing to unpack .../9-nodejs_18.16.0-deb-1nodesource1_amd64.deb ...
#20 10.34 Unpacking nodejs (18.16.0-deb-1nodesource1) ...
#20 16.81 Setting up nodejs (18.16.0-deb-1nodesource1) ... |
Hi,
Here we go.
OS: Arch linux
Kernel: Linux version 5.15.83-1-lts
ODBC Driver: msodbcsql 18.1.2.1-1
msnodesqlv8 Version: 2.7.0
node output:
coredump:
More detail:
Any clue?
The text was updated successfully, but these errors were encountered: