Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCMark2002 crashes randomly #475

Open
hkevinli opened this issue Feb 5, 2025 · 3 comments
Open

PCMark2002 crashes randomly #475

hkevinli opened this issue Feb 5, 2025 · 3 comments

Comments

@hkevinli
Copy link

hkevinli commented Feb 5, 2025

I found PCMark2002 crashes randomly at program load. Usually loads fine the first time but crashes on subsequent attempts.

WinXP guest using default drivers. Tested with various guest CPUs from Pentium MMX to Athlon XP all showing the same behavior.

Image

# configuration file generated by Bochs
plugin_ctrl: voodoo=false, unmapped=false, biosdev=false, speaker=true, extfpuirq=false, parallel=false, serial=false, busmouse=false, e1000=false, es1370=true, gameport=true, iodebug=false, ne2k=false, sb16=false, usb_uhci=false, usb_ohci=false, usb_ehci=false, usb_xhci=false
config_interface: win32config
display_library: win32
memory: guest=512, host=512, block_size=128
romimage: file="R:\bochs\BIOS-bochs-latest", address=0x00000000, options=none, flash_data=none
vgaromimage: file="R:\bochs\VGABIOS-lgpl-latest-banshee.bin"
boot: cdrom, disk
floppy_bootsig_check: disabled=0
floppya: type=1_44
# no floppyb
ata0: enabled=true, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, path="c.vhd", mode=vpc, cylinders=0, heads=16, spt=63, sect_size=512, model="Generic HDD", biosdetect=auto, translation=auto
ata0-slave: type=cdrom, path="C:\Users\user\Desktop\Retro_PC\os\Microsoft Windows XP\GRTMPVOL_EN.ISO", status=ejected, model="Generic CDROM", biosdetect=auto
ata1: enabled=true, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata1-master: type=disk, path="C:\Users\user\Desktop\Retro_PC\software", mode=vvfat, journal=none, cylinders=41610, heads=16, spt=63, sect_size=512, model="vvfat HDD", biosdetect=auto, translation=auto
ata1-slave: type=none
ata2: enabled=false
ata3: enabled=false
optromimage1: file=none
optromimage2: file=none
optromimage3: file=none
optromimage4: file=none
optramimage1: file=none
optramimage2: file=none
optramimage3: file=none
optramimage4: file=none
pci: enabled=1, chipset=i430fx, slot1=voodoo, slot2=none, slot3=none, slot4=none, slot5=none
vga: extension=voodoo, update_freq=0, realtime=1, ddc=builtin, vbe_memsize=16
cpu: count=1, ips=70000000, model=pentium_mmx, reset_on_triple_fault=1, cpuid_limit_winnt=0, ignore_bad_msrs=1, mwait_is_nop=0
print_timestamps: enabled=0
debugger_log: R:\bochs\debug.log
magic_break: enabled=1 0x8
port_e9_hack: enabled=false, all_rings=false
iodebug: all_rings=0
private_colormap: enabled=0
clock: sync=both, time0=local, rtc_sync=1
# no cmosimage
log: R:\bochs\log.txt
logprefix: %t%e%d
debug: action=ignore
info: action=report
error: action=report
panic: action=ask
keyboard: type=mf, serial_delay=150, paste_delay=100000, user_shortcut="ctrl-alt-del"
mouse: type=imps2, enabled=false, toggle=ctrl+f10
sound: waveoutdrv=win, waveout=none, waveindrv=win, wavein=none, midioutdrv=win, midiout=none
speaker: enabled=true, mode=sound, volume=15
es1370: enabled=true, midimode=1, wavemode=1
voodoo: enabled=true, model=banshee
usb_debug: type=none

Software in reference: https://benchmarks.ul.com/legacy-benchmarks

@Vort
Copy link
Contributor

Vort commented Feb 5, 2025

Looks like this problem is OS specific.
I tried with Windows 98, no crashes appeared.
But with Windows XP I got crash right away.

Most likely, crash happens (at 0x469DB0) when program tries to scan tables in Bochs BIOS.
If I boot with bios.bin-1.13.0 instead of BIOS-bochs-latest, no crashing happens (but you may need to close splash screen with Esc key because of problems with timer).
Can you check if it makes difference with your installation?

upd. PCMark2002 tries to read SMBIOS Structure Table, but something goes wrong during NtMapViewOfSection call. Looks like authors expected that this function will round SectionOffset pointer to 64k (as documented here), but instead pointer gets rounded to 4k (because this is how Windows XP works).

@Vort
Copy link
Contributor

Vort commented Feb 5, 2025

Official documentation for ZwMapViewOfSection states that: [in, out, optional] SectionOffset, A pointer to a variable that receives the offset, in bytes, from the beginning of the section to the view. If this pointer is not NULL, the offset is rounded down to the next allocation-granularity size boundary.

"allocation-granularity size" can be checked with GetSystemInfo. I made small program for printing dwAllocationGranularity and result was 64k.

However, in reality, this happens: Check to see if this the section backs physical memory, if so DON'T align the offset on a 64K boundary, just a 4k boundary.

So I assume authors trusted official documentation, but Microsoft decided to implement function slightly differently and now emulators need to deal with consequences.

@fysnet
Copy link
Collaborator

fysnet commented Feb 6, 2025

I can confirm with WinXP and using BIOS-bochs-latest, it crashes before app loads to opening dialog, even before the splash screen.

I used i440fx and after multiple load/exit cycles, I could not get it to crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants