node-informix icon indicating copy to clipboard operation
node-informix copied to clipboard

Problems after upgrade to SDK 4.10.FC12W1

Open mklaust opened this issue 6 years ago • 5 comments

I'm experiencing an issue that appears to be related to the Informix SDK version.

My workstation is currently running CentOS 7.6.1810.

When Informix SDK 4.10.FC8DE is installed, the npm package appears to work fine because I am able to interact with the database without issue.

When Informix SDK 4.10.FC12W1 is installed, my node server crashes as soon as an Informix.query() call is made. I, unfortunately, haven't figured out how to capture any info regarding where the problem occurs, and I'm unable to catch any errors in order to provide more details.

I suspect the issue is an incompatibility between the npm informix package and this particular version of the SDK. I'm hoping that you can help confirm this and potentially let me know if there's anything I can do to get it working with this version.

If there's something I can do to provide additional details, let me know. Thanks in advance for the help.

mklaust avatar Mar 29 '19 16:03 mklaust

Do you need a license with SDK 4.10.FC12W1? If so is the license setup correctly where you are running your server? Can you run dbaccess to check whether the license is setup correctly?

Since the main SDK version hasn't changed I doubt there are API incompatibilities between 4.10.FC8DE and 4.10.FC12W1. From what I can think of it could be a license issue or if you compile in one place and run in another, it is possible to have binary incompatibilities.

Note that you need to compile and run against the same version of SDK (and on the same platform).

uatuko avatar Mar 29 '19 17:03 uatuko

Thanks for the response...

I do not believe it's a license issue. I am able to run dbaccess without issue on the workstation.

I too had my doubts about it being an incompatibility issue given that it's a minor version change (based on the version number). However, if the SDK version is rolled back to SDK 4.10.FC8DE followed by an "npm uninstall informix" and then an "npm install informix" to trigger a compile, my node server works fine. However, if the SDK version is updated to FC12 and I follow the same approach to trigger a recompile, every call to query() causes the server to crash. Note that I ran this test without changing any of the code in my server. The only change was the SDK version and the uninstall/install of the npm package.

I'm sure it's possible that there's something I'm doing that's triggering this issue. I just don't know what it would be. I haven't had an issue with the package until now.

mklaust avatar Apr 01 '19 03:04 mklaust

Any luck with this? I'm having the same issue with 4.10.FC12W1. No change in my code either just updating to FC12W1 seems to cause the segfault.

I tested the SDK by compiling a simple esql program (see: http://www-01.ibm.com/support/docview.wss?uid=swg22001374) and it was able to connect and query the database server fine.

I used segfault-handler to try and see where it segfaults and it dumps the following:

ID 375 received SIGSEGV for address: 0x10 /app/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x2cb1)[0x7f50a961ecb1] /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0)[0x7f50ac3d60e0] /lib/x86_64-linux-gnu/libpthread.so.0(pthread_mutex_lock+0x0)[0x7f50ac3ceb40] /opt/informix/lib/esql/libthos.so(ifx_th_mutex_lock+0x9)[0x7f50a8aed8c8] /opt/informix/lib/esql/libthos.so(ifxOS_th_mutex_lock+0x13)[0x7f50a8aed36c] /opt/informix/lib/esql/libthos.so(ifxOS_thread_mutexLock+0x9)[0x7f50a8aed464] /opt/informix/lib/esql/libthsql.so(+0x1509b)[0x7f50a91bc09b] /opt/informix/lib/esql/libthsql.so(sqli_connect_open_tcb+0x13a)[0x7f50a91bf0ea] /opt/informix/lib/esql/libthsql.so(sqli_connect_open+0x53)[0x7f50a91bf96e] /app/node_modules/informix/build/Release/ifx.node(ZN5esqlc7connectEPKcS1_S1_S1+0x53)[0x7f50a94179b3] /app/node_modules/informix/build/Release/ifx.node(_ZN3ifx7workers7Connect7ExecuteEv+0x3f)[0x7f50a941343f] node[0xa6a11e] /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4)[0x7f50ac3cc4a4] /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f50ac10ed0f] Segmentation fault (core dumped)

sandaya avatar Aug 14 '19 20:08 sandaya

Thanks for the core dump.

It is possible this is related to threads so the example from IBM isn't a like for like comparison. I'll take another look.

uatuko avatar Aug 14 '19 21:08 uatuko

Found one google hit suggesting it could be a bug in Informix SDK https://www.cursor-distribution.de/en/ibm-software/support-informix/index.php?option=com_ibmbuglist&view=bugdetail&type=Informix&get_bug=IT28360&Itemid=1185

uatuko avatar Aug 14 '19 21:08 uatuko