[yocto] [pseudo] Pseudo 1.8+ xattr sqlite corruption
Jack.Fewx at dell.com
Jack.Fewx at dell.com
Mon Aug 20 11:45:09 PDT 2018
We are encountering a build problem after migrating to Poky 2.3 and Pseudo 1.8.1, and need help to resolve this.
It is hampering our development efforts, forcing us to rebuild images frequently.
Background:
Our build applies SELinux file contexts, during build time since our rootfs is read-only
In Poky 2.0, using Pseudo 1.6.2 this works perfectly 100% of the time
Problem:
Since the upgrade to 2.3 there is a 33%+ chance that the SELinux context labels will be corrupt at the end of the build.
The chance is random. Cleaning and Rebuilding a bad image target results in success/failure of equal likelihood. We can go days without an error, or like this weekend all 12 builds failed!
Failure mode:
We have learned to identify the failure and mark builds bad based on the contents of the Pseudo SQLite database generated by the image build.
A good build will have unique Inode to xattr references in the "xattrs" table. We prove pass/fail by doing a query of All entries and unique entries and verify the counts match.
Example of a good result, sorted by "ino":
Id dev ino name value
"1" "64773" "251402120" "security.selinux" system_u:object_r:root_t
"10012" "64773" "251402121" "security.selinux" system_u:object_r:var_t
"7293" "64773" "251402124" "security.selinux" system_u:object_r:lib_t
"19" "64773" "251402133" "security.selinux" system_u:object_r:var_run_t
On a bad build, there will be numerous duplicates in this table. Why this causes the failure I do not know, but this is just what we found is indicative to failure without flashing the image on something.
Example of a bad result, again sorted by "ino":
Id dev ino name value
"10067" "45" "2293256211" "security.selinux" system_u:object_r:usr_t
"31918" "45" "2293256211" "security.selinux" system_u:object_r:usr_t
"59307" "45" "2293256211" "security.selinux" system_u:object_r:usr_t
"61317" "45" "2293256211" "security.selinux" system_u:object_r:usr_t
"61737" "45" "2293256211" "security.selinux" system_u:object_r:usr_t
"61793" "45" "2293256211" "security.selinux" system_u:object_r:usr_t
"11849" "45" "2293250079" "security.selinux" system_u:object_r:var_spool_t
"66928" "45" "2293250079" "security.selinux" system_u:object_r:var_spool_t
"66948" "45" "2293250079" "security.selinux" system_u:object_r:var_spool_t
Any help would be greatly appreciated.
Jack Fewx
Software Senior Principal Engineer
Dell EMC | Server and Infrastructure Systems
jack_fewx at dell.com
More information about the yocto
mailing list