summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-10 17:59:33 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-10 17:59:33 -0300
commitf2bc41569d3f9834e574cd9c9147d977e018d277 (patch)
treee55531cd1e3597ce6c028a3ad6e4bb1970117580
parenta3e85fe4e5cb43a99a81cb2cc5c56f3a430cd8ea (diff)
downloadtuna-f2bc41569d3f9834e574cd9c9147d977e018d277.tar.gz
irqview: Fix some race conditions
Tested with: while true ; do modprobe ixgbe ifup eth1 ifup eth2 for a in $(seq 200) ; do pethtool -i > /dev/null done rmmod ixgbe > /dev/null done That is a multi-q rx/tx adapter and thus uses lots of IRQs. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-xtuna/gui/irqview.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/tuna/gui/irqview.py b/tuna/gui/irqview.py
index c7d9182..5253f78 100755
--- a/tuna/gui/irqview.py
+++ b/tuna/gui/irqview.py
@@ -235,9 +235,16 @@ class irqview:
# Was the last one
break
else:
- new_irqs.remove(irq)
- irq_info = self.irqs[irq]
- self.set_irq_columns(row, irq, irq_info, nics)
+ try:
+ new_irqs.remove(irq)
+ irq_info = self.irqs[irq]
+ self.set_irq_columns(row, irq, irq_info, nics)
+ except:
+ if self.list_store.remove(row):
+ # removed and row now its the next one
+ continue
+ # Was the last one
+ break
row = self.list_store.iter_next(row)
@@ -248,7 +255,10 @@ class irqview:
continue
row = self.list_store.append()
irq_info = self.irqs[irq]
- self.set_irq_columns(row, irq, irq_info, nics)
+ try:
+ self.set_irq_columns(row, irq, irq_info, nics)
+ except:
+ self.list_store.remove(row)
self.treeview.show_all()