You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// this script should be executed in the same dir where you have installed the oracledb packageconstplatform=process.platform;// e.g. ./node_modules/oracledb/build/Release/oracledb-5.5.0-linux-x64.nodeconstoracleLibNodeExtension=`./node_modules/oracledb/build/Release/oracledb-5.5.0-${platform}-x64.node`constoraclelib=require(oracleLibNodeExtension)oraclelib.init(newclass{})
Docker
build the following docker image, docker build . -t buntesting:latest
# DockerfileFROM node:14-bullseye-slim
RUN apt-get update && apt-get install curl unzip -y
# install canary bunRUN curl -OL https://github.com/oven-sh/bun/releases/download/canary/bun-linux-x64.zip && unzip bun-linux-x64.zip -d ~/
# add oracle moduleRUN npm init -y && npm i [email protected]# create test fileRUN echo "\const oraclelib = require('./node_modules/oracledb/build/Release/oracledb-5.5.0-linux-x64.node');\oraclelib.init(new class {});" > test.js
# run test file with bunRUN ~/bun-linux-x64/bun test.js
How often does it reproduce? Is there a required condition?
Always, tested with bun 0.1.13 and 0.1.14
What is the expected behavior?
The expected behavior should be an "Invalid argument" error with exit code 1 (because it expects an oracle class as input), the same as node (tested on version 14):
Error: Invalid argument
at Object.<anonymous> (/test.js:1:108)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
at internal/main/run_main_module.js:17:47
SegmentationFault at 0x1800000000000000
----- bun meta -----
Bun v0.1.14 (c57b32fa) Linux x64 #1 SMP Fri Apr 22 12:57:03 CEST 2022
AutoCommand:
Elapsed: 106448ms | User: 4ms | Sys: 7ms
RSS: 67.11MB | Peak: 32.62MB | Commit: 67.11MB | Faults: 0
----- bun meta -----
Ask for #help in https://bun.sh/discord or go to https://bun.sh/issues
Process 6152 exited with status = 139 (0x0000008b)
Additional information
To give more context, the .node extension is needed by oracledb module, it is loaded via require and then initialized, this is where I observed the segmentation fault
The text was updated successfully, but these errors were encountered:
nya1
changed the title
segmentation fault on "napi_write" when trying to call a loaded .node extension
segmentation fault on "napi_wrap" when trying to call a loaded .node extension
Oct 1, 2022
Version
0.1.14
Platform
Linux debian 5.10.0-11-amd64 #1 SMP Debian 5.10.92-2 (2022-02-28) x86_64 GNU/Linux
What steps will reproduce the bug?
I have created two methods to reproduce the error, one manually and the other one via docker
Manual
oracledb
in the current directory,npm i [email protected]
Docker
docker build . -t buntesting:latest
How often does it reproduce? Is there a required condition?
Always, tested with bun 0.1.13 and 0.1.14
What is the expected behavior?
The expected behavior should be an "Invalid argument" error with exit code 1 (because it expects an oracle class as input), the same as node (tested on version 14):
What do you see instead?
Segmentation fault error
from bun-profile executed in lldb
Additional information
To give more context, the .node extension is needed by oracledb module, it is loaded via require and then initialized, this is where I observed the segmentation fault
The text was updated successfully, but these errors were encountered: