cunnie / gobonniego

a stripped-down version of bonnie/bonnie++ implemented in Golang
Apache License 2.0
40 stars 8 forks source link

It gives an error when compiled as 32-bit and ran on a 32-bit OS #7

Open Zero3K opened 10 months ago

Zero3K commented 10 months ago

image

cunnie commented 10 months ago

Ah, yes, I remember in 2018 when I wrote the following:

+GoBonnieGo may have difficulty running on 32-bit systems; int and int64 were used interchangeably in the code.

I'm curious: what's the use case? As far as I know, you're the first to attempt running GoBonnieGo on a 32-bit system.

When I have time, I can look at the code & try to make fix it, but if you want it done faster you might try a pull request.

Zero3K commented 10 months ago

My use case is to test a UDFS driver under both 32 and 64-bit OSes for bugs so they can be fixed. Maybe you could tell me how to fix the original Bonnie++ so that a crash no longer happens and it is able to finish running its benchmarks.

Zero3K commented 10 months ago

Break instruction exception - code 80000003 (first chance) 001b:013433d3 cc int 3 0: kd> !analyze -v


Exception Analysis


FAULTING_IP: Bonnie__!common_sopen_dispatch+193 [minkernel\crts\ucrt\src\appcrt\lowio\open.cpp @ 164] 001b:013433d3 cc int 3

EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) ExceptionAddress: 013433d3 (Bonnie__!common_sopen_dispatch+0x00000193) ExceptionCode: 80000003 (Break instruction exception) ExceptionFlags: 00000000 NumberParameters: 3 Parameter[0]: 00000000 Parameter[1]: 87b36918 Parameter[2]: 00000000

DEFAULT_BUCKET_ID: STATUS_BREAKPOINT

ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached.

EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid

EXCEPTION_PARAMETER1: 00000000

EXCEPTION_PARAMETER2: 87b36918

EXCEPTION_PARAMETER3: 00000000

MOD_LIST:

NTGLOBALFLAG: 1

APPLICATION_VERIFIER_FLAGS: 0

FAULTING_THREAD: 00000001

PRIMARY_PROBLEM_CLASS: STATUS_BREAKPOINT

BUGCHECK_STR: APPLICATION_FAULT_STATUS_BREAKPOINT

LAST_CONTROL_TRANSFER: from 013444b2 to 013433d3

STACK_TEXT: 0025ecf0 013444b2 004183c8 00000302 00000040 Bonnie!common_sopen_dispatch+0x193 [minkernel\crts\ucrt\src\appcrt\lowio\open.cpp @ 164] 0025ed10 01344560 004183c8 00000302 00000040 Bonnie!_sopen_dispatch+0x22 [minkernel\crts\ucrt\src\appcrt\lowio\open.cpp @ 203] 0025ed30 013450d8 0025ed7c 004183c8 00000302 Bonnie!_sopen_s+0x20 [minkernel\crts\ucrt\src\appcrt\lowio\open.cpp @ 894] 0025ed4c 0134502c 0025ed6c 0025ed88 0025ed70 Bonnie!crt_char_traits::tsopen_s<int ,char const const &,int,int,int const &>+0x28 [minkernel\crts\ucrt\inc\corecrt_internal_traits.h @ 109] 0025ed80 01345122 004183c8 00008180 0025eea8 Bonnie__!common_creat+0x3c [minkernel\crts\ucrt\src\appcrt\lowio\creat.cpp @ 29] 0025ed90 012e5d29 004183c8 00008180 0025f02c Bonnie!_creat+0x12 [minkernel\crts\ucrt\src\appcrt\lowio\creat.cpp @ 35] 0025eea8 012e5bd8 004183c8 00410018 00000000 Bonnie!COpenTest::create_a_file+0x49 [D:\bonnie\bon_file.cpp @ 181] 0025f038 012e1a12 0040c008 0025f59c 00000010 Bonnie__!COpenTest::create+0x458 [D:\bonnie\bon_file.cpp @ 380] 0025f1f0 012e3d50 00000010 00000000 00000000 Bonnie!TestDirOps+0x1a2 [D:\bonnie\bonnie++.cpp @ 785] 0025f870 012ef043 00000001 0040ae58 0040cf90 Bonnie!main+0x890 [D:\bonnie\bonnie++.cpp @ 538] 0025f890 012eef17 8423a061 00000000 00000000 Bonnie!invoke_main+0x33 [D:\agent_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 78] 0025f8ec 012eedbd 0025f8fc 012ef0a8 0025f908 Bonnie!scrt_common_main_seh+0x157 [D:\agent_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288] 0025f8f4 012ef0a8 0025f908 752dd6bc 7ffdf000 Bonnie!scrt_common_main+0xd [D:\agent_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 331] 0025f8fc 752dd6bc 7ffdf000 0025f948 76df365b Bonnie!mainCRTStartup+0x8 [D:\agent_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp @ 17] 0025f908 76df365b 7ffdf000 76c243ce 00000000 kernel32!BaseThreadInitThunk+0xe 0025f948 76df362e 012ef0a0 7ffdf000 00000000 ntdll!RtlUserThreadStart+0x70 0025f960 00000000 012ef0a0 7ffdf000 00000000 ntdll!_RtlUserThreadStart+0x1b

FOLLOWUP_IP: Bonnie__!common_sopen_dispatch+193 [minkernel\crts\ucrt\src\appcrt\lowio\open.cpp @ 164] 001b:013433d3 cc int 3

FAULTING_SOURCE_CODE: No source found for 'minkernel\crts\ucrt\src\appcrt\lowio\open.cpp'

SYMBOL_STACK_INDEX: 0

SYMBOL_NAME: bonnie__!common_sopen_dispatch+193

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: Bonnie__

IMAGE_NAME: Bonnie++.exe

DEBUG_FLR_IMAGE_TIMESTAMP: 653bef68

STACK_COMMAND: dt ntdll!LdrpLastDllInitializer BaseDllName ; dt ntdll!LdrpFailureData ; kb

FAILURE_BUCKET_ID: STATUS_BREAKPOINT_80000003_Bonnie++.exe!common_sopen_dispatchchar

BUCKET_ID: APPLICATION_FAULT_STATUS_BREAKPOINT_bonnie__!common_sopen_dispatchchar+193

Followup: MachineOwner

cunnie commented 10 months ago

By the way, thanks for the most excellent bug-dump info.

Zero3K commented 10 months ago

That's the crash which happens when running a compiled exe of the original version (if you know C++, maybe you could offer the fix as a PR to my mirror, which is at https://github.com/Zero3K/bonnie). I got the backtrace by adding the proper switches to the Makefile.nt and using WinDbg's !gflag +soe and then running Bonnie++.

Zero3K commented 10 months ago

Maybe you could get it to compile properly under Visual Studio 2019.