public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "MOESSBAUER, Felix" <felix.moessbauer@siemens.com>
To: "isar-users@googlegroups.com" <isar-users@googlegroups.com>,
	"venkata.pyla@toshiba-tsip.com" <venkata.pyla@toshiba-tsip.com>
Cc: "amikan@ilbers.de" <amikan@ilbers.de>,
	"Kiszka, Jan" <jan.kiszka@siemens.com>,
	"kazuhiro3.hayashi@toshiba.co.jp"
	<kazuhiro3.hayashi@toshiba.co.jp>,
	"dinesh.kumar@toshiba-tsip.com" <dinesh.kumar@toshiba-tsip.com>
Subject: Re: [PATCH 2/2] image.bbclass: remove core files generated in rootfs
Date: Thu, 31 Aug 2023 06:21:50 +0000	[thread overview]
Message-ID: <721f46b2f57d28cd1465fa6efb077be3309f1044.camel@siemens.com> (raw)
In-Reply-To: <20230807163512.19570-3-venkata.pyla@toshiba-tsip.com>

On Mon, 2023-08-07 at 22:05 +0530, venkata.pyla@toshiba-tsip.com wrote:
> From: venkata pyla <venkata.pyla@toshiba-tsip.com>
> 
> Sometimes core dumps are created in rootfs and left in the final
> image,
> and that results into non-reproducible images, so move those files to
> ${WORKDIR}/temp location and warn the user.
> 
> In armhf there is an issue with qemu-user-static that results in
> creating core dumps which is reported in Debian upstream [1],
> meanwhile
> move these core dumps outside the rootfs.
> 
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040981
> 
> Signed-off-by: venkata pyla <venkata.pyla@toshiba-tsip.com>
> ---
>  meta/classes/image.bbclass | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 08b6d3d6..80509d0d 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -461,6 +461,12 @@ do_rootfs_finalize() {
>          fi
>  EOSUDO
>  
> +    # Move core dump files generated in rootfs to temp folder in
> workdir.
> +    for f in ${ROOTFSDIR}/*.core; do

The name of the coredump file depends on the values of
/proc/sys/kernel/core_uses_pid and /proc/sys/kernel/core_pattern.

The stock kernel default configuration is just "core".
For further details, see [1].

[1] https://github.com/DynamoRIO/dynamorio/issues/6126

Felix

> +        sudo mv "${f}" "${WORKDIR}/temp/"
> +        bbwarn "found core dump in rootfs, moved it to
> ${WORKDIR}/temp/"
> +    done
> +
>      # Set same time-stamps to the newly generated file/folders in
> the
>      # rootfs image for the purpose of reproducible builds.
>      if [ -n "${SOURCE_DATE_EPOCH}" ]; then


      reply	other threads:[~2023-08-31  6:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 16:35 [PATCH 0/2] Fix reproducible issues in armhf venkata.pyla
2023-08-07 16:35 ` [PATCH 1/2] rootfs.bbclass: clean blkid cache files from rootfs venkata.pyla
2023-08-07 16:58   ` vijai kumar
2023-08-09  4:05     ` Venkata.Pyla
2023-08-09 13:47       ` [PATCH v2 0/2] Fix reproducible issues in armhf venkata.pyla
2023-08-14 11:57         ` vijai kumar
2023-08-15 14:59         ` Uladzimir Bely
2023-08-09 13:47       ` [PATCH v2 1/2] image.bbclass: remove core files generated in rootfs venkata.pyla
2023-08-09 13:47       ` [PATCH v2 2/2] image.bbclass: clean blkid cache files from rootfs venkata.pyla
2023-08-31  6:16     ` [PATCH 1/2] rootfs.bbclass: " MOESSBAUER, Felix
2023-08-07 16:35 ` [PATCH 2/2] image.bbclass: remove core files generated in rootfs venkata.pyla
2023-08-31  6:21   ` MOESSBAUER, Felix [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=721f46b2f57d28cd1465fa6efb077be3309f1044.camel@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=amikan@ilbers.de \
    --cc=dinesh.kumar@toshiba-tsip.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kazuhiro3.hayashi@toshiba.co.jp \
    --cc=venkata.pyla@toshiba-tsip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox