Closed SchroterQuentin closed 4 years ago
Could you please let me know the node-rfc version and SAP NWRFC SDK version? I would like to add some more information to error log.
Do you maybe know which ABAP RFC is called, raising this condition?
Yes sure. We are using node-rfc 1.0.6 with the 7.50 NWRFC SDK.
We are actually calling the BAPI ZARTICLE which is a custom BAPI my boss wrote and I may find you the import and result definition for this BAPI if you need it ?
The import and result definition could help if not many parameters and/or complex data structures in this RFM (Remote Function Module). What is missing in node-rfc are more error info and more info about parameter/field causing this error. Is it possible to reproduce the error, with specific set of input parameters?
Here comes the definition (the description is in french, sorry), if you need anything else, just ask. I upgraded the connector to use the 1.2.0 release and I didn't get any issue since. I'm still getting a lot of segfault but we are not using the pool of connection and making a lot of connection in the same time for the same user with one connection per BAPI call ; which is certainly an incorrect use of the sdk.
I'm wondering why there is segfault with the node-rfc connector and not the pyRFC connector ?
When the wrapString
fails, the fatal error is raised because of the assumption that if wrapString
does not work, then the regular error info can't be "wrapped" into standard node-rfc error. That assumption from the node-rfc early days is no longer valid. The wrapString
logic is quite stable and the error in wrapString
should be propagated as a standard error. That needs to be changed in the next release.
Two types of errors can happen here:
1) Conversion buffer too small, which is not the case here. Based on error log, the ABAP field unicode length is 8 and 48 bytes are allocated for the conversion. 6 bytes per unicode symbol should be enough
2) SAP_CHAR value can't be converted to UTF-8. It could be for example an (int) value or surrogate halve not used in Unicode, or sequence corrupted some other way. That is what more likely happens here but without error log only guessing. Why PyRFC works different, need to check, after finding out which behaviour is correct -> depending on whether the ABAP value is correct unicode or not.
If possible to reproduce this error without huge amount of RFC calls, you could activate the RFC trace and send me the trace files after the error happens?
In sapnwrfc.ini file the default trace level shall be set to "3" and also for the destination set to "3". Something like:
DEFAULT
RFC_TRACE=3
DEST=MME
USER=demo
PASSWD=welcome
ASHOST=10.68.110.51
SYSNR=00
CLIENT=620
LANG=EN
TRACE=3
Instead of fatal error, an nodeRfcError
is now raised, with the message ABAP string could not be parsed to unicode
and with rfmPath
pointing to affected field. Please feel free to try with 2.0.2 release.
I'm facing an issue which appear some times but not every times.
Do you have any idea what may cause this crash ? What kind of informations do you need ?