-
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
Nodejs terminate itself after client called RFC #189
Comments
Need more info on your node-rfc environment. Could you please run the following command in your node project root folder and post the output: node -p "require('node-rfc').environment" |
The termination is the most likely related to one known bug in SAP NWRFC SDK PL7, causing accidental overwrite of RAM beyond string buffer boundaries. Do you have the older SDK version at hand, like PL6, please try with that one. Otherwise, please create a SAP standard support message for the BC-MID-RFC-SDK component, refer to this issue and request the preliminary shipment of the PL8 patch. |
Where can I find the PL6 SDK version, currently I follow this note (https://launchpad.support.sap.com/#/notes/2573790) and found only the PL7 version |
Only the latest SDK version is available, the PL7. The PL6 and older versions are not available. |
Do you have the release date of the PL8 version? |
This workaround should help with PL7 in the meantime. Unpack the zip or tar archive and copy the |
I'm using new sqpnwrfc.node but it's still not working |
It could be a different error than and need some more info. Could you please post your test script and the full console log, starting with the test script invocation and including any output, like: C:>\test\node test.js Did it work with older NWRFC SDK and which logon language is used ? Does the function module works correctly in ABAP, with more than 1,200 records? You can test the ABAP remote function module in ABAP system, using test transaction SE37. Can you reproduce the issue by calling ABAP standard remote function module or BAPI, not Z-module? Example with the module available in standard SAP system would help me locally reproduce and investigate. You can also activate the remote ABAP debugging and run the node test script. When the ABAP debugger shows up, you can stop before the |
The test with the PL6 or PL8 is not necessary because the workaround we already tried did not help. Before we close the support ticket 834664 / 2020, could you please update the ticket with the logon data, so that I can check the |
The results in SE37 are working correctly with more than 1,200 records. |
Thank you @valix999, I think that would be fastest/easiest way, if I can check directly by myself. Please write in that new incident that it is created only to get the system access, for processing this GitHub issue (insert the url). After the incident is created, please let me know also which input data to use for testing, to return more than 1,200 records. |
could you check below.
|
Same problem happens to when calling it happens 100% of times if returned records are 0; No error occurred when reading full tables with 25k or more records. |
could you tell me your environments. |
|
In my case with 2.2.0
test it if you have time. |
for some reasons i get an error while running |
test this.
|
Nothing, same error. |
hmm.
could you try node-rfc version 1.2.0
2021년 3월 18일 (목) 17:51, Roman Kis ***@***.***>님이 작성:
… test this.
1. download and unzip
2. replace this file to node_modules/node-rfc/lib/binding
3. test your code
sapnwrfc.zip <https://github.com/SAP/node-rfc/files/6162514/sapnwrfc.zip>
Nothing, same error.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#189 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKW64ODP53HYILS3DOXRL3TEG5KDANCNFSM4UHMTP4A>
.
|
1.2.0 is not compatible with my node v14 (it throws an exception), i tried any other library version still app crashes when calling "RFC_READ_TABLE" |
if you can using other nodejs.
.. I think it would be better to build a debug environment. |
@gimapei, @CrownKingClown, could you please share the source code of the script used in this test? I would like to reproduce and investigate:
|
`
});` |
Hi, just tested on Windows and Darwin and got no errors. Could you please test with the latest node-rfc and NWRFC SDK ? If the termination still occur, does it look like a timeout (how long it takes?) and is there any message? Environment noderfc: {
version: '2.4.1',
nwrfcsdk: { major: 7500, minor: 0, patchLevel: 8 }
} Test script const addon = require("node-rfc");
// client
const abapSystem = { dest: "MME" },
client = new addon.Client(abapSystem);
// query
const today = "20210428",
querysap = "FTRMI >= " + "'" + today + "'";
console.log(client.environment);
(async () => {
try {
await client.open();
//console.log(client.connectionInfo);
const res = await client.call("RFC_READ_TABLE", {
QUERY_TABLE: "CAUFV",
FIELDS: [
{
FIELDNAME: "AUFNR", //Ordine 000001154730
},
{
FIELDNAME: "OBJNR", //OBJect id OR000001154730
},
{
FIELDNAME: "GLTRP", //Data fine cardine 20210203
},
{
FIELDNAME: "GSTRP", //Data inizio cardine 20210128
},
{
FIELDNAME: "RSNUM", //Impegno 0069059068
},
{
FIELDNAME: "PLNBEZ", //Materiale M74.008400.01
},
{
FIELDNAME: "FTRMI", //Data rilascio eff. 20210128
},
{
FIELDNAME: "PLNNR", //Gruppo cicli MOT_1030
},
{
FIELDNAME: "GAMNG", //Quantità teorica 600.000
},
{
FIELDNAME: "GMEIN", //Unità di misura ST (PZ)
},
{
FIELDNAME: "STLNR", //Distinta base 00001069
},
{
FIELDNAME: "DISPO", //Responsabile MRP M02
},
],
DELIMITER: "|",
OPTIONS: [
{
TEXT: querysap,
},
],
});
console.log(res);
} catch (ex) {
console.log(ex);
}
})(); Output {
DELIMITER: '|',
NO_DATA: '',
QUERY_TABLE: 'CAUFV',
ROWCOUNT: 0,
ROWSKIPS: 0,
DATA: [],
FIELDS: [
{
FIELDNAME: 'AUFNR',
OFFSET: '000000',
LENGTH: '000012',
TYPE: 'C',
FIELDTEXT: 'Order Number'
},
{
FIELDNAME: 'OBJNR',
OFFSET: '000013',
LENGTH: '000022',
TYPE: 'C',
FIELDTEXT: 'Object number'
},
{
FIELDNAME: 'GLTRP',
OFFSET: '000036',
LENGTH: '000008',
TYPE: 'D',
FIELDTEXT: 'Basic finish date'
},
{
FIELDNAME: 'GSTRP',
OFFSET: '000045',
LENGTH: '000008',
TYPE: 'D',
FIELDTEXT: 'Basic Start Date'
},
{
FIELDNAME: 'RSNUM',
OFFSET: '000054',
LENGTH: '000010',
TYPE: 'N',
FIELDTEXT: 'Number of reservation/dependent requirements'
},
{
FIELDNAME: 'PLNBEZ',
OFFSET: '000065',
LENGTH: '000018',
TYPE: 'C',
FIELDTEXT: 'Material Number'
},
{
FIELDNAME: 'FTRMI',
OFFSET: '000084',
LENGTH: '000008',
TYPE: 'D',
FIELDTEXT: 'Actual release date'
},
{
FIELDNAME: 'PLNNR',
OFFSET: '000093',
LENGTH: '000008',
TYPE: 'C',
FIELDTEXT: 'Key for Task List Group'
},
{
FIELDNAME: 'GAMNG',
OFFSET: '000102',
LENGTH: '000013',
TYPE: 'P',
FIELDTEXT: 'Total order quantity'
},
{
FIELDNAME: 'GMEIN',
OFFSET: '000116',
LENGTH: '000003',
TYPE: 'C',
FIELDTEXT: 'Base Unit of Measure'
},
{
FIELDNAME: 'STLNR',
OFFSET: '000120',
LENGTH: '000008',
TYPE: 'C',
FIELDTEXT: 'Bill of material'
},
{
FIELDNAME: 'DISPO',
OFFSET: '000129',
LENGTH: '000003',
TYPE: 'C',
FIELDTEXT: 'MRP controller for the order'
}
],
OPTIONS: [ { TEXT: "FTRMI >= '20210428'" } ]
} Kind regards, |
Hi, I am also facing the same issue with "RFC_READ_TABLE". Node.js process terminates after reading 10000 data. I am getting data in chunks of 2000 so, after 10 RFC call to RFC_READ_TABLE it terminates. I tested it with different node-rfc version but still i got the same error after fetching 10000 record. Error: exited with code [3221226356] via signal [SIGINT]. It seems there is an issue with memory allocation. My Runtime: { Thanks, |
@rbhuva, need a test script to try to reproduce the issue. Please consider that using |
Hi @bsrdjan, To reproduce the issue, you can execute test_script attached test_script.txt Thanks, |
Hi @bsrdjan, Please find below trace logs that appeared when the application is crashed. Logs:- Thanks, |
hello.
what version of node-rfc are you using?
2021년 11월 17일 (수) 오후 2:13, Rajdeep Bhuva ***@***.***>님이 작성:
… Hi @bsrdjan <https://github.com/bsrdjan>,
Please find below trace logs that appeared when the application is crashed.
Logs:-
[APP/PROC/WEB.0] *** Error in `node': double free or corruption (fasttop):
0x0000000005087810 ***
07:58:23.721: [APP/PROC/WEB.0] ======= Backtrace: =========
07:58:23.721: [APP/PROC/WEB.0]
/lib/x86_64-linux-gnu/libc.so.6(+0x70bfb)[0x7f03022ccbfb]
07:58:23.721: [APP/PROC/WEB.0]
/lib/x86_64-linux-gnu/libc.so.6(+0x76fc6)[0x7f03022d2fc6]
07:58:23.721: [APP/PROC/WEB.0]
/lib/x86_64-linux-gnu/libc.so.6(+0x7780e)[0x7f03022d380e]
07:58:23.721: [APP/PROC/WEB.0]
/usr/src/app/node_modules/node-rfc/lib/binding/sapnwrfc.node(_ZN8node_rfc4PoolD2Ev+0xd3)[0x7f02fb5d2db3]
07:58:23.721: [APP/PROC/WEB.0]
/usr/src/app/node_modules/node-rfc/lib/binding/sapnwrfc.node(
*ZN4Napi10ObjectWrapIN8node_rfc4PoolEE16FinalizeCallbackEP10napi_env__PvS6*
+0x4b)[0x7f02fb5d8a7b]
07:58:23.721: [APP/PROC/WEB.0] node(
*ZN4node13CallbackQueueIvJPNS_11EnvironmentEEE12CallbackImplIZN15node_napi_env__13CallFinalizerEPFvP10napi_env__PvS8_ES8_S8_EUlS2_E_E4CallES2*
+0x6b)[0x9f083b]
07:58:23.721: [APP/PROC/WEB.0]
node(_ZN4node11Environment27RunAndClearNativeImmediatesEb+0x186)[0x9bbdb6]
07:58:23.721: [APP/PROC/WEB.0]
node(_ZN4node11Environment14CheckImmediateEP10uv_check_s+0x72)[0x9bc412]
07:58:23.721: [APP/PROC/WEB.0] node[0x137be3c]
07:58:23.721: [APP/PROC/WEB.0] node(uv_run+0x12f)[0x137432f]
07:58:23.721: [APP/PROC/WEB.0]
node(_ZN4node16NodeMainInstance3RunEv+0x1f6)[0xa5d726]
07:58:23.721: [APP/PROC/WEB.0] node(_ZN4node5StartEiPPc+0x2ac)[0x9eab6c]
07:58:23.721: [APP/PROC/WEB.0]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f030227c2e1]
07:58:23.721: [APP/PROC/WEB.0] node[0x982005]
07:58:23.721: [APP/PROC/WEB.0] ======= Memory map: ========
07:58:23.721: [APP/PROC/WEB.0] 00400000-02ab6000 r-xp 00000000 07:00
2686016 /usr/local/bin/node
07:58:23.721: [APP/PROC/WEB.0] 02cb5000-02cb8000 r--p 026b5000 07:00
2686016 /usr/local/bin/node
07:58:23.721: [APP/PROC/WEB.0] 02cb8000-02cc9000 rw-p 026b8000 07:00
2686016 /usr/local/bin/node
07:58:23.721: [APP/PROC/WEB.0] 02cc9000-02ce9000 rw-p 00000000 00:00 0
07:58:23.721: [APP/PROC/WEB.0] 04caf000-05100000 rw-p 00000000 00:00 0
[heap]
07:58:23.721: [APP/PROC/WEB.0] 276ee80000-276eec0000 ---p 00000000 00:00 0
07:58:23.721: [APP/PROC/WEB.0] 5dd0a00000-5dd0a40000 ---p 00000000 00:00 0
07:58:23.721: [APP/PROC/WEB.0] 903cd40000-903cd80000 ---p 00000000 00:00 0
07:58:23.721: [APP/PROC/WEB.0] b3c6040000-b3c6080000 rw-p 00000000 00:00 0
07:58:23.721: [APP/PROC/WEB.0] 127fea80000-127feac0000 ---p 00000000 00:00
0
07:58:23.721: [APP/PROC/WEB.0] 14cd6a00000-14cd6a41000 rw-p 00000000 00:00
0
07:58:23.721: [APP/PROC/WEB.0] 415e5300000-415e5340000 ---p 00000000 00:00
0
07:58:23.722: [APP/PROC/WEB.0] 7f02e9c4c000-7f02e9d85000 r-xp 00000000
07:00 41466007 /usr/sap/nwrfcsdk/lib/libicui18n.so.34
07:58:23.722: [APP/PROC/WEB.0] 7f02e9d85000-7f02e9e85000 ---p 00139000
07:00 41466007 /usr/sap/nwrfcsdk/lib/libicui18n.so.34
07:58:23.722: [APP/PROC/WEB.0] 7f02e9e85000-7f02e9e8e000 rw-p 00139000
07:00 41466007 /usr/sap/nwrfcsdk/lib/libicui18n.so.34
07:58:23.722: [APP/PROC/WEB.0] 7f02e9e8e000-7f02e9e8f000 rw-p 00000000
00:00 0
07:58:23.722: [APP/PROC/WEB.0] 7f02e9e8f000-7f02ea6fd000 r--p 00000000
07:00 41466005 /usr/sap/nwrfcsdk/lib/libicudata.so.34
07:58:23.722: [APP/PROC/WEB.0] 7f02ea6fd000-7f02ea7fc000 ---p 0086e000
07:00 41466005 /usr/sap/nwrfcsdk/lib/libicudata.so.34
07:58:23.722: [APP/PROC/WEB.0] 7f02ea7fc000-7f02ea7fd000 rw-p 0086d000
07:00 41466005 /usr/sap/nwrfcsdk/lib/libicudata.so.34
07:58:23.722: [APP/PROC/WEB.0] 7f02f80b1000-7f02f81fd000 r-xp 00000000
07:00 41466008 /usr/sap/nwrfcsdk/lib/libicuuc.so.34
07:58:23.722: [APP/PROC/WEB.0] 7f02f81fd000-7f02f82fd000 ---p 0014c000
07:00 41466008 /usr/sap/nwrfcsdk/lib/libicuuc.so.34
07:58:23.722: [APP/PROC/WEB.0] 7f02f82fd000-7f02f830a000 rw-p 0014c000
07:00 41466008 /usr/sap/nwrfcsdk/lib/libicuuc.so.34
07:58:23.722: [APP/PROC/WEB.0] 7f02f830a000-7f02f830b000 rw-p 00000000
00:00 0
07:58:23.722: [APP/PROC/WEB.0] 7f02f830b000-7f02f831f000 r-xp 00000000
07:00 2163471 /lib/x86_64-linux-gnu/libresolv-2.24.so
07:58:23.722: [APP/PROC/WEB.0] 7f02f831f000-7f02f851e000 ---p 00014000
07:00 2163471 /lib/x86_64-linux-gnu/libresolv-2.24.so
07:58:23.722: [APP/PROC/WEB.0] 7f02f851e000-7f02f851f000 r--p 00013000
07:00 2163471 /lib/x86_64-linux-gnu/libresolv-2.24.so
07:58:23.722: [APP/PROC/WEB.0] 7f02f851f000-7f02f8520000 rw-p 00014000
07:00 2163471 /lib/x86_64-linux-gnu/libresolv-2.24.so
07:58:23.722: [APP/PROC/WEB.0] 7f02f8520000-7f02f8522000 rw-p 00000000
00:00 0
07:58:23.722: [APP/PROC/WEB.0] 7f02f8522000-7f02f8527000 r-xp 00000000
07:00 2163450 /lib/x86_64-linux-gnu/libnss_dns-2.24.so
07:58:23.722: [APP/PROC/WEB.0] 7f02f8527000-7f02f8726000 ---p 00005000
07:00 2163450 /lib/x86_64-linux-gnu/libnss_dns-2.24.so
07:58:23.722: [APP/PROC/WEB.0] 7f02f8726000-7f02f8727000 r--p 00004000
07:00 2163450 /lib/x86_64-linux-gnu/libnss_dns-2.24.so
Thanks,
Rajdeep Bhuva
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#189 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKW64P4FJX7A6TGSY6BGHLUMM2WNANCNFSM4UHMTP4A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi @gimapei, node-rfc version : "2.4.2" |
Hi @gimapei, Thanks & Regards, |
Hi and sorry for the late reply. Could you please test with the RFC SDK PL9, released in Dec 2021 ? |
Hi rbhuva. I think most of the errors in my case were related to memory allocation in C++. If the error occurs even after using the latest version I've heard from my colleagues, Thanks |
Thank you for your help. This is working fine and tested with latest version of node-rfc and SDK PL9. Thanks, |
Hi @rbhuva, thank you very much for finding and sharing the root cause. It looks like a reproducible bug, that shall be investigated and fixed The issue remains open until that is done. Regards, srdjan |
@rbhuva |
Not a bug, solved by newer SDK version and fixed application code. |
I found a problem with calling RFC that returns more than 1,200 records and makes the application terminate itself with no error log or any exception. As from the image parameter "IM_LIMIT_BRANCH" will limit the amount of returned records (my return records are "ET_BRANCH").
Are there any missing configs from my node-rfc client?
The text was updated successfully, but these errors were encountered: