All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Hob: bug fixes
@ 2012-03-30  9:12 Shane Wang
  2012-03-30  9:12 ` [PATCH 1/2] runqueue: wait and deal with those <defunct> sub-processes as soon as they are os.killed() when "Force stop" Shane Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shane Wang @ 2012-03-30  9:12 UTC (permalink / raw)
  To: bitbake-devel

Fixes include:
 - a fix on build detail screen
 - a fix for finish_now() in runqueue.py

The following changes since commit bcd4d14425cadc5bd6296f59f14733e8c39c49dd:

  libc-packgae.bbclass: Add i686 support in locale_arch_options (2012-03-29 22:57:30 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib shane/hob
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=shane/hob

Liming An (1):
  Hob: In building log page, fixed the issue about 'endpath' not clear
    when next to start build

Shane Wang (1):
  runqueue: wait and deal with those <defunct> sub-processes as soon as
    they are os.killed() when "Force stop"

 bitbake/lib/bb/runqueue.py                   |    1 +
 bitbake/lib/bb/ui/crumbs/builddetailspage.py |    4 +++-
 2 files changed, 4 insertions(+), 1 deletions(-)

-- 
1.7.6




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

* [PATCH 1/2] runqueue: wait and deal with those <defunct> sub-processes as soon as they are os.killed() when "Force stop"
  2012-03-30  9:12 [PATCH 0/2] Hob: bug fixes Shane Wang
@ 2012-03-30  9:12 ` Shane Wang
  2012-03-30  9:12 ` [PATCH 2/2] Hob: In building log page, fixed the issue about 'endpath' not clear when next to start build Shane Wang
  2012-03-30 16:17 ` [PATCH 0/2] Hob: bug fixes Richard Purdie
  2 siblings, 0 replies; 4+ messages in thread
From: Shane Wang @ 2012-03-30  9:12 UTC (permalink / raw)
  To: bitbake-devel

When "Force stop" is performed during the build stage, after os.kill() kills the build sub-processes, there are many <defunct> python processes in the system. In Hob, when the user initiates a new build, os.waitpid() in runqueue_process_waitpid() will be called, and the pids of those <defunct> processes will be returned as result[0], then self.build_pids[result[0]] will throw KeyError exception because now for the new build self.build_pids is empty.

This patch is to address the above issue to collect the results and handle the sub-processes as soon as they are killed.

[Yocto #2186]

Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 bitbake/lib/bb/runqueue.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 6970548..b870caf 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1068,6 +1068,7 @@ class RunQueueExecute:
             for k, v in self.build_pids.iteritems():
                 try:
                     os.kill(-k, signal.SIGTERM)
+                    os.waitpid(-1, 0)
                 except:
                     pass
         for pipe in self.build_pipes:
-- 
1.7.6




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

* [PATCH 2/2] Hob: In building log page, fixed the issue about 'endpath' not clear when next to start build
  2012-03-30  9:12 [PATCH 0/2] Hob: bug fixes Shane Wang
  2012-03-30  9:12 ` [PATCH 1/2] runqueue: wait and deal with those <defunct> sub-processes as soon as they are os.killed() when "Force stop" Shane Wang
@ 2012-03-30  9:12 ` Shane Wang
  2012-03-30 16:17 ` [PATCH 0/2] Hob: bug fixes Richard Purdie
  2 siblings, 0 replies; 4+ messages in thread
From: Shane Wang @ 2012-03-30  9:12 UTC (permalink / raw)
  To: bitbake-devel

From: Liming An <limingx.l.an@intel.com>

Fixed the issue about the building log scrollbar can not auto scroll to page end sometimes

[YOCTO #2098]

Signed-off-by: Liming An <limingx.l.an@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builddetailspage.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
index 1440039..aee258a 100755
--- a/bitbake/lib/bb/ui/crumbs/builddetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
@@ -172,6 +172,7 @@ class BuildDetailsPage (HobPage):
 
     def reset_build_status(self):
         self.task_status.set_markup("\n") # to ensure layout is correct
+        self.endpath = (0,)
 
     def show_issues(self):
         self.num_of_issues += 1
@@ -234,7 +235,8 @@ class BuildDetailsPage (HobPage):
         if treeview and v_adj:
             if path[0] > self.endpath[0]: # check the event is a new row append or not
                 self.endpath = path
-                if v_adj.value == (v_adj.upper - v_adj.page_size): # check the gtk.adjustment position is at end boundary or not
+                # check the gtk.adjustment position is at end boundary or not
+                if (v_adj.upper <= v_adj.page_size) or (v_adj.value == v_adj.upper - v_adj.page_size):
                     treeview.scroll_to_cell(path)
 
     def show_configurations(self, configurations, params):
-- 
1.7.6




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

* Re: [PATCH 0/2] Hob: bug fixes
  2012-03-30  9:12 [PATCH 0/2] Hob: bug fixes Shane Wang
  2012-03-30  9:12 ` [PATCH 1/2] runqueue: wait and deal with those <defunct> sub-processes as soon as they are os.killed() when "Force stop" Shane Wang
  2012-03-30  9:12 ` [PATCH 2/2] Hob: In building log page, fixed the issue about 'endpath' not clear when next to start build Shane Wang
@ 2012-03-30 16:17 ` Richard Purdie
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2012-03-30 16:17 UTC (permalink / raw)
  To: Shane Wang; +Cc: bitbake-devel

On Fri, 2012-03-30 at 17:12 +0800, Shane Wang wrote:
> Fixes include:
>  - a fix on build detail screen
>  - a fix for finish_now() in runqueue.py
> 
> The following changes since commit bcd4d14425cadc5bd6296f59f14733e8c39c49dd:
> 
>   libc-packgae.bbclass: Add i686 support in locale_arch_options (2012-03-29 22:57:30 +0100)
> 
> are available in the git repository at:
>   git://git.pokylinux.org/poky-contrib shane/hob
>   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=shane/hob
> 
> Liming An (1):
>   Hob: In building log page, fixed the issue about 'endpath' not clear
>     when next to start build
> 
> Shane Wang (1):
>   runqueue: wait and deal with those <defunct> sub-processes as soon as
>     they are os.killed() when "Force stop"

Merged to master, thanks.

Richard




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

end of thread, other threads:[~2012-03-30 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-30  9:12 [PATCH 0/2] Hob: bug fixes Shane Wang
2012-03-30  9:12 ` [PATCH 1/2] runqueue: wait and deal with those <defunct> sub-processes as soon as they are os.killed() when "Force stop" Shane Wang
2012-03-30  9:12 ` [PATCH 2/2] Hob: In building log page, fixed the issue about 'endpath' not clear when next to start build Shane Wang
2012-03-30 16:17 ` [PATCH 0/2] Hob: bug fixes Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.