EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How can I make a separate umount app?

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
Posted: 06/28/2013 05:15:12
by Dmitry Novikov (Standard support level)
Joined: 03/11/2013
Posts: 6


We have similar (or the same?) problem: some or all mounting threads hang randomly in DeviceIoControl() called deeper in stack from inside CreateStorage(). We mount drives simultaneously via different instances of CallbackFileSystem class in differend threads inside a single process.
(CBFS Driver ver, MSVC 8.0, C++)

I just guessed it might be caused by some non thread-safe code and saw a some confirmation of my guess here by Sangmin Lee:
I found that createstorage() hang within DeviceIoControl() function of following code. There is nothing I can do further. Only refusee is to serialize mount request one by one.

As I understand it was fixed 2 years ago?

I've added serilization of calls to CreateStorage() and problem seems gone. But after some testing I commented out critical section lock and I could not reproduce the problem :(

So could be the bug reintroduced again in the same place?

And do you have any idea (from the experience of fixing it), if it is realy thread-safety problem and so does my workaround make sense?

Thanks! Best regards!
Posted: 06/28/2013 05:18:12
by Eugene Mayevski (EldoS Corp.)

It's hard to make any judgement or to give you a definite answer without investigating your problem. You are welcome to create a test case and post it to HelpDesk for investigation. Please see http://sscce.org/ for general guidelines about creating test cases.

Sincerely yours
Eugene Mayevski
Posted: 06/28/2013 08:31:28
by Dmitry Novikov (Standard support level)
Joined: 03/11/2013
Posts: 6

Thanks Eugene!

I tried and failed to reproduce it in a separate app. But I found that we have potentially dangerous code in OnMount() callback. Most likely that's the source of the problem.



Topic viewed 7170 times



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!