Comments (9)
new kind of error, did not have it before. Is it reproducible or happens randomly?
Which os release, nodejs and node-rfc version are used ? Can you share the script to reproduce ?
from node-rfc.
Unfortunately it is not reproducible... it just happens at some point. Now that I upgraded to NodeJS V7 the error above does not occur anymore but instead NodeJS simply stops with exit status 139 (i.e. segmentation fault). Could it be related to memory problems if too many RFCs are triggered?
from node-rfc.
looks more like a concurrency issue but that is just guessing. On which os platform / node-rfc release combination it happens?
from node-rfc.
That could be indeed a problem as I have two node-rfc instances I use in parallel. The problem occurs on Ubuntu 16.04 and the latest node-rfc from Github. Now I also got this error:
*** Error in `node': corrupted double-linked list: 0x00007fb410011ec0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fb43b2417e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x7e6f8)[0x7fb43b2486f8]
/lib/x86_64-linux-gnu/libc.so.6(+0x800a8)[0x7fb43b24a0a8]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fb43b24d98c]
/usr/sap/nwrfcsdk/lib/libsapnwrfc.so(+0x1d1598)[0x7fb438981598]
/usr/sap/nwrfcsdk/lib/libsapnwrfc.so(+0x1d8cae)[0x7fb438988cae]
/usr/sap/nwrfcsdk/lib/libsapnwrfc.so(+0x1e6bd2)[0x7fb438996bd2]
/usr/sap/nwrfcsdk/lib/libsapnwrfc.so(+0x14b850)[0x7fb4388fb850]
/usr/sap/nwrfcsdk/lib/libsapnwrfc.so(+0x7b80d)[0x7fb43882b80d]
/usr/sap/nwrfcsdk/lib/libsapnwrfc.so(+0x85cd0)[0x7fb438835cd0]
/usr/sap/nwrfcsdk/lib/libsapnwrfc.so(RfcCloseConnection+0x4a)[0x7fb4387ff53a]
/opt/node-rfc/build/Release/rfc.node(_ZN6ClientD2Ev+0x43)[0x7fb438fbf753]
/opt/node-rfc/build/Release/rfc.node(_ZN6ClientD0Ev+0x11)[0x7fb438fbf811]
node(_ZN2v88internal13GlobalHandles31DispatchPendingPhantomCallbacksEb+0x109)[0xe63699]
...
from node-rfc.
The node-rfc
supports concurrent connections in a single nodejs instance, with multiple calls per connection in parallel. Based on the log I am not sure what the cause could be.
I tried to reproduce on Ubuntu 16.04 using the new unit test in dev
branch and got no errors.
It opens 10 concurrent connections and starts 100 calls in parallel, in each connection.
Could you please try to reproduce on your system using the script from the unit test ? If no error occurs, could you please try reproduce using similar test script and upload the script ?
Which sapnwrfc lib are you using ? The output of:
var rfc = require('./build/rfc/rfc.node');
var c = new rfc.Client({})
console.log(c.getVersion());
from node-rfc.
I've managed to reproduce this error somehow.
If I call client.ping()
while an RFC call is underway, I get the "segmentation fault" error.
I found this trying to reuse a client connection. I was testing if it was still alive by pinging the server.
(Yes, I know the documentation says it's not supposed to be used like that...)
Anyway, here's a simple script to reproduce the error:
var rfc = require('node-rfc');
var abapSystem = {
user: '...',
passwd: '...',
ashost: '...',
sysnr: '00',
client: '400'
};
var rfcClient = new rfc.Client(abapSystem);
console.log('RFC Client is connecting...');
rfcClient.connect(function(err) {
if (err)
return console.error('(rfc.Client) Could not connect to server', err);
console.log('RFC Client is connected.');
setInterval(function() {
console.log('ping');
rfcClient.ping(); // <---- THIS is what causes the segmentation fault
}, 100);
console.log('Calling RFC function...');
rfcClient.invoke('RFC_SYSTEM_INFO', {}, (rfcErr, rfcRes) => {
if (rfcErr)
return console.error('Error invoking RFC_SYSTEM_INFO:', rfcErr);
console.log('Result from RFC_SYSTEM_INFO:', rfcRes);
});
});
OS: Windows 7 Professional x64
Node: v6.10.3
NW RFC SDK: [ 7210, 0, 42 ]
from node-rfc.
reproduced on Windows and Linux, sometimes segfault, sometimes gets stalled:
var binary = require('node-pre-gyp');
var path = require('path');
var rfcPath = binary.find(path.resolve(path.join(__dirname,'../package.json')));
console.log('rfc path:', rfcPath);
var rfc = require(rfcPath);
var abapSystem = {
user: 'DEMO ',
passwd: 'welcome',
ashost: '10.68.104.164',
sysnr: '00',
client: '620',
// trace: '3',
lang: 'EN'
};
var rfcClient = new rfc.Client(abapSystem);
console.log('rfcClient:', rfcClient.getVersion());
console.log('RFC Client is connecting...');
rfcClient.connect(function(err) {
if (err)
return console.error('(rfc.Client) Could not connect to server', err);
console.log('RFC Client is connected.');
setInterval(function() {
console.log('ping');
rfcClient.ping(); // <---- THIS is what causes the segmentation fault
}, 100);
setInterval(function() {
console.log('Calling RFC function...');
rfcClient.invoke('BAPI_USER_GET_DETAIL', {USERNAME: 'DEMO'}, (rfcErr, rfcRes) => {
//rfcClient.invoke('RFC_SYSTEM_INFO', {}, (rfcErr, rfcRes) => {
if (rfcErr)
return console.error('Error invoking function:', rfcErr);
console.log('Result from RFC function:', rfcRes);
});}, 2000);
});
from node-rfc.
I'm having segfault issues as well in our app.
I'm not going to bother with posting my code, it's very similar to that of @bsrdjan.
from node-rfc.
Fixed in NAPI, with async ping.
from node-rfc.
Related Issues (20)
- Can't able to upload excel file using node rfc HOT 1
- Change we change the default port 3300 to 3600 without changing connection string HOT 4
- receving idoc using node-rfc HOT 3
- Installation fails HOT 14
- [rl-reuse_tool-2] Violation against OSS Rules of Play
- [rl-reuse_tool-4] Violation against OSS Rules of Play
- Problem with node 20.10 LTS HOT 1
- Can't get environment on Windows env HOT 2
- Dynamic Connection and Cache HOT 8
- node-rfc installation not working HOT 2
- Difference between client.call and client.invoke HOT 4
- Using node-rfc on web workers HOT 1
- Getting Error: Conversion Error between Character Sets HOT 1
- SAP document listener in node js HOT 1
- TypeScript types for exceptions
- Node Js server crashes after a few RFC calls
- device or resource busy
- Call for Maintainers & Support
- Backslash in password does not work via rfc login
- String expected from NodeJS for the field of type 0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-rfc.