[Quickfix-developers] Abnormal Termination in FileStore.cpp
Brought to you by:
orenmnero
From: BRACKLEY, A. G. <And...@rb...> - 2008-07-11 07:31:34
|
Very occassionally I get an abnormal termination in my quickfix application. I have traced this down to the FileStore::open() method in the FileStore.cpp file. The issue seems to be that sometimes it can't open the <filename>.body file which then throws a ConfigError that doesn't get handled by the thread that was spawned for the reconnections. If I run "Process Monitor" from SysInternals it shows a Sharing Violation on this file, however Process Explorer shows that no other process has this file open. There seems to be some timing issue between the file_unlink() and the file_open() commands leading to the open failing. I can work around this by changing the order the files are opened in so the last file closed is now the last file opened. There seems to be two issues here: 1) The sharing violation on the files caused by a possible timing issue with closing and opening the files 2) The fact that the ConfigError is not caught on the spawned thread. The best way I've found to replicate this is by running another process on the same port as my quickfix application so that the quickfix app constantly tries to reconnect, however this doesn't always reproduce the issue. NOTE: I'm compiling under VC9 and using an application written in .NET using quickfix_net dlls compiled under VS2008. I can provide stack traces and more information if required. Thanks *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: www.rbs.com www.rbs.com/gbm www.rbsgc.com *********************************************************************************** ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |