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

ResultSet closeAsync cause a segfault #64

Open
mreis1 opened this issue Jun 25, 2020 · 2 comments
Open

ResultSet closeAsync cause a segfault #64

mreis1 opened this issue Jun 25, 2020 · 2 comments

Comments

@mreis1
Copy link

mreis1 commented Jun 25, 2020

Hello @asfernandes
I came across this error recently. I know it occurs when this.resultSetHandle!.closeAsync(status) is called at line 36 of node-firebird-driver-native/src/lib/resultset.ts

Using segfault-handler I manage to capture the native addon stack trace.
Do you have an idea of what might be going wrong ? Is there a way to handle this error?


[
  "0   segfault-handler.node               0x000000010df8e040 _ZL16segfault_handleriP9__siginfoPv + 304",
  "1   libsystem_platform.dylib            0x00007fff6a6ef42d _sigtramp + 29",
  "2   addon.node                          0x0000000109f3f86c _ZNSt3__110__function6__funcIZN9ResultSet10closeStartEbRKN4Napi12CallbackInfoEE5$_131NS_9allocatorIS7_EEFPvvEEclEv + 88",
  "3   addon.node                          0x0000000109e95c2b _ZN13PromiseWorkerIPvE7ExecuteEv + 89",
  "4   addon.node                          0x0000000109e9601b _ZN4Napi17CustomAsyncWorker9OnExecuteEP10napi_env__Pv + 23",
  "5   node                                0x00000001009e030c worker + 274",
  "6   libsystem_pthread.dylib             0x00007fff6a6fae65 _pthread_start + 148",
  "7   libsystem_pthread.dylib             0x00007fff6a6f683b thread_start + 15"
]
@asfernandes
Copy link
Owner

It could happen if you call async functions not awaiting (with await or promises.then) them and calling another async functions related. For example: calling close two times. Closing a resultSet and the connection simultaneously.

If it's not the case it could be analyzed with a more or less consistent reproducable test case.

@mreis1
Copy link
Author

mreis1 commented Jul 1, 2020

Ok. I'll attempt to create some use cases and post them here.

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

No branches or pull requests

2 participants