Cycle 12, day #2:
Amazing wake up this morning. I finally had a trade happening. The way it got executed, the sequence of events (that wasn't a simple execution), made the code stumble into a bug which made the server crash.
Wow, it has been a while since that type of catastrophic outcome did happen.
With some log analysis, I did find out what did happen. A bug and also a function that was using a pointer presuming that it would always be valid. I did fix both issues, add some code in the main module to restart the interrupted trade.
I restarted the server to only see it crash immediately. Again, I did look in the log. I know exactly what did happen. The server establish 2 connections. 1 to receive market data, the other to execute orders... What did happen is that market data connection got established first and with the received data, it did trigger a trade before the second connection was fully established... It is quite a rare race condition... I'll add some protection to avoid the crash later... but this isn't by far an emergency... I have more important things to do this afternoon...
Amazing wake up this morning. I finally had a trade happening. The way it got executed, the sequence of events (that wasn't a simple execution), made the code stumble into a bug which made the server crash.
Wow, it has been a while since that type of catastrophic outcome did happen.
With some log analysis, I did find out what did happen. A bug and also a function that was using a pointer presuming that it would always be valid. I did fix both issues, add some code in the main module to restart the interrupted trade.
I restarted the server to only see it crash immediately. Again, I did look in the log. I know exactly what did happen. The server establish 2 connections. 1 to receive market data, the other to execute orders... What did happen is that market data connection got established first and with the received data, it did trigger a trade before the second connection was fully established... It is quite a rare race condition... I'll add some protection to avoid the crash later... but this isn't by far an emergency... I have more important things to do this afternoon...