This is a discussion on C UDR crashes the server within the Informix forums, part of the Database Server Software category; --> Hi all, This is pretty long, but if you have time to skim it and if you've seen something ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all, This is pretty long, but if you have time to skim it and if you've seen something like this I'd appreciate a pointer in the right direction. I've researched this and I think there's some bad memory related issues here. I've also found several links to known issues in earlier versions of Informix that were supposedly fixed...but maybe not. Thanks in advance for your time! :-) I've written a C UDR that's trying to just select from a table containing one row. The select is "select * from ing_property;" . When this is called via mi_exec with a valid connection (MI_CONNECTION*), as in: #define ING_TEST_SQL "select * from ing_property;" mi_string* sqlString; sqlString = (char*)ING_TEST_SQL; fprintf(stderr,"IngParseInput.c::IngGetProperties - query is '%s'\n",s qlString); if (conn == NULL) { fprintf(stderr,"Conn was null in IngParseInput.c\n") ; } else { fprintf(stderr,"Conn was not null in IngParseInput.c\n"); } if ( MI_ERROR == mi_exec(conn, sqlString, MI_QUERY_NORMAL) ) { //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< FAILS HERE fprintf(stderr,"IngParseInput.c::IngGetProperties - query failed\n"); mi_db_error_raise(conn, MI_EXCEPTION, "mi_exec failed\n"); } else { fprintf(stderr,"IngParseInput.c::IngGetProperties - getting nextrow of the query\r\n"); oneRow = mi_next_row(conn,&error) ; /* handle fields in oneRow */ ...... } The code fails on the mi_exec statement every time. Below you'll see a trace of the fprintf statements I have in my code... Note that it gets to the mi_exec statement and then appears to print a license line over and over and the server crashes. I'm using a trial version to write something for a customer that has the full, paid for version. This code comes straight from an example in the Datablade programmers guide. bash-2.05b# encryptVarchar - enteredconnected to db, getting dbInfoUser is informixIngIdxIcspInit.c::checking IngIcspReady... IngIdxIcspInit.c::initializing IngInputDef IngIdxIcspInit.c::IS NOT NULL!!! IngIdxIcspInit.c::stepping into IngGetProperties IngParseInput.c::IngGetProperties - entering IngParseInput.c::IngGetProperties - logging a msg, an Ing_Init is 360 bytes IngParseInput.c::IngGetProperties - inputDef was not null, moving on IngParseInput.c::IngGetProperties - logging a msg2 IngParseInput.c::IngGetProperties - logging a msg3 IngParseInput.c::IngGetProperties - logging a msg4 IngParseInput.c::IngGetProperties - query is 'select * from ing_property;' Conn was not null in IngParseInput.c Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 The OS is AIX 5.2 and IDS is 10.00.UC6TL. Here's some interesting stuff from the af file that got created - the errors look pretty ugly: 11:22:34 On-Line Mode 11:23:35 Loading Module </home/bret/informix/src/ InformixConnector.so> 11:23:36 The C Language Module </home/bret/informix/src/InformixConnector.so> loaded 11:23:36 Assert Failed: Condition Failed (Bad pool pointer 0x502b8020), In (mt_shm_malloc_segid) 11:23:36 IBM Informix Dynamic Server Version 10.00.UC6TL 11:23:36 Who: Session(12, bret@, 278618, 4022ac48) Thread(36, sqlexec, 40202954, 1) File: mtshpool.c Line: 3190 11:23:36 Action: Please notify IBM Informix Technical Support. 11:23:36 stack trace for pid 364644 written to /data/informix/ids/tmp/af.40c8ba7 11:23:36 See Also: /data/informix/ids/tmp/af.40c8ba7, shmem.40c8ba7.0 11:24:19 Condition Failed (Bad pool pointer 0x502b8020), In (mt_shm_malloc_segid) 11:24:22 Assert Failed: Memory free block header corruption detected in mt_shm_malloc_segid 1 11:24:22 IBM Informix Dynamic Server Version 10.00.UC6TL 11:24:22 Who: Session(12, bret@, 278618, 4022ac48) Thread(36, sqlexec, 40202954, 1) File: mtshpool.c Line: 3471 11:24:22 Results: Pool not repaired 11:24:22 Action: Please notify IBM Informix Technical Support. 11:24:22 stack trace for pid 364644 written to /data/informix/ids/tmp/af.40c8ba7 11:24:22 See Also: /data/informix/ids/tmp/af.40c8ba7 11:24:39 Memory free block header corruption detected in mt_shm_malloc_segid 1 11:24:42 (-9791): ERROR: SAPI callback fail -- procname=<encryptvarchar> procid=281 11:24:42 stack trace for pid 364644 written to /data/informix/ids/tmp/af.40c8ba7 11:24:42 Assert Failed: No Exception Handler 11:24:42 IBM Informix Dynamic Server Version 10.00.UC6TL 11:24:42 Who: Session(12, bret@, 278618, 4022ac48) Thread(36, sqlexec, 40202954, 1) File: mtex.c Line: 472 11:24:42 Results: Exception Caught. Type: MT_EX_OS, Context: mem 11:24:42 Action: Please notify IBM Informix Technical Support. 11:24:42 stack trace for pid 364644 written to /data/informix/ids/tmp/af.40c8ba7 11:24:42 See Also: /data/informix/ids/tmp/af.40c8ba7 Rgds, Bret |