Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vista BUG Confirmed SMB2 causes Index Corruption
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01430067
Message ID:
01430091
Views:
352
>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
>
I don't even know what SMB2 is but suspect this is only an early example of VFP, in its discontinued state, falling out of step with advancing OS releases. They sure aren't going to hold back Windows features for the sake of FoxPro compatibility.

PS -- Uh, CLOSE DATA ALL? ;-) Hopefully this is just demo utility code.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform