Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] pseudo.c: Avoid patch mismatch errors for NAMELESS file entries
@ 2023-01-18 14:00 Richard Purdie
  2023-01-18 20:59 ` [OE-core] " Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2023-01-18 14:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: seebs

In rare cases we see failures, often in linux-libc-headers for things like:

|   INSTALL /XXX/linux-libc-headers/6.1-r0/image/usr/include
| abort()ing pseudo client by server request. See https://wiki.yoctoproject.org/wiki/Pseudo_Abort for more details on this.

Pseudo log:
path mismatch [2 links]: ino 46662476 db 'NAMELESS FILE' req '/XXX/linux-libc-headers/6.1-r0/image/usr'.
Setup complete, sending SIGUSR1 to pid 3630890.

Whilst this doesn't easily reproduce, the issue is that multiple different processes are
likely working on the directory and the creation in pseudo might not match accesses
made by other processes.

Ultimately, the "NAMELESS FILE" is harmless and pseudo will reconcile things
so rather than error out, we should ignore this case.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 pseudo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pseudo.c b/pseudo.c
index 528fe1b..4f36786 100644
--- a/pseudo.c
+++ b/pseudo.c
@@ -682,7 +682,8 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon
 				}
 				break;
 			default:
-				if (strcmp(msg->path, path_by_ino)) {
+				/* Ignore NAMELESS FILE entries since those could be created by other threads on new files */
+				if (strcmp(msg->path, path_by_ino) && !strcmp(path_by_ino, "NAMELESS FILE")) {
 					mismatch = 1;
 				}
 				break;
-- 
2.37.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [OE-core] [PATCH] pseudo.c: Avoid patch mismatch errors for NAMELESS file entries
  2023-01-18 14:00 [PATCH] pseudo.c: Avoid patch mismatch errors for NAMELESS file entries Richard Purdie
@ 2023-01-18 20:59 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2023-01-18 20:59 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core, seebs

On 18/01/2023 14:00:47+0000, Richard Purdie wrote:
> In rare cases we see failures, often in linux-libc-headers for things like:
> 
> |   INSTALL /XXX/linux-libc-headers/6.1-r0/image/usr/include
> | abort()ing pseudo client by server request. See https://wiki.yoctoproject.org/wiki/Pseudo_Abort for more details on this.
> 
> Pseudo log:
> path mismatch [2 links]: ino 46662476 db 'NAMELESS FILE' req '/XXX/linux-libc-headers/6.1-r0/image/usr'.
> Setup complete, sending SIGUSR1 to pid 3630890.
> 
> Whilst this doesn't easily reproduce, the issue is that multiple different processes are
> likely working on the directory and the creation in pseudo might not match accesses
> made by other processes.
> 
> Ultimately, the "NAMELESS FILE" is harmless and pseudo will reconcile things
> so rather than error out, we should ignore this case.
> 

[ YOCTO #14932 ]

> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  pseudo.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/pseudo.c b/pseudo.c
> index 528fe1b..4f36786 100644
> --- a/pseudo.c
> +++ b/pseudo.c
> @@ -682,7 +682,8 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon
>  				}
>  				break;
>  			default:
> -				if (strcmp(msg->path, path_by_ino)) {
> +				/* Ignore NAMELESS FILE entries since those could be created by other threads on new files */
> +				if (strcmp(msg->path, path_by_ino) && !strcmp(path_by_ino, "NAMELESS FILE")) {
>  					mismatch = 1;
>  				}
>  				break;
> -- 
> 2.37.2
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#176096): https://lists.openembedded.org/g/openembedded-core/message/176096
> Mute This Topic: https://lists.openembedded.org/mt/96354064/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-18 20:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18 14:00 [PATCH] pseudo.c: Avoid patch mismatch errors for NAMELESS file entries Richard Purdie
2023-01-18 20:59 ` [OE-core] " Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox