Skip to content

Unexpected behavior vs PS3: sysFsReaddir not breaking loop; cUrl: CELL_ENOTMOUNTED “/dev/urandom” #12891

Open
@rusak47

Description

@rusak47

Quick summary

I'm testing application that uses google drive api via curl.
In the process of debugging app, i've noticed that some functions doesn't work the same as on real PS3 hardware.

  1. the main issue: sysFsReaddir stops on the last available path and doesn't break a loop, while on PS3 it works as expected.
  2. for curl there is no entropy source, yet it's not recorded in emulator log:
    • in RPCS3 logs you can find only "SYS: 'sys_fs_open' failed with 0x8001003a : CELL_ENOTMOUNTED, “/dev/urandom” "
    • while in curl logs from app there is: INFO: Failed - PolarSSL: ctr_drbg_init returned (-0x0034) CTR_DRBG - The entropy source failed

Details

  1. On real PS3 this code is working as expected without introduced 'previousEntry' check. On RPCS3 'while' keeps looping on the last entry. Based on the result from PS3, i believe that on the next loop after last record read "entry.d_name" should be empty.
        std::string previousEntry = "";
        while (!sysFsReaddir(fd, &entry, &read) && strlen(entry.d_name) > 0)
        {
            debugPrintf("Reading directory (%s)....\n", entry.d_name);
            if(strcmp(previousEntry.c_str(),entry.d_name) == 0){
                debugPrintf("Double reading resource (%s) - breaking loop.\n", entry.d_name);
                break;
            }

            previousEntry = entry.d_name;
            if (strcmp(entry.d_name, ".") == 0 || strcmp(entry.d_name, "..") == 0) {
                continue;
            }
            ....
         }

Attach a log file

RPCS3.log.gz
application_debug.log

Attach capture files for visual issues

No response

System configuration

RPCS3 v0.0.24-14316-7ae9b15b Alpha | master
AMD Ryzen 7 4800H with Radeon Graphics | 16 Threads | 15.05 GiB RAM | TSC: 2.895GHz | AVX+ | FMA3
Operating system: POSIX, Name: Linux, Release: 5.18.12-arch1-1, Version: #1 SMP PREEMPT_DYNAMIC Fri, 15 Jul 2022 15:33:02 +0000
Qt version: Compiled against Qt 5.15.2 | Run-time uses Qt 5.15.5
Current Time: 2022-10-27T22:00:16

Other details

Emulator called via command: rpcs3 --verbose-curl
App installed as a package (.pkg)
App has enabled remote debugging on localhost udp port 18194
and can be logged via command ncat -u -l -p 18194 --no-shutdown -o debug.log
ps3-cloud-drive.pkg.tar.gz

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions