[BUG] Deadlock on create new wire brick

Bug #1169265 reported by Marco Giusti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Virtualbricks
Fix Released
Undecided
Marco Giusti

Bug Description

Steps to reproduce the bug:

 1. # rm -r ~/.virtualbricks*
 2. start virtualbricks
 3. create a new wire

What happens:

The gui freeze on a futex.

Further informations:

On start the gui reports there are some components not found: vde_switch vde_plug vde_cryptcab dpipe vdeterm vde_plug2tap wirefilter vde_router.

Tags: threads

Related branches

Revision history for this message
Marco Giusti (marco-giusti) wrote : Re: [Bug 1169265] [NEW] Deadlock on create new wire brick

The problem is in virtualbricks.gui.gui:270. `brickfactory.newbrick` is
called from the main thread and not from the brickfactory thread (the
method is invoked from the gui), so every calls to
`gtk.gdk.threads_enter()` is destinated to deadlock. Something like:

 lock = threading.Lock()
 with lock: # here is acquired
  with lock: # here the deadlock
   print self.the_meaning_of_life()

Mixing threads is bad, brickfactory is not threadsafe and works only
because just one thread at time is using it but if two threads try to
manipulate it nothing good will happen.

Revision history for this message
Marco Giusti (marco-giusti) wrote :

Also the problem is caused brickfactory.py:124, the bricktypes has a
MiXeD case key when only lowercase keys are expected.

Changed in virtualbrick:
assignee: nobody → mg (marco-giusti)
Changed in virtualbrick:
status: New → Fix Committed
summary: - Deadlock on create new wire brick
+ [BUG] Deadlock on create new wire brick
Revision history for this message
Marco Giusti (marco-giusti) wrote : Re: [Bug 1169265] Re: [BUG] Deadlock on create new wire brick

 status fixreleased

Changed in virtualbrick:
status: Fix Committed → Fix Released
Revision history for this message
Marco Giusti (marco-giusti) wrote :

 status fixcommitted

Changed in virtualbrick:
status: Fix Released → Fix Committed
Changed in virtualbrick:
status: Fix Committed → Fix Released
milestone: none → 1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.