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

OracleDB crashes with Segmentation Fault in Thick Mode, everything OK in Thin Mode #1723

Open
daniele-orlando opened this issue Feb 12, 2025 · 3 comments

Comments

@daniele-orlando
Copy link

daniele-orlando commented Feb 12, 2025

OracleDB crashes with Segmentation Fault in Thick Mode.
Enabling the Thin Mode solves the crash.

1. What versions are you using?

node-oracledb: 6.6.0, 6.7.2
Platform: darwin
Node: v23.6.1
Architecture: arm64
Oracle Instant Client: 23.3.0.23.09

Reproduced on Node 20/22/23.

2. Is it an error or a hang or a crash?

Crash.

3. What error(s) or behavior you are seeing?

PID 85422 received SIGSEGV for address: 0x4d55545a
0   segfault-handler.node               0x00000001066ce3b0 _ZL16segfault_handleriP9__siginfoPv + 252
1   libsystem_platform.dylib            0x000000018663ade4 _sigtramp + 56
2   libsystem_platform.dylib            0x0000000186638c48 _platform_strstr + 48
3   libclntsh.dylib.23.1                0x000000016342e09c skpudbg_any_events_set_in_env + 84
4   libclntsh.dylib.23.1                0x0000000164bb7ed4 kpedbgevinit + 220
5   libclntsh.dylib.23.1                0x0000000164bac79c kpummpin + 1616
6   libclntsh.dylib.23.1                0x00000001634581fc kpuenvcr + 220
7   libclntsh.dylib.23.1                0x00000001635ee3b0 OCIEnvNlsCreate + 44
8   oracledb-6.7.2-darwin-arm64.node    0x000000010b542be8 dpiOci__envNlsCreate + 180
9   oracledb-6.7.2-darwin-arm64.node    0x000000010b5333c0 dpiGlobal__ensureInitialized + 180
10  oracledb-6.7.2-darwin-arm64.node    0x000000010b52c91c dpiContext_createWithParams + 164
11  oracledb-6.7.2-darwin-arm64.node    0x000000010b514974 njsModule_initOracleClient + 428
12  node                                0x0000000102dd639c _ZN6v8impl12_GLOBAL__N_123FunctionCallbackWrapper6InvokeERKN2v820FunctionCallbackInfoINS2_5ValueEEE + 84
13  node                                0x0000000102b92978 Builtins_CallApiCallbackGeneric + 152
14  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
15  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
16  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
17  node                                0x0000000102b913cc Builtins_InterpreterPushArgsThenFastConstructFunction + 396
18  node                                0x0000000102d0acb4 Builtins_ConstructHandler + 884
19  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
20  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
21  node                                0x0000000102b913cc Builtins_InterpreterPushArgsThenFastConstructFunction + 396
22  node                                0x0000000102d0acb4 Builtins_ConstructHandler + 884
23  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
24  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
25  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
26  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
27  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
28  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
29  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
30  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280
31  node                                0x0000000102b90838 Builtins_InterpreterEntryTrampoline + 280

4. Include a runnable Node.js script that shows the problem.

App too big. Can't share the code.

5. Debug information

DPI_DEBUG_LEVEL=127 node ./main.js

ODPI [11122579] 2025-02-12 16:25:23.431: ODPI-C 5.4.1
ODPI [11122579] 2025-02-12 16:25:23.431: debugging messages initialized at level 127
ODPI [11122579] 2025-02-12 16:25:23.431: fn start dpiContext_createWithParams
ODPI [11122579] 2025-02-12 16:25:23.431: Context Parameters:
ODPI [11122579] 2025-02-12 16:25:23.431:     Oracle Client Lib Dir: /usr/local/oracle-instant-client
ODPI [11122579] 2025-02-12 16:25:23.431: Environment Variables:
ODPI [11122579] 2025-02-12 16:25:23.431: load in parameter directory
ODPI [11122579] 2025-02-12 16:25:23.431: load in dir /usr/local/oracle-instant-client
ODPI [11122579] 2025-02-12 16:25:23.431: allocated 49 bytes at 0x106f4e980 (allocate name buffer)
ODPI [11122579] 2025-02-12 16:25:23.431: load with name /usr/local/oracle-instant-client/libclntsh.dylib
ODPI [11122579] 2025-02-12 16:25:23.925: load by OS successful
ODPI [11122579] 2025-02-12 16:25:23.925: freed ptr at 0x106f4e980
ODPI [11122579] 2025-02-12 16:25:23.925: validating loaded library
ODPI [11122579] 2025-02-12 16:25:23.927: OCI allocated 23 bytes at 0x106f83410
ODPI [11122579] 2025-02-12 16:25:23.928: OCI allocated 168 bytes at 0x105f16020
ODPI [11122579] 2025-02-12 16:25:23.928: OCI allocated 8 bytes at 0x105f2af50
ODPI [11122579] 2025-02-12 16:25:23.928: OCI allocated 264 bytes at 0x105fe6ae0
ODPI [11122579] 2025-02-12 16:25:23.928: OCI allocated 40 bytes at 0x105fe0f70
ODPI [11122579] 2025-02-12 16:25:23.928: OCI allocated 184 bytes at 0x105f1fcd0
ODPI [11122579] 2025-02-12 16:25:23.928: OCI allocated 8 bytes at 0x105f0ee00
ODPI [11122579] 2025-02-12 16:25:23.928: OCI allocated 264 bytes at 0x10abdeff0
ODPI [11122579] 2025-02-12 16:25:23.928: OCI allocated 65800 bytes at 0x140038000
ODPI [11122579] 2025-02-12 16:25:23.928: OCI allocated 4016 bytes at 0x10c8f0e00
ODPI [11122579] 2025-02-12 16:25:23.928: OCI allocated 4208 bytes at 0x10c8faa00
ODPI [11122579] 2025-02-12 16:25:23.928: OCI allocated 4208 bytes at 0x10c8d7400
ODPI [11122579] 2025-02-12 16:25:23.928: allocated 3216 bytes at 0x10c8d8600 (allocate error buffer)
ODPI [11122579] 2025-02-12 16:25:23.928: allocated 64 bytes at 0x10abdf100 (allocate handle)
ODPI [11122579] 2025-02-12 16:25:23.928: ref 0x10abdf100 (dpiContext) -> 1 [NEW]
ODPI [11122579] 2025-02-12 16:25:23.928: allocated 26 bytes at 0x105f5bec0 (allocate default driver name)
ODPI [11122579] 2025-02-12 16:25:23.928: fn end dpiContext_createWithParams -> 0
ODPI [11122579] 2025-02-12 16:25:23.928: fn start dpiContext_getClientVersion(0x10abdf100)
ODPI [11122579] 2025-02-12 16:25:23.928: fn end dpiContext_getClientVersion(0x10abdf100) -> 0
ODPI [11122590] 2025-02-12 16:25:23.930: fn start dpiContext_initPoolCreateParams(0x10abdf100)
ODPI [11122590] 2025-02-12 16:25:23.930: allocated 3216 bytes at 0x162333c00 (allocate error buffer)
ODPI [11122590] 2025-02-12 16:25:23.930: fn end dpiContext_initPoolCreateParams(0x10abdf100) -> 0
ODPI [11122590] 2025-02-12 16:25:23.930: fn start dpiContext_initCommonCreateParams(0x10abdf100)
ODPI [11122590] 2025-02-12 16:25:23.930: fn end dpiContext_initCommonCreateParams(0x10abdf100) -> 0
ODPI [11122590] 2025-02-12 16:25:23.930: fn start dpiPool_create(0x10abdf100)
ODPI [11122590] 2025-02-12 16:25:23.930: allocated 80 bytes at 0x106f769f0 (allocate handle)
ODPI [11122590] 2025-02-12 16:25:23.930: allocated 352 bytes at 0x106f43fb0 (allocate env)
ODPI [11122590] 2025-02-12 16:25:23.930: ref 0x106f769f0 (dpiPool) -> 1 [NEW]

zsh: segmentation fault  DPI_DEBUG_LEVEL=127 node ./main.js
@sharadraju
Copy link
Member

sharadraju commented Feb 13, 2025

Thanks for reporting, but it seems to be a macOS ARM Instant Client-specific issue based on the stack trace.
Is this the first time that you are trying with macOS ARM Instant Client?

@daniele-orlando
Copy link
Author

Hi dear @sharadraju. I used the x86_64 version of Instant Client v19.8 in the past without issues. Only recently I have moved to the Arm64 version and since then I'am frequently and randomly encountering this issue.

@sharadraju
Copy link
Member

sharadraju commented Feb 18, 2025

Thanks @daniele-orlando . This is a macOS ARM64 Instant Client issue. However, we would be grateful, if you can somehow provide us a simple test case, so that we can take it up internally.
The crash seems similar to the issue reported in Oracle Forums here:
https://forums.oracle.com/ords/apexds/post/oracle-instant-client-macos-arm64-version-23-3-0-0-0-crashe-5221

Please add your issue in the above mentioned Oracle Forum post, so that it is easier to track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants