Pseudo Abort: Difference between revisions

From Yocto Project
Jump to navigationJump to search
(Created page with "Pseudo can suffer from problems where files are created or modified in pseudo's fakeroot context, then deleted outside of it. In particular, the inode number for that file may...")
 
No edit summary
Line 2: Line 2:


As such, the project has decided to throw abort() calls when this is seen.
As such, the project has decided to throw abort() calls when this is seen.
A key note - the abort calls will trigger if the pseudo update is added and it is not a clean TMPDIR, since paths which should have been ignored will already have made it into the database. Please use a clean TMPDIR when switching to these pseudo patches. We will enforce a TMPDIR version change in configuration to avoid people being bitten by this.


If you see an abort(), it likely means a file was deleted in a non-pseudo context but was left in pseudo's database. You will usually be able to see the two conflicting file names in the WORKDIR/pseudo/pseudo.log file as a "path mismatch". If you run into this problem, either fix the reason the file was deleted outside of pseudo context, or if you don't understand the problem, report the line from the log file onto the openembedded-core or appropriate layer mailing list.
If you see an abort(), it likely means a file was deleted in a non-pseudo context but was left in pseudo's database. You will usually be able to see the two conflicting file names in the WORKDIR/pseudo/pseudo.log file as a "path mismatch". If you run into this problem, either fix the reason the file was deleted outside of pseudo context, or if you don't understand the problem, report the line from the log file onto the openembedded-core or appropriate layer mailing list.


In more detailed terms, pseudo tracks the full path name each open file descriptor maps to as well as any current chroot and the current working directory. Any file accesses to libc file functions should be resolvable given this data, although pseudo does have to jump through a few hoops to ensure this fd data is correctly maintained. File accesses can sometimes be because this mapping is out of sync with what really happened.
In more detailed terms, pseudo tracks the full path name each open file descriptor maps to as well as any current chroot and the current working directory. Any file accesses to libc file functions should be resolvable given this data, although pseudo does have to jump through a few hoops to ensure this fd data is correctly maintained. File accesses can sometimes be because this mapping is out of sync with what really happened.

Revision as of 17:21, 8 October 2020

Pseudo can suffer from problems where files are created or modified in pseudo's fakeroot context, then deleted outside of it. In particular, the inode number for that file may be reused. If some later access under pseudo uses that inode number, pseudo can see this and become confused about whether the files are the same file or not. Under older behaviour for pseudo, the modes of the old file may be applied to the new one, causing mode permission corruption.

As such, the project has decided to throw abort() calls when this is seen.

A key note - the abort calls will trigger if the pseudo update is added and it is not a clean TMPDIR, since paths which should have been ignored will already have made it into the database. Please use a clean TMPDIR when switching to these pseudo patches. We will enforce a TMPDIR version change in configuration to avoid people being bitten by this.

If you see an abort(), it likely means a file was deleted in a non-pseudo context but was left in pseudo's database. You will usually be able to see the two conflicting file names in the WORKDIR/pseudo/pseudo.log file as a "path mismatch". If you run into this problem, either fix the reason the file was deleted outside of pseudo context, or if you don't understand the problem, report the line from the log file onto the openembedded-core or appropriate layer mailing list.

In more detailed terms, pseudo tracks the full path name each open file descriptor maps to as well as any current chroot and the current working directory. Any file accesses to libc file functions should be resolvable given this data, although pseudo does have to jump through a few hoops to ensure this fd data is correctly maintained. File accesses can sometimes be because this mapping is out of sync with what really happened.