libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.34k stars 1.84k forks source link

retroarch fails to extract a compressed file in a remote directory #3845

Open trentas opened 8 years ago

trentas commented 8 years ago

Hello there, I have a raspberry pi running RetroPie 4.0.2 and recently changed the RetroPie directory with my local NAS with more space to handle the roms.

But since I changed it to the remote mount, Retroarch is failing to extract the compressed file, just like this example below:

remote mount:

$ mount | grep RetroPie
//172.16.1.1/TORO/RetroPie on /home/pi/RetroPie type cifs (rw,relatime,vers=1.0,sec=ntlm,cache=strict,username=root,uid=1000,forceuid,gid=0,noforcegid,addr=172.16.1.1,file_mode=0755,dir_mode=0755,nounix,mapposix,rsize=16384,wsize=64172,actimeo=1)

retroarch version:

$ /opt/retropie/emulators/retroarch/bin/retroarch --version
RetroArch: Frontend for libretro -- v1.3.6 -- 4bffe5f --
Compiler: GCC (4.9.2) 32-bitBuilt: Oct 22 2016

command line:

$ strace -s 1024 -f /opt/retropie/emulators/retroarch/bin/retroarch -v -L /opt/retropie/libretrocores/lr-stella/stella_libretro.so --config /opt/retropie/configs/atari2600/retroarch.cfg "/home/pi/RetroPie/roms/atari2600/2 Pak Special - Cavern Blaster, City War (1992) (HES) (773-867) (PAL).zip"

strace output (please notice the ENOMEM error):

[pid  1051] open("/home/pi/RetroPie/roms/atari2600/2 Pak Special - Cavern Blaster, City War (1992) (HES) (773-867) (PAL).zip", O_RDONLY) = 3
[pid  1051] stat64("/home/pi/RetroPie/roms/atari2600/2 Pak Special - Cavern Blaster, City War (1992) (HES) (773-867) (PAL).zip", {st_mode=S_IFREG|0755, st_size=7927, ...}) = 0
[pid  1051] mmap2(NULL, 4294967295, PROT_READ, MAP_SHARED, 3, 0) = -1 ENOMEM (Cannot allocate memory)
[pid  1065] close(3)                    = 0
[pid  1065] write(2, "RetroArch [ERROR] :: ", 21RetroArch [ERROR] :: ) = 21
[pid  1065] write(2, "Failed to extract content from compressed file: /home/pi/RetroPie/roms/atari2600/2 Pak Special - Cavern Blaster, City War (1992) (HES) (773-867) (PAL).zip.\n", 156
Failed to extract content from compressed file: /home/pi/RetroPie/roms/atari2600/2 Pak Special - Cavern Blaster, City War (1992) (HES) (773-867) (PAL).zip.
) = 156

I've tried to set the cache_directory to a local filesystem, to the remote filesystem and even unset it, without any luck.

Here is the function that we are talking about, correct? https://github.com/libretro/RetroArch/blob/481ebced22b3701c6fcf7847ce7f01254e01f870/tasks/task_content.c#L458

Thanks.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/38638739-retroarch-fails-to-extract-a-compressed-file-in-a-remote-directory?utm_campaign=plugin&utm_content=tracker%2F296058&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F296058&utm_medium=issues&utm_source=github).
andres-asm commented 8 years ago

I have had similar issues with some filesystems (webdav fuse for one), and I have read about some people having issues like this with XFS and OverlayFS.

I think RetroArch wrappers on top of some filesystem functions might be the problem