-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Crash on FreeBSD/ZFS creating sparse ~/.cache/rpcs3/rpcs3_vm #10334
Comments
Need more information. Are files not sparse by default on ZFS? Like if you create zero file, then set its size to X. |
|
This file is not supposed to have allocated space on disk. What does the test show for 32G part? Reserved disk space? |
On ZFS empty sparse files appear to have
|
Hmm, try #10331 |
5db38c0 doesn't help: $ rm -rf ~/.config/rpcs3 ~/.cache/rpcs3
$ QT_QPA_PLATFORM=xcb rpcs3
Debugger: 0
RPCS3: Segfault reading location 0000000000000028 at 0000000808e4151b.
Thread: Main Thread.
Thread id = 0x80ba12000.
Segmentation fault
Program received signal SIGTRAP, Trace/breakpoint trap.
thread_ctrl::emergency_exit (reason=...) at rpcs3-0.0.16-12306-g5db38c012/Utilities/Thread.cpp:2522
2522 if (const auto _this = g_tls_this_thread)
(gdb) backtrace
#0 thread_ctrl::emergency_exit (reason=...) at rpcs3-0.0.16-12306-g5db38c012/Utilities/Thread.cpp:2522
#1 0x0000000001b6b775 in fmt::raw_throw_exception (loc=...,
fmt=0x4370a4 "Failed to initialize sparse file in '%s'\nIt seems this filesystem doesn't support sparse files (%d).\n",
sup=0x549b430 <fmt::type_info_v<char const*, int>>, args=0x7fffffffcf98) at rpcs3-0.0.16-12306-g5db38c012/Utilities/StrFmt.cpp:335
#2 0x0000000001b68683 in fmt::throw_exception<char, 102ul, char const*, int>::throw_exception (this=0x7fffffffce70, fmt=...,
args=@0x7fffffffce64: 22, args=@0x7fffffffce64: 22, line=442, col=4, file=0x3d7742 "rpcs3-0.0.16-12306-g5db38c012/rpcs3/util/vm_native.cpp",
func=0x3fd8c0 "shm") at rpcs3-0.0.16-12306-g5db38c012/Utilities/StrFmt.h:286
#3 utils::shm::shm (this=0x8d8e080 <vm::ps3_::s_hook>, size=34359738368, storage="") at rpcs3-0.0.16-12306-g5db38c012/rpcs3/util/vm_native.cpp:442
#4 0x00000000027bd098 in __cxx_global_var_init.117(void) () at rpcs3-0.0.16-12306-g5db38c012/rpcs3/Emu/Memory/vm.cpp:1635
#5 0x00000000027be09b in _GLOBAL__sub_I_vm.cpp () at rpcs3-0.0.16-12306-g5db38c012/rpcs3/Emu/Memory/vm.cpp:594
#6 0x000000080561742d in objlist_call_init (list=<optimized out>, list@entry=0x7fffffffdf98, lockstate=<optimized out>,
lockstate@entry=0x7fffffffdde0) at /usr/src/libexec/rtld-elf/rtld.c:2889
#7 0x0000000805615c8a in _rtld (sp=<optimized out>, exit_proc=0x7fffffffe010, objp=0x7fffffffe018)
at /usr/src/libexec/rtld-elf/rtld.c:841
#8 0x00000008056133e9 in rtld_start () at /usr/src/libexec/rtld-elf/amd64/rtld_start.S:39
#9 0x0000000000000000 in ?? ()
(gdb) frame 3
#3 utils::shm::shm (this=0x8d8e080 <vm::ps3_::s_hook>, size=34359738368, storage="") at rpcs3-0.0.16-12306-g5db38c012/rpcs3/util/vm_native.cpp:442
442 fmt::throw_exception("Failed to initialize sparse file in '%s'\n"
(gdb) list
437
438 #ifdef SEEK_DATA
439 errno = EINVAL;
440 if (stats.st_blocks && ::lseek(m_file, 0, SEEK_DATA) ^ stats.st_size && errno != ENXIO)
441 {
442 fmt::throw_exception("Failed to initialize sparse file in '%s'\n"
443 "It seems this filesystem doesn't support sparse files (%d).\n",
444 storage.empty() ? fs::get_cache_dir().c_str() : storage.c_str(), +errno);
445 }
446 #endif
(gdb) print stats
$1 = {
st_dev = 13352518542533021110,
st_ino = 819971,
st_nlink = 1,
st_mode = 33152,
st_padding0 = 0,
st_uid = 1234,
st_gid = 1234,
st_padding1 = 0,
st_rdev = 18446744073709551615,
st_atim = {
tv_sec = 1621870134,
tv_nsec = 335568540
},
st_mtim = {
tv_sec = 1621870134,
tv_nsec = 335568540
},
st_ctim = {
tv_sec = 1621870134,
tv_nsec = 335568540
},
st_birthtim = {
tv_sec = 1621870134,
tv_nsec = 335568540
},
st_size = 65536,
st_blocks = 1,
st_blksize = 131072,
st_flags = 2048,
st_gen = 0,
st_spare = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
} |
Some bug in my logic. Try latest version please. |
Still no good (updated previous reply): |
If it returns 0, it means there is no hole at offset 0, and the file is not sparse. I don't know how can I help with it. |
May or should? Because in this particular case, it looks like a bug on BSD side or its ZFS implementation. |
Not FreeBSD specific. I can reproduce the crash on Ubuntu 21.04 running OpenZFS |
Quick summary
Crash on RPCS3 start.
Details
Regressed by 126141c. RPCS3 bogusly assumes ZFS doesn't support sparse files and aborts.
The text was updated successfully, but these errors were encountered: