Bug 15497

Summary: read-only PSEUDO_LOCALSTATEDIR should be fatal error
Product: [Yocto Project Subprojects] Pseudo Reporter: milahu
Component: pseudoAssignee: Unassigned <unassigned>
Status: ACCEPTED --- QA Contact:
Severity: minor    
Priority: Medium CC: mark.hatle, randy.macleod, richard.purdie, tgamblin, yp.pseudo.watcher, yp.watcher
Version: master   
Target Milestone: 6.1   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description milahu 2024-05-27 23:20:36 UTC
as expected, a missing PSEUDO_LOCALSTATEDIR throws fatal error

$ PSEUDO_LOCALSTATEDIR=/a/b/c/d ./result/bin/pseudo
Warning: PSEUDO_PREFIX unset, defaulting to /tmp/./result.
Can't open local state path '/a/b/c/d': No such file or directory

pseudo-1.9.0/pseudo_client.c

pseudo_diag("Can't open local state path '%s': %s\n",



but if PSEUDO_LOCALSTATEDIR is read-only
then pseudo produces this deadloop

$ ./result/bin/pseudo
Warning: PSEUDO_PREFIX unset, defaulting to /tmp/./result.
help: can't open log file /tmp/./result/var/pseudo/pseudo.log: Read-only file system
help: can't open log file /tmp/./result/var/pseudo/pseudo.log: Read-only file system
help: can't open log file /tmp/./result/var/pseudo/pseudo.log: Read-only file system
...

pseudo-1.9.0/pseudo_util.c

pseudo_diag("help: can't open log file %s: %s\n", pseudo_path, strerror(errno));



i tried adding "exit(1);" after the pseudo_diag call, but no help
so this condition should be checked earlier in the code
Comment 1 Randy MacLeod 2024-07-25 14:20:31 UTC
Is this an edge case bug for pseudo or is there an oe-core workflow that breaks due to this problem?
Comment 2 milahu 2024-07-25 15:03:46 UTC
its just a bug in pseudo

i have no idea what oe-core workflow is
Comment 3 Randy MacLeod 2024-07-26 23:51:34 UTC
Ah right. I forgot that some people use pseudo outside of Yocto builds.
Can you send a patch to:
❯ rg sendemail .../pseudo.git/README 
97:  git config sendemail.to yocto-patches@lists.yoctoproject.org
?
Comment 4 milahu 2024-07-27 08:10:12 UTC
i have no time for patching, sorry
Comment 5 Richard Purdie 2024-08-01 14:56:44 UTC
Deadlocks are bad so we should fix this at some point but read only filesystems are not common so medium priority.
Comment 6 Randy MacLeod 2025-05-01 14:07:06 UTC
Bulk move of all unassigned 5.2 medium importance bugs to 5.3.
Comment 7 Randy MacLeod 2026-04-01 18:20:45 UTC
I don't think this has been fixed. Bumping to 6.1.