Opened 10 years ago

Closed 8 years ago

#16 closed defect (fixed)

Trap when chkdsk is run simultaneously against multiple FAT32 formatted drives

Reported by: erdmann Owned by:
Priority: major Milestone: GA
Component: IFS Version:
Severity: highest Keywords:
Cc:

Description

when chkdsk is run simultaneously against multiple FAT32 formatted drives, the second instance/further instances of chkdsk will trap with a:

run-time error R6002

  • floating-point support not loaded

SYS1811: The process has stopped. The software diagnostic code (trap number) is 000D.

I think this needs to be done: Since UFAT32.DLL is using floating point (there are some casts from int to float etc.) it is essential to ensure that the /FPi87 switch is used for the MS compiler. That will directly inline floating point instructions and avoid the use of any floating library. The makefile for UFAT32.DLL does not specify this and therefore the default is used which is /FPi = "inline with emulator".

Since Pentium (and therefore HW floating point support) is now around for almost 20 years I think that this will not be a problem :-)

Change History (15)

comment:1 by Valery V. Sedletski, 9 years ago

I see the math387s.lib library routines linked with the ufat32.dll binary, so I'm wondering if it insufficient (In the linker map I see it uses only standard doscalls, msg and nls libraries -- no unusual runtimes). And, I use OpenWatcom to compile the IFS and other parts of fat32 package. Possible, this is because the linker directive:

segment type DATA LOADONCALL NONSHARED

so, the last directive needs to be SHARED... But why floating support, it is there for sure?

Last edited 9 years ago by Valery V. Sedletski (previous) (diff)

comment:2 by erdmann, 9 years ago

No, for a normal DLL you should NEVER specify SHARED for data. Specifying NONSHARED ensures that multiple simultaneous loads of the DLL will each have their own data variables which is what you would normally want to have.

You rather need to specify:

DATA LOADONCALL MULTIPLE NONSHARED

MULTIPLE states that DGROUP is private for each loaded DLL instance, NONSHARED specifies that all other data segments are private for each loaded DLL instance. In particular I think that MULTIPLE might solve the problem as I suspect that the math library has some data variables that will go into DGROUP and that need to be instantiated per loaded DLL instance.

Floating Point is needed because the DLL uses Floating Point variables ! I just suggested this so that no math library will be linked in which avoids the Problem altogether.

comment:3 by Valery V. Sedletski, 8 years ago

Severity: highest

Fixed this ticket with commit r114. Added -fpi87 -fp3 and initinstance terminstance flags (actually, OW doesn't support the keyword MULTIPLE in SEGMENT directive).

comment:4 by Valery V. Sedletski, 8 years ago

Resolution: fixed
Status: newclosed

comment:5 by erdmann, 8 years ago

Hi,

thanks a lot ! Is there some test version of UFAT32.DLL that I can try ? I don't feel like building that thing myself ...

Just for the records: I was not aware that you are now using Watcom for your branch 0.10. That's why I referred to the Microsoft compiler (which I think was used in branch 0.9). Nice to see that the fix was still the same as the one suggested for the Microsoft compiler.

By the way: "OPTION MANYAUTODATA" in OpenWatcom is equivalent to "DATA MULTIPLE" directive.

Last edited 8 years ago by erdmann (previous) (diff)

comment:6 by erdmann, 8 years ago

Resolution: fixed
Status: closedreopened

I have tried this: ​ftp://osfree.org/upload/fat32/fat32-0.10-alpha2.zip

Still get this when I run a chkdsk on multiple FAT32 drives at the same time:

The current hard disk drive is: C: The type of file system for the disk is FAT32. The FAT32 file system program has been started. SYS1808: The process has stopped. The software diagnostic code (exception code) is 0005.

[D:\]help sys1808

SYS1808: The process has stopped. The software diagnostic code (exception code) is *.

EXPLANATION: The program generated an exception that the system cannot resolve. The soft ware diagnostic code allows determination of what type of exception was generated.

ACTION: Correct the problem or try a different version of the program.

Admittedly, this is now a different error (no longer a floating point error).

Last edited 8 years ago by erdmann (previous) (diff)

comment:7 by Valery V. Sedletski, 8 years ago

2Lars: Yes, I use OpenWatcom as my main tools. But I preserved ICC/MSC makefiles too. Both can be called by a corresponding .cmd file (you need to start .cmd by tapping Enter, all paths are set inside the .cmd.). And I uploaded the new binaries to ftp://osfree.org/upload/fat32/fat32-0.10-alpha3.zip, so please, update.

comment:8 by Valery V. Sedletski, 8 years ago

Upd: FAT32 is updated to version 0.10a4 (branch 0.10). The download link is ftp://osfree.org/upload/fat32/fat32-0.10-alpha4.zip.

comment:9 by diver, 8 years ago

Milestone: GA

comment:10 by Valery V. Sedletski, 8 years ago

Formatting two FAT32 drives simultaneously should work now. The current fat32.ifs build is ftp://osfree.org/upload/fat32/fat32-0.10-alpha6.zip. Lars, please test it.

comment:11 by Valery V. Sedletski, 8 years ago

I reuploaded the file with the same name: ftp://osfree.org/upload/fat32/fat32-0.10-alpha6.zip. Now a bug is fixed which prevented the already formatted FAT32 drives to be reformatted. Also, the speed of formatting was enhanced by the order of magnitude by adding FAT32_SECTORIO ioctl. Yes, it formats the disk momentarily now :)

comment:12 by Valery V. Sedletski, 8 years ago

Reuploaded the file again as ftp://osfree.org/upload/fat32/fat32-0.10-alpha6.zip, it includes a new fix to #24

comment:13 by Valery V. Sedletski, 8 years ago

Updated the binaries again, the link is at http://trac.netlabs.org/fat32/ticket/24#comment:11

comment:14 by erdmann, 8 years ago

with ftp://osfree.org/upload/fat32/fat32-0.10-alpha7.zip (file dates: 15.10.2016) this problem is fixed. You can close this bug. Thanks !

comment:15 by diver, 8 years ago

Resolution: fixed
Status: reopenedclosed

closing it on request of the reporter

Note: See TracTickets for help on using tickets.