-
Notifications
You must be signed in to change notification settings - Fork 74
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
Segmentation fault (core dumped) #234
Comments
Just to check if my understanding of the flow is correct:
Could you please confirm which of two connection handles triggers the segfault? And could you please record and attach here the detailed log, from initial call to segfault, by setting the trace level '3' in the DEFAULT section of sapnwrfc.ini DEFAULT
RFC_TRACE=3 # 'global' trace level
DEST=QM7
USER=demo
PASSWD=welcome
ASHOST=ldciqm7
SYSNR=00
CLIENT=005
LANG=EN
# RFC_TRACE=2 # 'local' trace level |
|
Here is the log at trace level 3 |
Could you please attach complete log files or email to me? Can you figure out if segfault occurs for the connection handle from initial call or another one? |
Here is a scenario when we try to do cancelClient, we get error. Kindly find the log attached,
|
Sorry, I meant the RFC trace log, captured in *.trc files |
Could you please send the source script to reproduce the issue? |
Fun fact, I have the same issue but wrapping the code inside @bsrdjan quick question re this topic - is it expected behavior that |
Upon further inspection I'm either missing something or some very illegal behavior is happening. As far as I understand a worker thread is created in But why do we need to spawn a worker thread to cancel something? Can't it be done on the same thread? Just calling cancel directly? |
Indeed, cancelling the client in the main thread with a simple call to EDIT: Just to elaborate on why I called the behavior illegal, in (As a side note it is generally not recommended to cache the environment, though I can understand doing it in node-rfc as libsapnwrfc generally does not operate well with multiple programs / independent threads using it) |
From SAP NWRFC SDK doxygen documentation of
It is definitely a bug, need to investigate a clean solution here. |
Ok, but then you can spawn a simple thread for that purpose alone without inuring the entire separate environment of a worker thread, no? Just using regular pthreads (or in this case Does that sound cleaner? I personally would certainly choose to go that route |
@samuel-c-allan, yes it sound good and shall be tested. Would you like to create a PR? |
@bsrdjan I would love to :) Let me code up something, submit a PR and then you can check whether it is presentable |
@bsrdjan Quick question - are you fine if we go with |
Describe the bug
I am using connection pool to acquire, call (With timeout) and release connection. On timeout, I receive the event sapnwrfc:clientCancel.
I get a Segmentation fault (core dumped) error and my node application crashes which needs a restart to work properly.
To Reproduce
Version of node-rfc - 2.5.1 installed locally
To reproduce the issue,
poolOptions: { low: 2, high: 10 }
Connection handle details are as follows,
Initial call connection handle - 139949697433968
Other two API call connection handle are - 139949697433968 & 139949965870272
The text was updated successfully, but these errors were encountered: