Login Page - Create Account

Support Board


Date/Time: Sat, 20 Apr 2024 01:36:09 +0000



Orders sent to SC via DTC Causes SC to Freeze in Build 1809

View Count: 1028

[2018-09-27 04:40:03]
User60271 - Posts: 63
I recently upgraded to the latest build (1809) from 1785. I'm using a DTC client to send orders to SC however in the latest build (1809), SC freezes after several orders have been sent, acknowledged and filled. There is no error message in SC message log window and SC needs to be killed and restarted. The DTC client has been working without issue with build 1785. I've the reviewed the DTC protocol headers between the the builds and there doesn't appear to be any changes in order/execution related messages between the builds.
[2018-09-27 14:28:29]
Sierra Chart Engineering - Posts: 104368
We do not have any other reports of this and do not notice this and this functionality is extensively used.

What is the particular encoding being used for the DTC protocol?
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-09-27 14:28:43
[2018-09-27 15:37:57]
User60271 - Posts: 63
Binary encoding. I can replicate it. It occurs relatively quickly after a few orders are sent.
[2018-09-27 20:45:55]
Sierra Chart Engineering - Posts: 104368
Obviously this is a serious issue and it needs to be immediately resolved, but we do not know how to reproduce it, assuming it is an issue on our side. Sounds like it based on your description. But we really do not know what is the problem. Run a sub instance of Sierra Chart through File >> New Instance and submit the same orders through the Trade Window and see if you can reproduce the problem. Instructions:
Basic Trading and the Trade Window: Entering an Order from the Trade Window

Make sure that Trade >> Trade Simulation Mode is disabled.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-09-28 04:45:27]
User60271 - Posts: 63
I should add that the issue was identified when sending the orders to SC when it was in Trade Simulation Mode as it was part of a test I normally run after each upgrade before using the upgraded version for live orders. I haven't run the 1809 build with live orders submitted via DTC.
[2018-09-28 04:48:13]
Sierra Chart Engineering - Posts: 104368
Okay, Just enable Trade Simulation Mode in the main instance of Sierra Chart.

We need to know how to reproduce the problem using a sub instance because if it is not even reproducible as described in post #4 we are not going to see how to reproduce this. You should be able to reproduce this by using a sub instance of Sierra Chart.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-09-28 04:49:24
[2018-09-28 08:29:57]
User60271 - Posts: 63
So far I have been unable to replicate the freeze manually submitting orders using the sub instance via the Trade Window. I tried modifying existing orders using the Chart Trade mode in the sub instance but again was unable to replicate the freeze.

From the DTC client side log, the last DTC message sent before the freeze was a Cancel Replace. Do order modifications sent via the Trade Window using a sub instance or Chart Trade Mode send a single DTC Cancel Replace message or a separate Cancel and New Order messages ?
[2018-09-28 08:32:29]
Sierra Chart Engineering - Posts: 104368
Order modifications always use a Cancel and Replace message from a sub instance and also from the main instance.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-09-28 08:53:04]
Sierra Chart Engineering - Posts: 104368
It might be something related to order IDs. Are you changing the client order ID on a modification?
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-09-28 09:28:25]
User60271 - Posts: 63
Client order ID is maintained across modifications. I may have isolated it further. If I open SC but do not open any charts then send orders via DTC to SC it is stable after >2000 DTC order messages.
[2018-09-28 09:43:19]
User60271 - Posts: 63
Unfortunately it froze again but managed to process >35000 DTC order messages under the previously described scenario whereas with charts displayed it freezes much earlier.
[2018-09-28 09:56:28]
User60271 - Posts: 63
Maybe unrelated but on restart the Trade Activity log contains many of the following entries :

>>
Trade Activity Log: Encountered unknown field code during read record: 100 | 2018-09-28 04:50:49
Trade Activity Log: Encountered unknown field code during read record: 0 | 2018-09-28 04:50:49
Trade Activity Log: Encountered unknown field code during read record: 100 | 2018-09-28 04:50:49
Trade Activity Log: Encountered unknown field code during read record: 0 | 2018-09-28 04:50:49
Trade Activity Log: Encountered unknown field code during read record: 0 | 2018-09-28 04:50:49
Trade Activity Log: Encountered unknown field code during read record: 1694498816 | 2018-09-28 04:50:49
Trade Activity Log: Encountered unknown field code during read record: 67108864 | 2018-09-28 04:50:49
>>
[2018-09-28 10:10:44]
Sierra Chart Engineering - Posts: 104368
Exit from Sierra Chart and rename the TradeActivityLog.data file to some other name and then see if you encounter these unknown field code messages again.

The freezing could be happening in the Trade Activity Log, if it is displaying a lot of information. But that would still be just a momentary freeze.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-09-28 10:15:52]
User60271 - Posts: 63
No errors reported in Trade Service Log after the rename.
[2018-09-28 11:53:09]
User60271 - Posts: 63
Given the inconsistency of the freeze, it is probably not directly related to the DTC server given that 35k messages,covering a large range of messages types, were correctly processed with no charts displayed.
[2018-09-28 17:43:59]
Sierra Chart Engineering - Posts: 104368
So do you run into a problem when a chart is open? As long as we know how to reproduce it, we should be able to track this down.

Also in regards to this:

>>
Trade Activity Log: Encountered unknown field code during read record: 100 | 2018-09-28 04:50:49

We have an idea why this occurs and we will implement a solution. Since the data is cached and when the cache is flushed, it is not done on a record boundary. Therefore, if there is an abnormal shutdown of Sierra Chart, which would be unlikely but is happening when you are terminating Sierra Chart, there is then going to be an incomplete record which exist which leads to this condition. We will develop a solution to this.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-09-29 02:10:18]
User60271 - Posts: 63
With two charts displayed including one with a symbol receiving orders via DTC and Chart Trade Mode enabled, the freeze occurs after sending a small number of DTC order-related messages (<20). With no charts displayed the freeze doesn't occur until after a larger number of DTC order-related messages (>1000) have been sent to/acknowledged by SC. In both scenarios SC was running in Trade Simulation mode.
[2018-09-29 04:40:03]
Sierra Chart Engineering - Posts: 104368
Doing exactly this, testing with the symbol EURUSD, we cannot reproduce the issue using a sub instance of Sierra Chart. Neither the sub innocence or the main instance is freezing.

And when you see the freeze condition, go to the Windows task manager, do you notice that the CPU usage for the SierraChart.exe process is higher than 0%?

Are you testing using a sub instance of Sierra Chart for sending the orders? We need to be able to reproduce it using that scenario because that is using the DTC server also.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-09-29 08:29:27]
Sierra Chart Engineering - Posts: 104368
If you can send us the program you are using which creates this problem and also the Chartbook you are using, we can then test that because otherwise, it seems like it is going to be impossible for us to reproduce.

And also see if you still notice the problem on version 1813.



Another thing, if you notice that when Sierra Chart freezes there is no CPU usage of the Sierra Chart process, then it is a deadlock condition and that will tell us where to look. At this point, that would be the only reasonable explanation.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-09-29 09:07:19
[2018-09-29 11:44:16]
User60271 - Posts: 63
I cannot reproduce it using manual order from the sub instance or sending manual orders from the DTC client. It only occurs when the automated orders are being sent. Unfortunately I can't send the actual DTC client but it would be possible to connect it to a debug instance of SC running on your side to replicate it with some form of active data feed that provides just a quote and trade level message stream. Let me know if that is possible.

Task Manager shows 0% utilization for SC when the freeze occurs. For what it's worth, the freeze is reminiscence of a thread deadlock where the message loop thread gets locked and interface becomes non-responsive.

I will test again with the 1813 build.
[2018-09-29 19:20:28]
Sierra Chart Engineering - Posts: 104368
Task Manager shows 0% utilization for SC when the freeze occurs.
This is enough for us to determine what the problem is. Issue found and will be resolved with a new release out later today.

And it is related to when sending an order cancel replace message.

We very well understand this kind of deadlock condition, and it was just an oversight that we missed how it could occur with an order cancel replace message. The trigger was deeper down in the code than we were examining.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-09-29 19:21:29
[2018-09-29 23:26:18]
Sierra Chart Engineering - Posts: 104368
We have released version 1814 which resolves this issue.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-09-30 06:24:23]
User60271 - Posts: 63
I can confirm that the freeze no longer occurs in 1814.
Thanks

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account