fuelmenu randomly crashes when scanning for other dhcp servers

Bug #1313354 reported by Mateusz Matuszkowiak
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Dima Shulyak

Bug Description

Hello,

While running latest Fuel 4.1 release (under VirtualBox VM instance) I have spotted a wild bug under PXE Setup menu option. Sometimes, after triggering the "Check" action, fuelmenu crashes with the following trace:

 Traceback (most recent call last):
  File "/usr/bin/fuelmenu", line 9, in <module>
    load_entry_point('fuelmenu==0.1', 'console_scripts', 'fuelmenu')()
  File "/usr/lib/python2.6/site-packages/fuelmenu/fuelmenu.py", line 390, in main
    setup()
  File "/usr/lib/python2.6/site-packages/fuelmenu/fuelmenu.py", line 303, in setup
    FuelSetup()
  File "/usr/lib/python2.6/site-packages/fuelmenu/fuelmenu.py", line 86, in __init__
    self.main()
  File "/usr/lib/python2.6/site-packages/fuelmenu/fuelmenu.py", line 261, in main
    self.mainloop.run()
  File "/usr/lib64/python2.6/site-packages/urwid/main_loop.py", line 271, in run
    self.screen.run_wrapper(self._run)
  File "/usr/lib64/python2.6/site-packages/urwid/raw_display.py", line 241, in run_wrapper
    return fn()
  File "/usr/lib64/python2.6/site-packages/urwid/main_loop.py", line 336, in _run
    self.event_loop.run()
  File "/usr/lib64/python2.6/site-packages/urwid/main_loop.py", line 707, in run
    self._loop()
  File "/usr/lib64/python2.6/site-packages/urwid/main_loop.py", line 786, in _loop
    self._watch_files[fd]()
  File "/usr/lib64/python2.6/site-packages/urwid/main_loop.py", line 387, in _update
    self.process_input(keys)
  File "/usr/lib64/python2.6/site-packages/urwid/main_loop.py", line 484, in process_input
    event, button, col, row, focus=True ):
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 1143, in mouse_event
    event, button, col, row-htrim, focus )
  File "/usr/lib64/python2.6/site-packages/urwid/listbox.py", line 1567, in mouse_event
    focus)
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 2172, in mouse_event
    col - x, row, focus)
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 1657, in mouse_event
    focus)
  File "/usr/lib64/python2.6/site-packages/urwid/decoration.py", line 398, in mouse_event
    event, button, col, row, focus)
  File "/usr/lib64/python2.6/site-packages/urwid/decoration.py", line 902, in mouse_event
    event, button,col, row-top, focus)
  File "/usr/lib64/python2.6/site-packages/urwid/listbox.py", line 1567, in mouse_event
    focus)
  File "/usr/lib64/python2.6/site-packages/urwid/decoration.py", line 663, in mouse_event
    focus)
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 2172, in mouse_event
    col - x, row, focus)
  File "/usr/lib64/python2.6/site-packages/urwid/wimp.py", line 556, in mouse_event
    self._emit('click')
  File "/usr/lib64/python2.6/site-packages/urwid/widget.py", line 463, in _emit
    signals.emit_signal(self, name, self, *args)
  File "/usr/lib64/python2.6/site-packages/urwid/signals.py", line 120, in emit
    result |= bool(callback(*args_copy))
  File "/usr/lib/python2.6/site-packages/fuelmenu/modules/cobblerconf.py", line 160, in check
    num_dhcp = len(dhcp_server_data)
TypeError: object of type 'bool' has no len()

This problem is probably connected to the external library - Scapy (2.0.0.10), which fuelmenu is using. The occurrence of this bug has been also reproduced by my collegue Michał Rostecki.

Wkr,
Mateusz

Tags: fuelmenu
description: updated
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

Mateusz,

What kind of network hardware you using? If you're deploying in a virtual machine, can you specify what hypervisor you're using and which emulated network hardware is selected?

Changed in fuel:
assignee: nobody → Matthew Mosesohn (raytrac3r)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Related fix proposed to fuel-web (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/91326

Changed in fuel:
status: New → Invalid
status: Invalid → In Progress
importance: Undecided → High
milestone: none → 5.0
Revision history for this message
Mateusz Matuszkowiak (zone-s) wrote : Re: [Bug 1313354] Re: fuelmenu randomly crashes when scanning for other dhcp servers

On 04/30/2014 12:43 PM, Matthew Mosesohn wrote:
> Mateusz,
>
> What kind of network hardware you using? If you're deploying in a
> virtual machine, can you specify what hypervisor you're using and which
> emulated network hardware is selected?
>
> ** Changed in: fuel
> Assignee: (unassigned) => Matthew Mosesohn (raytrac3r)
>
Hi,

Fuel was running in VirtualBox's VM (VT-x/AMD-V enabled) with bridged
interface to my hardware wireless adapter. VM had the "intel pro/1000 mt
desktop" emulated network adapter.

Cheers,
Mateusz

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Related fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/91326
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=9732ab2cf980592cf9f4647e8ed32c6ff53ec21f
Submitter: Jenkins
Branch: master

commit 9732ab2cf980592cf9f4647e8ed32c6ff53ec21f
Author: Dima Shulyak <email address hidden>
Date: Wed Apr 30 13:56:02 2014 +0300

    check_dhcp return list in case KeyboardInterrupt

    The only case when check_dhcp_on_eth is able to return bool
    is KeybordInterrupt exception catching in timeout.run_with_timeout

    It is required to be compliant with general fuelmenu flow

    Change-Id: I60d670976bf9c5bd7804277ec8b1aa9ca77ee3b4
    Related-Bug: #1313354

Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

Dima, please update issue status.

Changed in fuel:
assignee: Matthew Mosesohn (raytrac3r) → Dima Shulyak (dshulyak)
Revision history for this message
Dima Shulyak (dshulyak) wrote :

Folks, you clicked ctrl-c while running dhcp check?

urwid, and python in general, will raise KeyboardInterrupt as ctrl+c handler, so after my fix it will be handled properly.

Changed in fuel:
status: In Progress → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
Mateusz Matuszkowiak (zone-s) wrote : Re: [Bug 1313354] Re: fuelmenu randomly crashes when scanning for other dhcp servers

On 05/06/2014 05:30 PM, Dima Shulyak wrote:
> Folks, you clicked ctrl-c while running dhcp check?
>
> urwid, and python in general, will raise KeyboardInterrupt as ctrl+c
> handler, so after my fix it will be handled properly.
>
> ** Changed in: fuel
> Status: In Progress => Fix Released
>
> ** Changed in: fuel
> Status: Fix Released => Fix Committed
>
Hi,

No, I have not clicked any "ctrl-c" or any other keyboard buttons - the
keyboard was not involved into this.

Wkr,
Mateusz

Revision history for this message
Dima Shulyak (dshulyak) wrote :

Thanks for response,

Cant reproduce it locally, so maybe there is some issue with urwid and SIGINT usage, or other sporadic issue.
Anyway such error was possible only because of incorrect exception handler, and this will be fixed in 5.0.

Revision history for this message
Michal Rostecki (mrostecki) wrote :

I can also confirm that this bug can be reproduced without ctrl+c or any keyboard interrupting. I just triggered the "Check" action many times - mostly several dozen, but sometimes it does occur earlier.

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.