[ts-gen] input corruption on mac
Richard Pruss
boadie at gmail.com
Thu Sep 3 00:37:14 EDT 2009
I am running into input corruption problems on the Mac (Darwin Kernel
Version 9.8.0, MacOs 10.5.8)
It has been awhile since I poked at trading-shim with more than an
open it run a single command and close it, but recently
I have been trying to do a little more from ruby, and ran into
`write': Broken pipe (Errno::EPIPE) from popen3, which pretty much
means
shim had gone away.
Now running exs/test.rb, I see I got a Broken Pipe as well -- ( why I
did not run this on compile is something that escapes me ... )
This error happens in the two copies I have on my machine shim-090812
and shim-090901
on stdout
"
<snip>
select tick ibc:53893055 at ECBOT 1; wait 2;
cancel tick ibc:53893055 at ECBOT; wait 0;
exs/test.rb:67:in `write': Broken pipe (Errno::EPIPE)
from exs/test.rb:67:in `print'
from exs/test.rb:67:in `exit_test'
from exs/test.rb:81
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open3.rb:80:in
`popen3'
from exs/test.rb:74
"
but far more interesting is the end of ShimText
"
<snip>
14405|50843| 0.000026|2|14| 1|14|1|5||||
14405|50844| 1.118206|4|11| 0|# select next;|
14405|50844| 0.000101|4|11| 0|# select exec AMAT 9:00:00;|
<snip>
14405|50844| 0.000027|1| 2| 0|select ne|
14405|50850| 5.998128|1| 0| 0||
14405|50850| 0.000185|4|11| 0|# select tick ibc: 266093 at SMART 1;
wait 2;|
14405|50850| 0.000032|1| 2| 0|xt;|
[EOF]
"
Note how select next has been broken up.
This does not just happening using popen3 from ruby. The shim shell
also does it.
"
~/dev/shim-090901] exs/test --data
The trading shim has connected to the database server and
loaded 51620 products. Tick: 1251900000 51556
The IB tws offered api level 44,
and connection negotiation resulted in an api level of 23
and a client id of 1. Tick: 1251900000 51557
A query shows the account code to
be DU60320. Program initialization has been completed.
zsh: bus error exs/test --data
"
again the interesting part is really in the ShimText
"
<snip>
14443|51557| 5444074|3| 7| 7|BHP
|STK||0.000000||USD|BHP|100|60.869999|6087.000000|36.900000|2397.000000|0.000000|DU60320|
14443|51557| 5444084|3| 8| 1|14:14|
14443|51557| 5444089|3| 8| 1|14:17|
14443|51557| 5447609|4|12| 0|# journal OrderResult(2);|
14443|51557| 5451627|1| 0| 0|#!./shim -f|
14443|51557| 5451697|4|11| 0|# set loglevel Detail;|
14443|51557| 5451758|4|11| 0|# select next;|
14443|51557| 5451831|4|11| 0|# select exec AMAT 9:00:00;|
<snip>
14443|51557| 5453605|4|11| 0|# cancel tick ibc:53893055 at ECBOT;
wait 0;|
14443|51557| 5453637|4|11| 0|# exit;|
14443|51557| 5453667|1| 2| 0|set loglev|
[EOF]
"
Again it seems that set loglev...el got choped up.
Looking at those two one may suspect something to do with select next
as it is near both but programs like kill.rb and past.30.rb all end
messily although past.30 goes for quiet awhile.
Any ideas?
-- Ric
More information about the ts-general
mailing list