Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vista BUG Confirmed SMB2 causes Index Corruption
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Vista BUG Confirmed SMB2 causes Index Corruption
Divers
Thread ID:
01430067
Message ID:
01430067
Vues:
991
The SMB2 issues in Vista were supposed to be resolved according to this:
http://fox.wikis.com/wc.dll?Wiki~WindowsVistaFileLockingBug~VFP
and this:
http://support.microsoft.com/kb/935366/en-us

Unfortunately, the SMB2 bugs persist. I have written a program that will reproduce the SMB2 bugs. The included program should be run between 2 Vista computers (one acting as the server and sharing the folder to the second). You should see VFP crash within 30 seconds with index corruption and other miscellaneous errors. Now, turn off SMB2 or switch one of the computers to XP and this same program will run without error.

Question 1: Can anyone else reproduce this bug (.prg below).
Question 2: How do we report the bug to Microsoft?
close data all
SET ESCAPE ON
SET EXCLUSIVE OFF
SET REPROCESS TO 5
SET TABLEVALIDATE TO 3
IF MESSAGEBOX("Server?",4+32+0)=6
	** this is the 1st Vista computer
	** create c:\ice folder and share it before running this program
	SET DEFAULT TO c:\ice
	
	IF MESSAGEBOX("Create database?",4+32+256)=6
		CREATE DATABASE 'ICE.DBC'
		
		***** Table setup for ICETABLE *****
		CREATE TABLE 'ICETABLE.DBF' NAME 'ICETABLE' (;
				PK I NOT NULL, ;
				SOURCE C(10) NOT NULL, ;
				SOURCENUM I NOT NULL, ;
				DATE_TIME T NOT NULL)

		***** Create each index for ICETABLE *****
		SET COLLATE TO 'GENERAL'
		ALTER TABLE 'ICETABLE' ADD PRIMARY KEY PK TAG PK
		INDEX ON SOURCE TAG SOURCE
		INDEX ON SOURCENUM TAG SOURCENUM
		INDEX ON SOURCE+STR(SOURCENUM) TAG SOSO
		
		***** Table setup for ICENUMS *****
		CREATE TABLE 'ICENUMS.DBF' NAME 'ICENUMS' (;
				TABLENAME C(30) NOT NULL, ;
				FIELDNAME C(30) NOT NULL, ;
				FIELDVALUE I NOT NULL)

		INSERT INTO icenums (tablename, fieldname, fieldvalue) ;
			VALUES ("icetable","pk",1)

	ENDIF
ELSE
	** this is the 2nd Vista computer
	SET DEFAULT TO \\vista1\ice
ENDIF


LOCAL lnPK,lnX,lnLoops,lcSource,lnSourceNum
DO WHILE .T.
	close data all
	TRY
		OPEN DATABASE ice SHARED
		USE icenums SHARED IN 0
		USE icetable SHARED IN 0
	CATCH
		** oh well
	ENDTRY
	IF USED('icetable')
		lnLoops=INT(RAND()*200)
		lcSource=SYS(2015)
		lnSourceNum=INT(RAND()*5000)
		llRollBack=.F.
		
		BEGIN TRANSACTION 
		
		FOR lnX=1 TO lnLoops
			SELECT icenums
			LOCATE FOR tablename="icetable" AND fieldname="pk"
			IF FOUND()
				IF LOCK()
					lnPK=icenums.fieldvalue
					replace icenums.fieldvalue WITH lnPK+1
					
					INSERT INTO icetable ;
						(pk,source,sourcenum,date_time) ;
						VALUES ;
						(lnPK,lcSource,lnSourceNum,DATETIME())
				ENDIF
			ENDIF
		ENDFOR
		
		** rollback every once in a while
		IF INT(RAND()*5)=4
			? 'rolled back'+TTOC(DATETIME())
			ROLLBACK
		ELSE
			? 'committed '+TTOC(DATETIME())
			END TRANSACTION
		ENDIF
		
		UNLOCK ALL
	ENDIF
	
	WAIT WINDOW 'waiting .1 second' TIMEOUT .1
ENDDO

close data all
Brandon Harker
Sebae Data Solutions
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform