public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] image: Restrict coredumps to *.core files again
@ 2024-06-27 17:04 Jan Kiszka
  2024-06-28  1:52 ` Dong, Zhi Bin
  2024-07-01  3:15 ` Uladzimir Bely
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Kiszka @ 2024-06-27 17:04 UTC (permalink / raw)
  To: isar-users; +Cc: Zhibin Dong, Moessbauer, Felix (T CED SES-DE)

From: Jan Kiszka <jan.kiszka@siemens.com>

Looking at every file's mime-type in a rootfs is simply way too costly
and also not needed in practice.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

To make my point more concrete. Please speak up if you think that 
coredumps with different endings do play a role. But make sure that case 
is strong:

- 7.5 min. do_rootfs_finalize for meta-iot2050 so far
- 0.5 min. with this change

 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 0a80273f..c29d9e26 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -436,7 +436,7 @@ EOSUDO
 
     # Sometimes qemu-user-static generates coredumps in chroot, move them
     # to work temporary directory and inform user about it.
-    for f in $(sudo find ${ROOTFSDIR} -type f -exec file --mime-type {} \; | grep 'application/x-coredump' | cut -d: -f1); do
+    for f in $(sudo find ${ROOTFSDIR} -type f -name *.core -exec file --mime-type {} \; | grep 'application/x-coredump' | cut -d: -f1); do
         sudo mv "${f}" "${WORKDIR}/temp/"
         bbwarn "found core dump in rootfs, check it in ${WORKDIR}/temp/${f##*/}"
     done
-- 
2.43.0

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

* RE: [PATCH] image: Restrict coredumps to *.core files again
  2024-06-27 17:04 [PATCH] image: Restrict coredumps to *.core files again Jan Kiszka
@ 2024-06-28  1:52 ` Dong, Zhi Bin
  2024-07-01  3:15 ` Uladzimir Bely
  1 sibling, 0 replies; 3+ messages in thread
From: Dong, Zhi Bin @ 2024-06-28  1:52 UTC (permalink / raw)
  To: Kiszka, Jan, isar-users; +Cc: MOESSBAUER, Felix

Make sense to me.

----------------
With best regards,
Zhibin Dong

Siemens Ltd., China
DI FA CTR SVC&AI CN
Tianyuan road No.99
611731 CHENGDU, China
Mobile: +86 15520735269
mailto:zhibin.dong@siemens.com
www.siemens.com

-----Original Message-----
From: Kiszka, Jan (T CED) <jan.kiszka@siemens.com> 
Sent: Friday, June 28, 2024 1:05 AM
To: isar-users <isar-users@googlegroups.com>
Cc: Dong, Zhi Bin (DI FA CTR SVC&AI CN) <ZhiBin.Dong@siemens.com>; Moessbauer, Felix (T CED OES-DE) <felix.moessbauer@siemens.com>
Subject: [PATCH] image: Restrict coredumps to *.core files again

From: Jan Kiszka <jan.kiszka@siemens.com>

Looking at every file's mime-type in a rootfs is simply way too costly and also not needed in practice.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

To make my point more concrete. Please speak up if you think that coredumps with different endings do play a role. But make sure that case is strong:

- 7.5 min. do_rootfs_finalize for meta-iot2050 so far
- 0.5 min. with this change

 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 0a80273f..c29d9e26 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -436,7 +436,7 @@ EOSUDO
 
     # Sometimes qemu-user-static generates coredumps in chroot, move them
     # to work temporary directory and inform user about it.
-    for f in $(sudo find ${ROOTFSDIR} -type f -exec file --mime-type {} \; | grep 'application/x-coredump' | cut -d: -f1); do
+    for f in $(sudo find ${ROOTFSDIR} -type f -name *.core -exec file 
+ --mime-type {} \; | grep 'application/x-coredump' | cut -d: -f1); do
         sudo mv "${f}" "${WORKDIR}/temp/"
         bbwarn "found core dump in rootfs, check it in ${WORKDIR}/temp/${f##*/}"
     done
--
2.43.0

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

* Re: [PATCH] image: Restrict coredumps to *.core files again
  2024-06-27 17:04 [PATCH] image: Restrict coredumps to *.core files again Jan Kiszka
  2024-06-28  1:52 ` Dong, Zhi Bin
@ 2024-07-01  3:15 ` Uladzimir Bely
  1 sibling, 0 replies; 3+ messages in thread
From: Uladzimir Bely @ 2024-07-01  3:15 UTC (permalink / raw)
  To: Jan Kiszka, isar-users; +Cc: Zhibin Dong, Moessbauer, Felix (T CED SES-DE)

On Thu, 2024-06-27 at 19:04 +0200, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Looking at every file's mime-type in a rootfs is simply way too
> costly
> and also not needed in practice.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> To make my point more concrete. Please speak up if you think that 
> coredumps with different endings do play a role. But make sure that
> case 
> is strong:
> 
> - 7.5 min. do_rootfs_finalize for meta-iot2050 so far
> - 0.5 min. with this change
> 
>  meta/classes/image.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 0a80273f..c29d9e26 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -436,7 +436,7 @@ EOSUDO
>  
>      # Sometimes qemu-user-static generates coredumps in chroot, move
> them
>      # to work temporary directory and inform user about it.
> -    for f in $(sudo find ${ROOTFSDIR} -type f -exec file --mime-type
> {} \; | grep 'application/x-coredump' | cut -d: -f1); do
> +    for f in $(sudo find ${ROOTFSDIR} -type f -name *.core -exec
> file --mime-type {} \; | grep 'application/x-coredump' | cut -d: -
> f1); do
>          sudo mv "${f}" "${WORKDIR}/temp/"
>          bbwarn "found core dump in rootfs, check it in
> ${WORKDIR}/temp/${f##*/}"
>      done
> -- 
> 2.43.0
> 

Applied to next, thanks.

-- 
Best regards,
Uladzimir.

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

end of thread, other threads:[~2024-07-01  3:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-27 17:04 [PATCH] image: Restrict coredumps to *.core files again Jan Kiszka
2024-06-28  1:52 ` Dong, Zhi Bin
2024-07-01  3:15 ` Uladzimir Bely

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