From: Alexander Smirnov <asmirnov@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>, isar-users@googlegroups.com
Subject: Re: [PATCH] isar: Clean mount point on bitbake exit
Date: Wed, 7 Feb 2018 00:10:44 +0300 [thread overview]
Message-ID: <c41d2e33-cd29-6cf3-3d98-efac9138b946@ilbers.de> (raw)
In-Reply-To: <46bff563-8447-39ec-d59c-97d57e36bc7c@siemens.com>
On 02/06/2018 11:56 PM, Jan Kiszka wrote:
> On 2018-02-06 21:45, Alexander Smirnov wrote:
>> On 02/06/2018 11:31 PM, Jan Kiszka wrote:
>>> On 2018-02-06 20:55, Alexander Smirnov wrote:
>>>> 8<--
>>>>
>>>> That's it! Branch 'asmirnov/devel', please test and enjoy :-)
>>>>
>>>> 8<--
>>>>
>>>> Now each multiconfig has registered handler for BuildCompleted event
>>>> (see
>>>> class 'isar-event.bbclass'). Moreover, the '/proc/mounts' file contains
>>>> all the active mounts. In addition, from event handler we could derive
>>>> all the variables like ${TMPDIR}, ${DISTRO} etc. So it's possible to
>>>> find all the active mounts for current multiconfig and clean them.
>>>>
>>>> NOTE: if build is interrupted by double ^C, some mount points could stay
>>>> uncleaned. This is caused by remaining processes started by bitbake, for
>>>> example:
>>>> - 'chroot build.sh ...'
>>>> - 'multistrap ...'
>>>
>>> Can you explain what the race condition is exactly? It seems to work for
>>> me so far, no forgotten mounts.
>>
>> Sometimes after double ^C I see several mounted artifacts in
>> buildchroot. But I've also noticed, that there are running processes
>> like 'multistrap' and 'build.sh' running *exactly* in this buildchroot.
>>
>> So, simple test, if you press double ^C and run 'ps ax' after, you will
>> likely see running processes. IIRC the same bitbake behavior I saw with
>> Yocto, interrupting bitbake doesn't mean to kill the process with
>> current task.
>
> Yes, there is a settling phase, but everything is dead and gone after a
> couple of seconds, at least here.
My multistrap process stays for a few minutes after, but it happens once
per about 10 times. Probably you are lucky and interrupt the build in
suitable place. For sure I press double ^C quickly without delay in between.
In general I'm not sure if we can handle this, it sounds like bitbake
should do this. The correct way to stop the build is to press single ^C,
this should work without any issues, but you have to wait until current
task is finished.
Anyway please let me know if the patch is ok and solves your issue with
'/dev/null', so I can apply it.
Alex
next prev parent reply other threads:[~2018-02-06 21:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 19:55 Alexander Smirnov
2018-02-06 20:31 ` Jan Kiszka
2018-02-06 20:45 ` Alexander Smirnov
2018-02-06 20:56 ` Jan Kiszka
2018-02-06 21:10 ` Alexander Smirnov [this message]
2018-02-09 9:56 ` Alexander Smirnov
2018-02-09 12:33 ` Henning Schild
2018-02-09 12:35 ` Jan Kiszka
2018-02-09 12:40 ` Henning Schild
2018-02-09 12:41 ` Jan Kiszka
2018-02-09 13:08 ` Alexander Smirnov
2018-02-09 13:14 ` Jan Kiszka
2018-02-09 13:39 ` Alexander Smirnov
2018-02-09 13:19 ` Henning Schild
2018-02-09 15:04 ` Henning Schild
2018-02-09 15:29 ` Alexander Smirnov
2018-02-09 13:14 ` Henning Schild
2018-02-09 13:19 ` Jan Kiszka
2018-02-09 13:29 ` Henning Schild
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=c41d2e33-cd29-6cf3-3d98-efac9138b946@ilbers.de \
--to=asmirnov@ilbers.de \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.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