-
Notifications
You must be signed in to change notification settings - Fork 58
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
Memory issue #36
Comments
Could be an issue in |
Here is an example of my code. All 2s, I read all DBs of six 1511.
|
I've built node-snap7 from source with --debug configuration, but I don't know how to get more infos than this backtrace. *** Error in `node': corrupted size vs. prev_size: 0x0000000002d6bc00 *** |
Is this still a thing? I got some spare time now and I can't repro this on my machine so I'll try to set up a VM for this. Sorry for the delay :/ |
Thank you for attention. Yes I still have this error. Let me know if I can help you. |
I have written a program that is also running into this problem after random amounts of time. I am attaching my error log below. What else can I do to help to pin point what is causing the issue here? I am on CentOS 7.6, NodeJS 10.15.3, NPM 6.4.1, node-snap7 1.0.2. When this error happens my system is generating core dump files each time if those would be useful to you. *** Error in `node /home/CommandService': free(): invalid pointer: 0x0000000003f5a4d0 *** |
After reading this thread I have also run this command: If I get anymore useful logs after having run that I will report back with them. |
After having built node-snap7 from source with the --debug flag my backtrace error looks like this:
*** Error in `node /home/CommandService': corrupted size vs. prev_size: 0x0000000003ac2e20 *** |
Sorry for having not much time at the moment. Unfortunately I can't reproduce this. A minimal example on a fresh VM would help, so that I am able to reproduce this error and investigate the cause. Would also be nice if you can test if this happens for all non EOL major stable node versions. |
I have the same problem. |
hi @mathiask88, If there is an error in the code 655470, one of the following errors will definitely appear in the next db reading. I tested this 20 times
Edit: To avoid this error, I did something like this: |
Thanks for this great wrapper. I use the client to read periodically DBs of PLCs in a loop. Unfortunately, I always have a memory issue after a random time (Ubuntu 16.04 platform, Node.JS v8.9.0), like :
or :
May it be a bug ? Or bad design of my app ?
Here an example of one of this trace :
*** Error in `node': free(): invalid pointer: 0x0000000002e938a0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fb649f587e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7fb649f6137a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fb649f6553c]
/path/to/my/app/node_modules/node-snap7/build/Release/node_snap7.node(_ZN10node_snap78IOWorker16HandleOKCallbackEv+0x398)[0x7fb645a8b508] /path/to/my/app/node_modules/node-snap7/build/Release/node_snap7.node(_ZN3Nan11AsyncWorker12WorkCompleteEv+0x83)[0x7fb645a8f8f3]
/path/to/my/app/node_modules/node-snap7/build/Release/node_snap7.node(_ZN3Nan20AsyncExecuteCompleteEP9uv_work_s+0x15)[0x7fb645a8f7a5]
node[0x14549d5]
node[0x1456a8b]
node[0x14685e8]
node(uv_run+0x156)[0x1457416]
node(_ZN4node5StartEP9uv_loopsiPKPKciS5+0xc75)[0x122a035]
node(_ZN4node5StartEiPPc+0x163)[0x1222c93]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fb649f01830]
node[0x8ae4c1]
======= Memory map: ========
00400000-01fa2000 r-xp 00000000 08:01 402502 /home/me/.nvm/versions/node/v8.9.0/bin/node
021a2000-021bd000 rw-p 01ba2000 08:01 402502 /home/me/.nvm/versions/node/v8.9.0/bin/node
021bd000-021d4000 rw-p 00000000 00:00 0 02c72000-034a4000 rw-p 00000000 00:00 0 [heap]
[...]
7fb645a62000-7fb645ac0000 r-xp 00000000 08:01 1072693 /path/to/my/app/node_modules/node-snap7/build/Release/node_snap7.node
7fb645ac0000-7fb645cbf000 ---p 0005e000 08:01 1072693 /path/to/my/app/node_modules/node-snap7/build/Release/node_snap7.node
7fb645cbf000-7fb645cc1000 r--p 0005d000 08:01 1072693 /path/to/my/app/node_modules/node-snap7/build/Release/node_snap7.node
7fb645cc1000-7fb645cc7000 rw-p 0005f000 08:01 1072693 /path/to/my/app/node_modules/node-snap7/build/Release/node_snap7.node
7fb645cc7000-7fb645cd2000 r-xp 00000000 08:01 786995 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fb645cd2000-7fb645ed1000 ---p 0000b000 08:01 786995 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fb645ed1000-7fb645ed2000 r--p 0000a000 08:01 786995 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fb645ed2000-7fb645ed3000 rw-p 0000b000 08:01 786995 /lib/x86_64-linux-gnu/libnss_files-2.23.so
[...]
7fb649ee1000-7fb64a0a1000 r-xp 00000000 08:01 786931 /lib/x86_64-linux-gnu/libc-2.23.so
7fb64a0a1000-7fb64a2a1000 ---p 001c0000 08:01 786931 /lib/x86_64-linux-gnu/libc-2.23.so
7fb64a2a1000-7fb64a2a5000 r--p 001c0000 08:01 786931 /lib/x86_64-linux-gnu/libc-2.23.so
7fb64a2a5000-7fb64a2a7000 rw-p 001c4000 08:01 786931 /lib/x86_64-linux-gnu/libc-2.23.so
7fb64a2a7000-7fb64a2ab000 rw-p 00000000 00:00 0
7fb64a2ab000-7fb64a2c3000 r-xp 00000000 08:01 787018 /lib/x86_64-linux-gnu/libpthread-2.23.so
7fb64a2c3000-7fb64a4c2000 ---p 00018000 08:01 787018 /lib/x86_64-linux-gnu/libpthread-2.23.so
7fb64a4c2000-7fb64a4c3000 r--p 00017000 08:01 787018 /lib/x86_64-linux-gnu/libpthread-2.23.so
7fb64a4c3000-7fb64a4c4000 rw-p 00018000 08:01 787018 /lib/x86_64-linux-gnu/libpthread-2.23.so
7fb64a4c4000-7fb64a4c8000 rw-p 00000000 00:00 0
7fb64a4c8000-7fb64a4de000 r-xp 00000000 08:01 786957 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fb64a4de000-7fb64a6dd000 ---p 00016000 08:01 786957 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fb64a6dd000-7fb64a6de000 rw-p 00015000 08:01 786957 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fb64a6de000-7fb64a7e6000 r-xp 00000000 08:01 786972 /lib/x86_64-linux-gnu/libm-2.23.so
7fb64a7e6000-7fb64a9e5000 ---p 00108000 08:01 786972 /lib/x86_64-linux-gnu/libm-2.23.so
7fb64a9e5000-7fb64a9e6000 r--p 00107000 08:01 786972 /lib/x86_64-linux-gnu/libm-2.23.so
7fb64a9e6000-7fb64a9e7000 rw-p 00108000 08:01 786972 /lib/x86_64-linux-gnu/libm-2.23.so
7fb64a9e7000-7fb64ab59000 r-xp 00000000 08:01 921735 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7fb64ab59000-7fb64ad59000 ---p 00172000 08:01 921735 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7fb64ad59000-7fb64ad63000 r--p 00172000 08:01 921735 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7fb64ad63000-7fb64ad65000 rw-p 0017c000 08:01 921735 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7fb64ad65000-7fb64ad69000 rw-p 00000000 00:00 0
7fb64ad69000-7fb64ad70000 r-xp 00000000 08:01 787024 /lib/x86_64-linux-gnu/librt-2.23.so
7fb64ad70000-7fb64af6f000 ---p 00007000 08:01 787024 /lib/x86_64-linux-gnu/librt-2.23.so
7fb64af6f000-7fb64af70000 r--p 00006000 08:01 787024 /lib/x86_64-linux-gnu/librt-2.23.so
7fb64af70000-7fb64af71000 rw-p 00007000 08:01 787024 /lib/x86_64-linux-gnu/librt-2.23.so
7fb64af71000-7fb64af74000 r-xp 00000000 08:01 786945 /lib/x86_64-linux-gnu/libdl-2.23.so
7fb64af74000-7fb64b173000 ---p 00003000 08:01 786945 /lib/x86_64-linux-gnu/libdl-2.23.so
7fb64b173000-7fb64b174000 r--p 00002000 08:01 786945 /lib/x86_64-linux-gnu/libdl-2.23.so
7fb64b174000-7fb64b175000 rw-p 00003000 08:01 786945 /lib/x86_64-linux-gnu/libdl-2.23.so
7fb64b175000-7fb64b19b000 r-xp 00000000 08:01 786907 /lib/x86_64-linux-gnu/ld-2.23.so
7fb64b39a000-7fb64b39b000 r--p 00025000 08:01 786907 /lib/x86_64-linux-gnu/ld-2.23.so
7fb64b39b000-7fb64b39c000 rw-p 00026000 08:01 786907 /lib/x86_64-linux-gnu/ld-2.23.so
7fb64b39c000-7fb64b39d000 rw-p 00000000 00:00 0
7ffd437d6000-7ffd437f7000 rw-p 00000000 00:00 0 [stack]
7ffd437fb000-7ffd437fd000 r--p 00000000 00:00 0 [vvar]
7ffd437fd000-7ffd437ff000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
The text was updated successfully, but these errors were encountered: