Skip to content

find: unexpected stdout/exit diff for /proc/<pid>/root traversal #254

@matt-dz

Description

@matt-dz

Summary

find produced recurring unexpected rshell/oracle diff candidates while traversing procfs process-root and process-cwd paths, especially command shapes using /proc/<pid>/root/... with -L.

The common symptom is that rshell either reports statat ...: no such file or directory, misses files that GNU find prints, or preserves a different symlink-expanded path than the oracle. This appears to be a procfs symlink/root traversal and path-preservation mismatch rather than a scenario failure.

Run Context

  • QA run id: run-20260517T205109Z-find
  • Target builtin: find
  • Scenario(s): find-poc scenarios 08, 11, 12, 16, 22, 24, 43, 45, 47, and 50
  • Rshell commit/version: unknown
  • Artifact reference: invocation records retained in the local QA workspace

Command Shapes

find -L /proc/<pid>/root/app -maxdepth 2 -type f -name "app.py" -print
find -L /proc/<pid>/root -maxdepth 3 -type f -name "app.py" -print | sort
find -L /proc/<pid>/root -maxdepth 2 -type f -name "service" -print
find /proc/<pid>/root/app -maxdepth 2 -print
find -L /proc/<pid>/cwd -maxdepth 2 -print | sort

Observed Difference

  • Differing dimension: stdout, stderr, and sometimes exit code
  • Rshell exit code: usually 0, but 1 in direct /proc/<pid>/root/app lookups
  • Oracle exit code: 0 for the sampled mismatches
  • Rshell summary:
    • For direct process-root app paths, rshell can fail with statat app: no such file or directory and no stdout.
    • For broader process-root traversal, rshell can miss expected app files and instead emit different traversal output plus loop warnings.
    • For a process-root search of a service file, rshell printed symlink-expanded paths such as /proc/<pid>/root/sbin/service where the oracle printed /proc/<pid>/root/service, and rshell also printed files under /sbin or /usr/sbin where the oracle printed nothing.
  • Oracle summary:
    • GNU find found files below the process root/cwd paths, for example /proc/<pid>/root/app/app.py, /proc/<pid>/root/app/requirements.txt, or /proc/<pid>/root/service, with exit code 0.

Evidence

The run had 18 diff invocation records matching procfs process-root/cwd find traversal. Representative invocation ids:

  • inv-20260518T001916.301485320Z-6920e6ff: find -L /proc/<pid>/root/app ... -name "app.py"; rshell exited 1 with statat app, oracle printed the app file and exited 0.
  • inv-20260518T004249.669800699Z-c7b6bde7: find -L /proc/<pid>/root/app ... -type f; rshell emitted statat app, oracle printed app files.
  • inv-20260518T010316.877668322Z-ed57c932: find -L /proc/<pid>/root/app ... -name "app.py"; rshell exited 1, oracle printed the app file.
  • inv-20260518T003847.829886625Z-13b7cc3f: find -L /proc/<pid>/root ... -name "service"; rshell printed /proc/<pid>/root/sbin/service, oracle printed /proc/<pid>/root/service.

Notes

This is an unexpected diff candidate from the QA harness. Full local artifacts are retained in the QA workspace. Maintainer judgment is still needed to decide whether rshell should change, document an intentional divergence, or adjust the harness/oracle comparison.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions