I have an outbound thread configured to use a custom protocol UPOC (which worked fine under version 5.6). When the process starts, the thread comes online and all is fine. If the thread is stopped, everything is fine. If I then try to start the thread, the entire process will crash.
I have the thread configured to use the same UPOC in both read and write mode. The read mode is using advanced scheduling and it is in the read mode context that the engine appears to crash.
I have pared down the TCL file so that it is completely bare, yet the crash still occurs. Here is the UPOC currently:
proc fileUPOC { args } {
global HciConnName
keylget args MODE mode
set ctx “”; keylget args CONTEXT ctx
set uargs {}; keylget args ARGS uargs
set module “fileUPOC/$HciConnName/$ctx”
echo “$module: Running In Mode $mode”
}
When the process starts up, I see the following output from the UPOC in the process log.
fileUPOC/FILE_OUT/pdupoc_write: Running In Mode start
fileUPOC/FILE_OUT/pdupoc_read: Running In Mode start
However after I stop the thread and attempt to restart it, this is what I see in the process log immediately before the crash.
fileUPOC/FILE_OUT/pdupoc_write: Running In Mode start
[icl :tcpi:ERR /0: upoctest_cmd:11/11/2011 10:21:11] write failed: Bad file number
[cmd :cmd :INFO/0: upoctest_cmd:11/11/2011 10:21:11] Inrecoverable socket error. Closing connection.
[icl :icl :ERR /0: upoctest_cmd:11/11/2011 10:21:11] Shutdown failed: Bad file number
[icl :icl :ERR /0: upoctest_cmd:11/11/2011 10:21:11] Close failed: Bad file number
[icl :icl :ERR /0: upoctest_cmd:11/11/2011 10:21:11] imhVerify failed at free 0x30fef230
[icl :icl :ERR /0: upoctest_cmd:11/11/2011 10:21:11] 0x30fef230 type is 1431326531
[icl :icl :ERR /0: upoctest_cmd:11/11/2011 10:21:11] Bad attempt to free 0x30fef230
[icl :icl :ERR /0: upoctest_cmd:11/11/2011 10:21:11] 0x30fef230 type is 1431326531
PANIC: “0”
PANIC: Calling “pti” for thread upoctest_cmd
The “write” context is clearly executing correctly, but the “read” context never gets to my echo statement before the crash. If I reconfigure the thread so that it does not use a UPOC for reads, then the crash does not occur.
Has anybody else seen anything like this or is anybody else using a UPOC for both read and write in a Cloverleaf 5.8 thread?