DE652 Locking Problems Emerge

Questions and Answers about DataEase for Windows

DE652 Locking Problems Emerge

Postby Graham Smith » Tue Nov 09, 2010 2:40 pm

This is long, technical, and complicated, but bear with me.

For the past couple months, I have been trying to track down a problem I have been seeing with DE652 and I think I have enough information at this point to say that it's a serious problem.

I first saw it on my computer when I did an Application/Status/Refresh and it corrupted the holder files (like $DeStat_TableInfo$). My computer is fairly new and is running Windows 7 and the application is on an old Windows 2000 server (yes, I said Win2K). The same thing does not happen if the application is on my computer. After a lot of testing, I found that what was happening was that the DBM files were disappearing.

For those that do not know, the procedural command "delete records in" deletes the DBM file and creates a new 0 length file in it's place. Apparently, the file is getting deleted and not recreated. This is 100% reproducible on my computer but does not happen when doing the same thing in a Ffenics database.

I checked this using another computer running Windows 7 on the same server and the problem did not happen. I can only speculate that there is some minor difference between the two. Mine is a fast desktop and the other is a much slower laptop, but I'm not sure if that has anything to do with it or not.

I was ready to write the whole thing off to a Windows 7 issue until I got a report from a client that they had a problem with a procedure that wrote to a holder file. I did a remote login and found that the holder file DBM file was missing. Replacing it fixed the problem but what had caused it?

The server at this location was relatively new and running Windows 2008.
The procedure had been run before without a problem, but not by the person who ran it this time.
Everyone is running WinXP on their workstations.
The problem did not happen when I ran the same procedure from my remote computer.
The same thing happened yesterday with a different holder file when a different person ran a different procedure.

IOW, for no apparent reason and at random intervals, procedures that deletes the records in holder files are wiping out the DBM and not replacing it. To say that this makes my teeth sweat is an understatement.

There is no way of confirming this, but the way DE652 opens, locks, and closed files is extremely out of date. It is using calls that are basically unchanged from those done by DFD. The fact that Ffenics is using an up-to-date compiler and modern Windows calls may well explain why I don't see the same problem with a status update in Ffenics. As to whether or not the two are connected, I can only speculate, but it seems likely.

So, I put this out as a warning to those who make use of holder files and procedures that do a "delete records in", if you suddenly get an error that a holder file cannot be opened, look to see if the DBM is still there.
Graham Smith
DataSmith, Delaware
"For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)
"X-Clacks-Overhead: GNU Terry Pratchett"
User avatar
Graham Smith
 
Posts: 2501
Joined: Fri Sep 07, 2007 11:31 am
Location: Delaware, USA
Has thanked: 0 time
Been thanked: 1 time
 

Re: DE652 Locking Problems Emerge

Postby benjji » Tue Nov 09, 2010 4:55 pm

we had a similar issue with DE652 (before we moved to Ff)
XP Pro workstations & Server 2003

the issue happened only during a reorg of the entire app (which was onlt ever done on the server, due to processing power - 2x Xeons fast drives & lots of rams)
occasionally a DBM file would disappear (and had to be copied from a backup)
Trina suggested i looked at the TMP files (one of the TMP's was roughly the same size as the missing DBM)

apparently if you have lots tables with almost the same DOS name, then the reorg will get confused, we had
ARCHOAAA.DBM
ARCHOAAB.DBM
ARCHOAAC.DBM
ARCHOAAD.DBM
ARCHOAAE.DBM

all the above were the DBM's of archived tables, so our solution was simple - don't reorg until DE said the table was inconsistent
benjji
 
Posts: 167
Joined: Fri Mar 14, 2008 11:26 am
Location: Stoke-on-Trent & Manchester & Middlesborough
Has thanked: 0 time
Been thanked: 0 time
 

Re: DE652 Locking Problems Emerge

Postby Graham Smith » Fri Nov 12, 2010 2:25 pm

At this point I cannot say for sure what has changed at one client, but something has because the missing DBM problem is not isolated to a single person or a single holder file.

I also cannot say for sure if it is a workstation or server or combination issue. I may be able to determine that next week by setting up a test that the customer can run from several different workstations.

I also cannot say for sure that this is in any way related to the status problem I can produce here on my Win7 computer, but it seems likely that it's related.

I also cannot say if this is a locking issue (as I first suspected) or if it simply relates to the fact that 6.52 is using some really old calls to open and close files and that the problem lies there.

What I can say is that one way to stop it is to create a dummy record in a holder file that will always remain so that the file never goes to zero. Of course, this also means modifying the procedures that write and read from the holder file to ignore this record - not exactly what I would call a good solution in a database that has three pages worth of procedures that use holder files.
Graham Smith
DataSmith, Delaware
"For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)
"X-Clacks-Overhead: GNU Terry Pratchett"
User avatar
Graham Smith
 
Posts: 2501
Joined: Fri Sep 07, 2007 11:31 am
Location: Delaware, USA
Has thanked: 0 time
Been thanked: 1 time
 

Re: DE652 Locking Problems Emerge

Postby Graham Smith » Fri Nov 12, 2010 7:41 pm

It would appear that the problem now has a cause - Microsoft Security Essentials. The solution is to replace it with something else.

I had wondered about this previously and had made sure that the Real Time Protection was excluding the network drives but today I turned it off and the problem went with it. I have since uninstalled it and replaced it with my old standby (AVG) and the problem seems gone for good.

After contacting a client that was having the same problem, they confirm that MSE was on one workstation that had a problem and they are checking other workstations as I write this.
Graham Smith
DataSmith, Delaware
"For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)
"X-Clacks-Overhead: GNU Terry Pratchett"
User avatar
Graham Smith
 
Posts: 2501
Joined: Fri Sep 07, 2007 11:31 am
Location: Delaware, USA
Has thanked: 0 time
Been thanked: 1 time
 

Re: DE652 Locking Problems Emerge

Postby Andrew Pickles » Thu Jan 26, 2012 5:03 pm

This explains a lot. We have an old network running PC's on Windows 2000 and Windows XP Pro. As part of the process of migrating to ffenics, we started by getting all the PC's on to windows XP, and found the problem as described - files disappearing after a delete records. The procedure was being run from an XP Pc and the wiles were on a windows 2K machine. We assumed this was the problem, and temporarily re-installed Win2K and the problem went away.
However, when XP was installed, so was WSE which will not run on Win2K. So we will try again, this time without WSE.
Thanks for this posting.
:D
Andrew Pickles
 
Posts: 2
Joined: Thu Jan 26, 2012 7:55 am
Has thanked: 0 time
Been thanked: 0 time
 
 

Return to DataEase for Windows

Who is online

Users browsing this forum: No registered users and 1 guest

cron