EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Concurrency issues with CbFS

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#20887
Posted: 07/25/2012 15:09:22
by Adam Singer (Basic support level)
Joined: 04/13/2012
Posts: 2

I believe my issue is similar to Brahim's. I was wondering, Brahim, if you found anything else in your testing?

What I'm seeing is related to concurrency between file open/read events. Our file context object includes a collection of user IDs. On open, we add the user id we find associated with the originator token to this collection. When reading, we iterate through all of the user ids for the file context and audit access, then clearing the collection (this helps avoid at least some unnecessary audits when the file is simply opened/closed without a read).

However, we found that at times the collection of user IDs is being modified while we are iterating over it in the read call. Since this should be specifically linked to the file ID, it appears that more than one thread at a time has the same context open - either two for read or one for open and one for read. From this and another similar thread, it appears this may be related to timeouts in the callback - is that true? Is there any other way we could be executing multiple callbacks for one file at the same time before one has returned?

I can supply code snippets if you would like.

Thank you for your time.
#20888
Posted: 07/25/2012 23:49:26
by Eugene Mayevski (EldoS Corp.)

Adam, you can easily exclude the timeout cause by measuring time you spent in callbacks. You can use GetTickCount() function at the beginning and at the end of the method and calculate the difference. Then log this difference somewhere at the end of the method.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 3093 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!