RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

RDB files are unreadable when compiled with GCC 10

Open osirase opened this issue 6 years ago • 53 comments

Description

The Import Content feature appears to be broken. Selecting scan by folder and file yield the same result. The GUI indicates it's stuck scanning the first file it comes across and remains at 0%, never progresses and must be restarted. Also happens when running as the root user

Expected behaviour

[What you expected to happen]

Actual behavior

[What is actually happening]

Steps to reproduce the bug

  1. Compile from source, git clone, ./configure, make, sudo make install
  2. Capture some output with retroarch --menu --verbose >> retroarch.log 2>&1
  3. Stripe out Vulkan and slang noise with sed.
  4. Attempt to import any content either file or folder style
  5. Remains at 0%, logs show the last it recognises a file and matches a 'disc label'

Bisect Results

Appeared to start with 1.8.7

Version/Commit

Git Version: fda235518a

  • RetroArch: 1.8.8

Environment information

  • OS: Fedora 32
  • Compiler: gcc/g++ 10.1.1 20200507 (Red Hat 10.1.1-1)

osirase avatar May 26 '20 01:05 osirase

[INFO] RetroArch 1.8.8 (Git fda235518a) [INFO] === Build ======================================= [INFO] CPU Model Name: AMD Ryzen 5 3400G with Radeon Vega Graphics
[INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 AES AVX AVX2 [INFO] Built: May 26 2020 [INFO] Version: 1.8.8 [INFO] Git: fda235518a [INFO] ================================================= [INFO] [Environ]: SET_PIXEL_FORMAT: RGB565. [INFO] Version of libretro API: 1 [INFO] Compiled against API: 1 [INFO] [Audio]: Set audio input rate to: 30000.00 Hz. [INFO] [Video]: Video @ fullscreen [INFO] [Wayland]: Physical width: 1220 mm x 680 mm. [INFO] [Wayland]: Video mode: 3840 x 2160 @ 60.0000 Hz. [INFO] [Wayland]: Display scale factor 2. [INFO] [Wayland]: Seat name: seat0. [WARN] [Wayland]: Compositor doesn't support zwp_idle_inhibit_manager_v1 protocol! [WARN] [Wayland]: Compositor doesn't support zxdg_decoration_manager_v1 protocol! [INFO] [Wayland]: Loaded keymap. [INFO] [Joypad]: Found joypad driver: "udev". [INFO] [Video]: Found display server: null [INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432. [INFO] [Menu]: Found menu display driver: "vulkan". [INFO] [Menu]: Found menu display driver: "vulkan". [INFO] [LED]: LED driver = 'null' 0xea0d20 [INFO] [MIDI]: Initializing ... [INFO] [MIDI]: Input disabled. [INFO] [MIDI]: Output disabled. [INFO] [MIDI]: Initialized "alsa" driver. [INFO] SRAM will not be saved. [INFO] Loading history file: [/home//.config/retroarch/content_history.lpl]. [INFO] Loading history file: [/home//.config/retroarch/content_music_history.lpl]. [INFO] Loading history file: [/home//.config/retroarch/content_video_history.lpl]. [INFO] Loading history file: [/home//.config/retroarch/content_image_history.lpl]. [INFO] Loading favorites file: [/home//.config/retroarch/content_favorites.lpl]. [INFO] [PulseAudio]: Pausing. [INFO] [Wayland]: Entering output #4, scale 2 [INFO] Parsing CUE file '/home//rom/ps1/Alundra (Europe).cue'... [INFO] Reading first data track... [INFO] Comparing with known magic numbers... [INFO] Found disc label 'SLES-01135' [INFO] [PulseAudio]: Unpausing. [INFO] [config] Saved new config to "/home//.config/retroarch/retroarch.cfg". [INFO] Content ran for a total of: 00 hours, 00 minutes, 00 seconds. [INFO] Unloading game.. [INFO] [PulseAudio]: Pausing. [INFO] Unloading core.. [INFO] Unloading core symbols.. [INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames. [INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.

osirase avatar May 26 '20 01:05 osirase

do you have the databases?

hizzlekizzle avatar May 26 '20 01:05 hizzlekizzle

I would think so, I've always downloaded them from the internal updater thing.

/home//.config/retroarch/database/rdb>ll total 65M -rw-rw-r--. 1 957K May 26 19:58 Amstrad - CPC.rdb -rw-rw-r--. 1 123K May 26 19:58 Atari - 2600.rdb -rw-rw-r--. 1 27K May 26 19:58 Atari - 5200.rdb -rw-rw-r--. 1 49K May 26 19:58 Atari - 7800.rdb -rw-rw-r--. 1 47K May 26 19:58 Atari - Jaguar.rdb -rw-rw-r--. 1 36K May 26 19:58 Atari - Lynx.rdb -rw-rw-r--. 1 80K May 26 19:58 Atari - ST.rdb -rw-rw-r--. 1 35K May 26 19:58 Bandai - WonderSwan Color.rdb -rw-rw-r--. 1 42K May 26 19:58 Bandai - WonderSwan.rdb -rw-rw-r--. 1 209 May 26 19:58 Cannonball.rdb -rw-rw-r--. 1 2.4K May 26 19:58 Casio - Loopy.rdb -rw-rw-r--. 1 2.2K May 26 19:58 Casio - PV-1000.rdb -rw-rw-r--. 1 581 May 26 19:58 Cave Story.rdb -rw-rw-r--. 1 1.2K May 26 19:58 ChaiLove.rdb -rw-rw-r--. 1 48K May 26 19:58 Coleco - ColecoVision.rdb -rw-rw-r--. 1 62K May 26 19:58 Commodore - 64.rdb -rw-rw-r--. 1 696K May 26 19:58 Commodore - Amiga.rdb -rw-rw-r--. 1 2.0K May 26 19:58 Commodore - Plus-4.rdb -rw-rw-r--. 1 52K May 26 19:58 Commodore - VIC-20.rdb -rw-rw-r--. 1 298 May 26 19:58 Dinothawr.rdb -rw-rw-r--. 1 19K May 26 19:58 DOOM.rdb -rw-rw-r--. 1 2.1M May 26 19:58 DOS.rdb -rw-rw-r--. 1 9.3K May 26 19:58 Emerson - Arcadia 2001.rdb -rw-rw-r--. 1 847 May 26 19:58 Entex - Adventure Vision.rdb -rw-rw-r--. 1 8.4K May 26 19:58 Epoch - Super Cassette Vision.rdb -rw-rw-r--. 1 8.9K May 26 19:58 Fairchild - Channel F.rdb -rw-rw-r--. 1 900K May 26 19:58 FBNeo - Arcade Games.rdb -rw-rw-r--. 1 256 May 26 19:58 Flashback.rdb -rw-rw-r--. 1 2.2K May 26 19:58 Funtech - Super Acan.rdb -rw-rw-r--. 1 8.1K May 26 19:58 GamePark - GP32.rdb -rw-rw-r--. 1 12K May 26 19:58 GCE - Vectrex.rdb -rw-rw-r--. 1 12K May 26 19:58 Handheld Electronic Game.rdb -rw-rw-r--. 1 3.1K May 26 19:58 Hartung - Game Master.rdb -rw-r--r--. 1 1.4M May 26 19:58 HBMAME.rdb -rw-rw-r--. 1 21K May 26 19:58 LeapFrog - Leapster Learning Game System.rdb -rw-rw-r--. 1 977 May 26 19:58 Lutro.rdb -rw-rw-r--. 1 29K May 26 19:58 Magnavox - Odyssey2.rdb -rw-rw-r--. 1 439K May 26 19:58 MAME 2000.rdb -rw-rw-r--. 1 606K May 26 19:58 MAME 2003-Plus.rdb -rw-rw-r--. 1 862K May 26 19:58 MAME 2003.rdb -rw-rw-r--. 1 1.6M May 26 19:58 MAME 2010.rdb -rw-rw-r--. 1 2.1M May 26 19:58 MAME 2015.rdb -rw-rw-r--. 1 2.3M May 26 19:58 MAME 2016.rdb -rw-rw-r--. 1 6.8M May 26 19:58 MAME.rdb -rw-rw-r--. 1 86K May 26 19:58 Mattel - Intellivision.rdb -rw-rw-r--. 1 40K May 26 19:58 Microsoft - MSX2.rdb -rw-rw-r--. 1 241K May 26 19:58 Microsoft - MSX.rdb -rw-rw-r--. 1 630K May 26 19:58 Microsoft - Xbox.rdb -rw-rw-r--. 1 150 May 26 19:58 MrBoom.rdb -rw-rw-r--. 1 157K May 26 19:58 NEC - PC Engine CD - TurboGrafx-CD.rdb -rw-rw-r--. 1 1.1K May 26 19:58 NEC - PC Engine SuperGrafx.rdb -rw-rw-r--. 1 124K May 26 19:58 NEC - PC Engine - TurboGrafx 16.rdb -rw-rw-r--. 1 35K May 26 19:58 NEC - PC-FX.rdb -rw-rw-r--. 1 852K May 26 19:58 Nintendo - e-Reader.rdb -rw-rw-r--. 1 165K May 26 19:58 Nintendo - Family Computer Disk System.rdb -rw-rw-r--. 1 1.1M May 26 19:58 Nintendo - Game Boy Advance.rdb -rw-rw-r--. 1 492K May 26 19:58 Nintendo - Game Boy Color.rdb -rw-rw-r--. 1 489K May 26 19:58 Nintendo - Game Boy.rdb -rw-rw-r--. 1 905K May 26 19:58 Nintendo - GameCube.rdb -rw-rw-r--. 1 277K May 26 19:58 Nintendo - Nintendo 3DS (Digital).rdb -rw-rw-r--. 1 566K May 26 19:58 Nintendo - Nintendo 3DS.rdb -rw-rw-r--. 1 3.9K May 26 19:58 Nintendo - Nintendo 64DD.rdb -rw-rw-r--. 1 573K May 26 19:58 Nintendo - Nintendo 64.rdb -rw-rw-r--. 1 122K May 26 19:58 Nintendo - Nintendo DS (Download Play) (BETA).rdb -rw-rw-r--. 1 188K May 26 19:58 Nintendo - Nintendo DS (Download Play).rdb -rw-rw-r--. 1 2.2K May 26 19:58 Nintendo - Nintendo DSi Decrypted.rdb -rw-rw-r--. 1 224K May 26 19:58 Nintendo - Nintendo DSi (Digital).rdb -rw-rw-r--. 1 2.9K May 26 19:58 Nintendo - Nintendo DSi.rdb -rw-rw-r--. 1 2.0M May 26 19:58 Nintendo - Nintendo DS.rdb -rw-rw-r--. 1 1.4M May 26 19:58 Nintendo - Nintendo Entertainment System.rdb -rw-rw-r--. 1 11K May 26 19:58 Nintendo - Pokemon Mini.rdb -rw-rw-r--. 1 77K May 26 19:58 Nintendo - Satellaview.rdb -rw-rw-r--. 1 4.7K May 26 19:58 Nintendo - Sufami Turbo.rdb -rw-rw-r--. 1 1.2M May 26 19:58 Nintendo - Super Nintendo Entertainment System.rdb -rw-rw-r--. 1 8.2K May 26 19:58 Nintendo - Virtual Boy.rdb -rw-rw-r--. 1 797K May 26 19:58 Nintendo - Wii (Digital).rdb -rw-rw-r--. 1 1.4M May 26 19:58 Nintendo - Wii.rdb -rw-rw-r--. 1 6.1K May 26 19:58 Philips - Videopac+.rdb -rw-r--r--. 1 0 May 26 20:02 poop.txt -rw-r--r--. 1 225 May 26 19:58 Quake III.rdb -rw-r--r--. 1 422 May 26 19:58 Quake II.rdb -rw-rw-r--. 1 680 May 26 19:58 Quake.rdb -rw-rw-r--. 1 3.8K May 26 19:58 RCA - Studio II.rdb -rw-rw-r--. 1 161 May 26 19:58 Rick Dangerous.rdb -rw-rw-r--. 1 615 May 26 19:58 RPG Maker.rdb -rw-rw-r--. 1 1.1M May 26 19:58 ScummVM.rdb -rw-rw-r--. 1 58K May 26 19:58 Sega - 32X.rdb -rw-rw-r--. 1 378K May 26 19:58 Sega - Dreamcast.rdb -rw-rw-r--. 1 224K May 26 19:58 Sega - Game Gear.rdb -rw-rw-r--. 1 162K May 26 19:58 Sega - Master System - Mark III.rdb -rw-rw-r--. 1 109K May 26 19:58 Sega - Mega-CD - Sega CD.rdb -rw-rw-r--. 1 672K May 26 19:58 Sega - Mega Drive - Genesis.rdb -rw-rw-r--. 1 129K May 26 19:58 Sega - PICO.rdb -rw-rw-r--. 1 611K May 26 19:58 Sega - Saturn.rdb -rw-rw-r--. 1 63K May 26 19:58 Sega - SG-1000.rdb -rw-rw-r--. 1 780K May 26 19:58 Sharp - X68000.rdb -rw-rw-r--. 1 67K May 26 19:58 Sinclair - ZX 81.rdb -rw-rw-r--. 1 27K May 26 19:58 Sinclair - ZX Spectrum +3.rdb -rw-rw-r--. 1 16M May 26 19:58 Sinclair - ZX Spectrum.rdb -rw-rw-r--. 1 31K May 26 19:58 SNK - Neo Geo CD.rdb -rw-rw-r--. 1 38K May 26 19:58 SNK - Neo Geo Pocket Color.rdb -rw-rw-r--. 1 3.3K May 26 19:58 SNK - Neo Geo Pocket.rdb -rw-rw-r--. 1 3.0M May 26 19:58 Sony - PlayStation 2.rdb -rw-rw-r--. 1 197 May 26 19:58 Sony - PlayStation 3 (Downloadable).rdb -rw-rw-r--. 1 75K May 26 19:58 Sony - PlayStation 3 (PSN).rdb -rw-rw-r--. 1 1.2M May 26 19:58 Sony - PlayStation 3.rdb -rw-rw-r--. 1 546K May 26 19:58 Sony - PlayStation Portable (PSN).rdb -rw-rw-r--. 1 12K May 26 19:58 Sony - PlayStation Portable (PSX2PSP).rdb -rw-rw-r--. 1 1.2M May 26 19:58 Sony - PlayStation Portable.rdb -rw-rw-r--. 1 9.7K May 26 19:58 Sony - PlayStation Portable (UMD Music).rdb -rw-rw-r--. 1 186K May 26 19:58 Sony - PlayStation Portable (UMD Video).rdb -rw-rw-r--. 1 3.4M May 26 19:58 Sony - PlayStation.rdb -rw-rw-r--. 1 65K May 26 19:58 Sony - PlayStation Vita.rdb -rw-rw-r--. 1 227K May 26 19:58 The 3DO Company - 3DO.rdb -rw-rw-r--. 1 217K May 26 19:58 Thomson - MOTO.rdb -rw-rw-r--. 1 127K May 26 19:58 TIC-80.rdb -rw-rw-r--. 1 6.0K May 26 19:58 Tiger - Game.com.rdb -rw-rw-r--. 1 1.8K May 26 19:58 Tomb Raider.rdb -rw-rw-r--. 1 8.1K May 26 19:58 Uzebox.rdb -rw-rw-r--. 1 4.3K May 26 19:58 VTech - CreatiVision.rdb -rw-rw-r--. 1 37K May 26 19:58 VTech - V.Smile.rdb -rw-rw-r--. 1 14K May 26 19:58 Watara - Supervision.rdb -rw-r--r--. 1 2.5K May 26 19:58 Wolfenstein 3D.rdb

osirase avatar May 26 '20 08:05 osirase

This is also happening to me with RetroArch 1.8.7 on Arch Linux with all scan options except Manual Scan when selecting a specific core, that runs as expected (takes some time to start but scans all roms of that core very fast).

evicentemedina avatar May 26 '20 12:05 evicentemedina

Same issue here with RetroArch 1.8.7 on Arch Linux on x64 system (on both computers intel core i7 and Ryzen 5). Downgrading to 1.8.6 make the import content scanner working. As soon as I upgrade to 1.8.7, the import content scanner is stuck at 0% and nothing happens. Manual scan works on both versions.

berturion avatar May 27 '20 08:05 berturion

Same problem on Manjaro. CPU at 100%.

ghost avatar May 27 '20 16:05 ghost

Zero issue here on fda2355 or c2b8b3f1. Are you all using GCC 10? If so, that's likely the problem. GCC 10 has a couple massively breaking changes that have been causing headaches for a number of projects.

Mint 19.3 64-bit, GCC 9.3.0

Sanaki avatar May 28 '20 01:05 Sanaki

I don't know the version of GCC used by Arch Linux to compile RetroArch. I just installed it from the official packet manager pacman.

berturion avatar May 28 '20 04:05 berturion

It's unlikely to be GCC 10 in that case. Unfortunately I can't come up with anything specific, but if you manage any theories, I'm happy to check them out. My primary assumption is that it's either a permission or dependency issue, but it seems strange that it would crop up based on retroarch version in that case.

Sanaki avatar May 28 '20 04:05 Sanaki

I think it is related with the access to the games databases. On an existing content library created from v 1.8.6, after 1.8.7 upgrade, when I click on the I to access the database information for a game, RetroArch crashes. I don't think it is a permission issue because the game can be launched through the Load Content menu. For example, the User folder in the game folder is correctly created when using the Dolphin core. Also, I didn't touch any of the .rdb files between upgrade / downgrade. The owner is retroarch, group retroarch. Service is launched as retroarch, new created files owner are retroarch. Something changed between 1.8.6 and 1.8.7.

I also completely removed retroarch and all configuration files then installed it again. Folder scanning sill doesn't work.

berturion avatar May 28 '20 14:05 berturion

Scan is progressing when there is no game database. Though, as the database folder is empty, after scanning is done, no game is added in the library. As soon as I use the online updater to download the database, the folder scan does nothing and is stuck at 0%.

  • v 1.8.6 works
  • v 1.8.7 doesn't work
  • v 1.8.8 doesn't work

berturion avatar May 28 '20 18:05 berturion

While I couldn't say -why- it would be important, try executing chown $USER *.rdb from the directory where your database files are being stored. That will change ownership to your user. It seems like it's halting on permission denial for the database files. I did verify that removing readability on the file will cause the exact behavior you're referring to.

EDIT: Could also just do chmod 644 *.rdb to give read perms to all. But I'd like to know what the perms on them are already.

Sanaki avatar May 28 '20 22:05 Sanaki

No change here when chown to $USER, all .rdb files already have r permissions for everything.

osirase avatar May 29 '20 01:05 osirase

Same for the directory I assume? Seems unlikely that'd be different though.

Sanaki avatar May 29 '20 01:05 Sanaki

This problem just appeared for me as well though it appears a little different. With the ozone GUI, I get a progress bar that goes to 50%, then stops. For example, if I'm scanning a folder with 18 items in it, the progress bar stops at 18/36, and then uses 100% of a CPU core indefinitely. The program isn't frozen, and I can still move through the menu. I left it running for 15 minutes, and it never got any further.

I couldn't find anything in the logs or in stdout. Changing permissions on the database folder and files didn't help, unfortunately.

ONicholai avatar May 29 '20 03:05 ONicholai

The first 18 are the archives you keep the games in. That's how it behaved when I set my Atari 2600 rdb to 000 and tried scanning. If you look, it caps out CPU usage on one core while that's happening.

Sanaki avatar May 29 '20 05:05 Sanaki

chmod 755 ~/.config/retroarch/database
chmod 755 ~/.config/retroarch/database/rdb
chmod 644 ~/.config/retroarch/database/rdb/*

=> same result, scanning is stuck at 0%.

If I remove all *.rdb files, folder scanning is working (no games are added though).

In my test case, I try to scan a folder containing 3 GameCube roms. One game is .iso, the others are .gcz. If I put only the file Amstrad - CPC.rdb in ~/.config/retroarch/database/rdb, progression goes to 67% and is stuck analyzing the .iso file and never ends. No games are added in the library (it is normal, games are not in Amstrad CPC db). Then I add the file Nintendo - GameCube.rdb in ~/.config/retroarch/database/rdb, if I launch folder scanning, it gets immediately stuck at 0% on the first .gcz it founds.

I think that Retroarch hangs as soon as it tries to match the game and the database entry. But I can't understand why. Is it possible to try with other db formats, like .dat?

Also, I use Xorg, not wayland. I think the title of this issue is misleading, it seems to affect many Linux systems (Manjaro, Arch Linux and Fedora, at least), Xorg or Wayland.

berturion avatar May 29 '20 13:05 berturion

I can confirm on Arch Linux as well, only manual scan works. The Arch Linux package is built with GCC 10, can't build with another GCC, and clang is a no go as well since compilation fails :/

alucryd avatar May 30 '20 16:05 alucryd

I confirm the issue too. "Scan Directory" option stucks at 0% on the first rom. "Scan file" option has the same problem. Only "Manual Scan" works. Same behavior if the rom is compressed (zip or 7z) or uncompressed (tested with smc file - SNES rom)

Database has all permissions. Using Xorg.

Arch Linux up to date (05-30-2020) Retroarch version 1.8.8 installed with pacman from official repositories. It was compiled with GCC 10.1.0 / 64-bit. :/

anderberin avatar May 30 '20 17:05 anderberin

Ah... I didn't think there was any way the AUR version would use GCC 10 so soon, when it's breaking every project in sight. I'm not sure if there's an issue open yet to handle GCC 10 fixes, but I'd bet good money this goes there if so. Frankly, building with GCC 10 at this point is a bad choice.

Sanaki avatar May 30 '20 20:05 Sanaki