EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Synchronization problems

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
Posted: 04/24/2006 13:59:12
by Dan Ricardo (Basic support level)
Joined: 04/24/2006
Posts: 4

We have an application that launches multiple processes and each of the processes accesses the same SolFS archive concurrently. After many hours of debugging, we found that in some machines the SolFS functions hang intermittently. If we add an inter-process synchronization mechanism like a mutex to synchronize access to all SolFS functions between processes this appears to fix the problem but there are still problems after some minutes of intensive use.

Is there anything in the SolFS functionality that could be expected to cause this behaviour?

We know from a previous query that SolFS archives cannot be accessed in read/write mode from multiple processes at the same time but the problems mentioned are when accessing the archive in read-only mode.

Thanks in advance,
Posted: 04/24/2006 23:46:59
by Eugene Mayevski (Team)

Can you please answer 3 questions:
1) do you use SolFS 2.x or 3.0 beta?
2) Do ALL processes open the storage file in read-only
3) Does the problem happen on any storage or on some particular storage AND not on other ones? In other words, is the problem specific to certain storage/data?

As the processes are separated from each other, they can't influence each other. Each instance of SolFS thinks that it has exclusive read-only access to the storage and using mutex should not make difference in fact. So the problem is not in concurrent access but in some other issues (maybe with SolFS).

Sincerely yours
Eugene Mayevski
Posted: 04/25/2006 11:17:30
by Dan Ricardo (Basic support level)
Joined: 04/24/2006
Posts: 4

Hi Eugene,

Here are the answers:

1) The header file contains "#define SolFSVersion 0x02000000" so it looks like version 2.x (Dec 24, 2005). Previous 2.x versions had the same problems too.

2) Yes, all processes open the archive in exactly the same way.

3) We tried archives in different formats (fixed/variable size, different compression/encryption) and with different files inside. None of that appears to have any effect so it seems the problem is more generic. It only appears to happen with some machines however and there's no obvious pattern. SolFS Explorer seems to work fine in those machines. The only way to generate the problem is with heavy concurrent load when accessing the archive.

An interesting note is that by adding debug messages just before and after the SolFS calls it appears to fix the problem (in conjunction with the synchronization mutex already described) or at least make it very hard to reproduce. It appears this can only be related with the delay introduced by these messages. This also makes debugging very hard.

If there is a sample debugging application with the same requirements we can run it in those machines and send back the results..

Posted: 04/25/2006 11:45:26
by Alexander Plas (Team)

If you opening storages from different processes in read-only mode, SolFS not perform any interprocess communication and synchronization. If problem in SolFS code even one running process have hang on such storage and operations set. Can you check this?
Posted: 04/25/2006 22:15:13
by Dan Ricardo (Basic support level)
Joined: 04/24/2006
Posts: 4

We determined that when the application hangs there is actually only one active process using the archive. In fact only 2 threads are involved in the archive access operations. The functions in particular that appear to cause the problem are "StorageOpenFile" and "StorageFindFirst", but it probably extends to others too.

Additionally, we determined that the hanging itself is actually a side-effect of something that happens inside the SolFS functions (an exception with code 0xC0000005 is generated).

It doesn't look like we can provide more feedback without a debug version of SolFS.
Posted: 04/26/2006 01:31:19
by Eugene Mayevski (Team)

This is something that we can work with. 0xC0000005 exception is Access Violation. So we need to localize it. It would be nice if you could create some small test with 2 threads, that exposes the problem. Then the problem can be solved quickly.

Sincerely yours
Eugene Mayevski
Posted: 04/26/2006 01:33:28
by Eugene Mayevski (Team)

I am moving the topic to helpdesk, since it's clearly a tech.support issue.

Sincerely yours
Eugene Mayevski
Posted: 04/30/2006 13:00:27
by Dan Ricardo (Basic support level)
Joined: 04/24/2006
Posts: 4

Problem was solved. Thanks to Eugene for the support.
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.



Topic viewed 10081 times

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


Back to top

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

Got it!