Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
06828 Crash/Freeze Critical (emulator) Always Jan 5, 2018, 16:29 Nov 27, 2022, 20:15
Tester Firewave View Status Public Platform
Assigned To Resolution Fixed OS
Status [?] Resolved Driver
Version 0.193 Fixed in Version 0.250 Build
Fixed in Git Commit 14fe203 Github Pull Request # #10560
Summary 06828: All sets in cv1k.cpp, coolridr: Crash when OSDPROCESSORS is set to 1
Description
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/stl_vector.h:780:16: runtime error: reference binding to null pointer of type 'work_thread_info *'
    #0 0x14e838e4 in std::vector<work_thread_info*, std::allocator<work_thread_info*> >::operator[](unsigned long) /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/stl_vector.h:780:9
    #1 0x14e82718 in osd_work_item_queue_multiple(osd_work_queue*, void* (*)(void*, int), int, void*, int, unsigned int) /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/osdsync.cpp:556:32
    #2 0x1159abe2 in osd_work_item_queue /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/osdcore.h:625:9
    #3 0x1159abe2 in epic12_device::gfx_exec_w(address_space&, unsigned int, unsigned int, unsigned int) /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/video/epic12.cpp:738
    #4 0x1159be62 in epic12_device::blitter_w(address_space&, unsigned int, unsigned int, unsigned int) /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/video/epic12.cpp:871:4
    #5 0x26a449d in delegate_base<void, address_space&, unsigned int, unsigned int, unsigned int>::operator()(address_space&, unsigned int, unsigned int, unsigned int) const /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:544:11
    #6 0x13712220 in handler_entry_write::write_stub_64(address_space&, unsigned int, unsigned long, unsigned long) /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.cpp:5271:5
    #7 0x13543ae3 in delegate_base<void, address_space&, unsigned int, unsigned long, unsigned long>::operator()(address_space&, unsigned int, unsigned long, unsigned long) const /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:544:11
    #8 0x13819826 in handler_entry_write::write64(address_space&, unsigned int, unsigned long, unsigned long) const /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.cpp:471:80
    #9 0x138270a0 in address_space_specific<unsigned long, (endianness_t)1, 0, true>::write_native(unsigned int, unsigned long, unsigned long) /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.cpp:1174:45
    #10 0x13827587 in void address_space_specific<unsigned long, (endianness_t)1, 0, true>::write_direct<unsigned int, true>(unsigned int, unsigned int, unsigned int) /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.cpp:1346:12
    #11 0x13825c22 in address_space_specific<unsigned long, (endianness_t)1, 0, true>::write_dword_static(address_space_specific<unsigned long, (endianness_t)1, 0, true>&, unsigned int, unsigned int) /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.cpp:1502:163
    #12 0x7ff42110c5c0  (<unknown module>)
Steps To Reproduce Windows:
set OSDPROCESSORS=1
mame64 -window akatana

Linux:
OSDPROCESSORS=1 ./mame64 -window akatana
Additional Information On Windows it just exits back to the command-line without any message.
Github Commit
Flags
Regression Version
Affected Sets / Systems All sets in cv1k.cpp, coolridr
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
3
User avatar
No.14623
Firewave
Senior Tester
Jan 5, 2018, 18:56
==85290==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000fba1fde bp 0x7ffd57d9c570 sp 0x7ffd57d9c4c0 T0)
==85290==The signal is caused by a READ memory access.
==85290==Hint: address points to the zero page.
    #0 0xfba1fdd in osd_work_item_queue_multiple(osd_work_queue*, void* (*)(void*, int), int, void*, int, unsigned int) /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/osdsync.cpp:556:32
    #1 0xd3160a0 in osd_work_item_queue /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/osdcore.h:625:9
    #2 0xd3160a0 in epic12_device::gfx_exec_w(address_space&, unsigned int, unsigned int, unsigned int) /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/video/epic12.cpp:738
    #3 0xd316dab in epic12_device::blitter_w(address_space&, unsigned int, unsigned int, unsigned int) /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/video/epic12.cpp:871:4
    #4 0xe22dd73 in operator() /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:544:11
    #5 0xe22dd73 in handler_entry_write::write_stub_64(address_space&, unsigned int, unsigned long, unsigned long) /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.cpp:5271
    #6 0xe3a70bc in operator() /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:544:11
    #7 0xe3a70bc in write64 /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.cpp:471
    #8 0xe3a70bc in write_native /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.cpp:1174
    #9 0xe3a70bc in write_direct<unsigned int, true> /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.cpp:1346
    #10 0xe3a70bc in address_space_specific<unsigned long, (endianness_t)1, 0, true>::write_dword_static(address_space_specific<unsigned long, (endianness_t)1, 0, true>&, unsigned int, unsigned int) /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.cpp:1502
    #11 0x7fcedfcd45c5  (<unknown module>)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /mnt/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/osdsync.cpp:556:32 in osd_work_item_queue_multiple(osd_work_queue*, void* (*)(void*, int), int, void*, int, unsigned int)
User avatar
No.17323
Firewave
Senior Tester
Jan 7, 2020, 13:50
The problem is with the queue allocation. In case there is only one processor osd_work_queue_alloc() won't allocate any threads for queues unless they are WORK_QUEUE_FLAG_IO.
User avatar
No.19841
john_iv
Senior Tester
Feb 24, 2022, 18:47
I hit this today on pinkswts when I was doing a benchmark run forcing -numprocessors 1.

'mame pinkswts -bench 90 -numprocessors 1 -norc'