networking/detect test crashed due to a traceback in modinfo_parser when the parser was passed apparently bad data

Bug #1066118 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
Medium
Jeff Lane 

Bug Description

Looking at some test results and networking/detect crashed. This caused a cascade failure where other networking tests failed to run, which also caused the suspend test to fail to run.

The test caused a traceback from modinfo_parser due to what I'm guessing is bad data passed from udev when network_device_info runs.

It could well be because the network card on this machine is not a common one, but I have to get more data from the tester to be sure. lspci on the machine says:

The traceback is:
Traceback (most recent call last):
  File "/usr/share/checkbox/scripts/network_device_info", line 238, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/share/checkbox/scripts/network_device_info", line 217, in main
    nm_devices = get_nm_devices()
  File "/usr/share/checkbox/scripts/network_device_info", line 169, in get_nm_devices
    devices.append(NetworkingDevice(devtype, props, dev_proxy, bus))
  File "/usr/share/checkbox/scripts/network_device_info", line 73, in __init__
    self._modinfo = self._modinfo_parser(props['Driver'])
  File "/usr/share/checkbox/scripts/network_device_info", line 122, in _modinfo_parser
    parser = ModinfoParser(stream)
  File "/usr/lib/python3/dist-packages/checkbox/parsers/modinfo.py", line 54, in __init__
    self._get_info(stream)
  File "/usr/lib/python3/dist-packages/checkbox/parsers/modinfo.py", line 60, in _get_info
    key, data = line.split(':',1)
ValueError: need more than 1 value to unpack

Unfortunately, because this occurred, it caused checkbox to only record stderr, which only captured the trace. So I have no idea at the moment which device this is. I'm guessing it's the ethernet device for now.

I have asked the tester to manually run a modified version of the network_device_info script on that machine and see if the data it provides can help me fix this bug. At the moment, I do not know what data props['Driver'] is passing to modinfo parser. I have a feeling it's either nothing, or garbage.

Related branches

Revision history for this message
Jeff Lane  (bladernr) wrote :

The device appears in the results as

JMicron JMC250 PCI Express Gigabit Ethernet Controller

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

This kind of device should use and report the jme kernel module.
I've found this modinfo output: http://pastebin.com/cuVxaRPD in case you need a base to compare with.

Revision history for this message
Jeff Lane  (bladernr) wrote :

Thanks for that :)

Looking at that output, I am guessing that the blank depends line is what is causing this:

alias: pci:v0000197Bd00000250sv*sd*bc*sc*i*
depends:
vermagic: 3.0.0-12-server SMP mod_unload modversions

That's a good place to start.

Jeff Lane  (bladernr)
Changed in checkbox:
status: New → Triaged
importance: Undecided → Medium
importance: Medium → High
assignee: nobody → Jeff Lane (bladernr)
Revision history for this message
Jeff Lane  (bladernr) wrote :

ON second thought, the blank "depends" isn't the culprit... tweaking the script a bit to pass the jme driver every time returns the following lines of output:

('filename', '/lib/modules/3.3.0-030300rc4-generic/kernel/drivers/net/ethernet/jme.ko')
('version', '1.0.8')
('license', 'GPL')
('description', 'JMicron JMC2x0 PCI Express Ethernet driver')
('author', 'Guo-Fu Tseng <email address hidden>')
('srcversion', '6213A84DD9D0887C4CDCF65')
('alias', 'pci:v0000197Bd00000260sv*sd*bc*sc*i*')
('alias', 'pci:v0000197Bd00000250sv*sd*bc*sc*i*')
('depends', '')
('intree', 'Y')
('vermagic', '3.3.0-030300rc4-generic SMP mod_unload modversions')
('parm', 'force_pseudohp:Enable pseudo hot-plug feature manually by driver instead of BIOS. (int)')
('parm', 'no_pseudohp:Disable pseudo hot-plug feature. (int)')
('parm', 'no_extplug:Do not use external plug signal for pseudo hot-plug. (int)')

note the suspected Depends line has a blank... this does not trigger the traceback. :/

Changed in checkbox:
importance: High → Medium
Revision history for this message
Jeff Lane  (bladernr) wrote :

I was able to recreate the ValueError by introducing a blank line at the end or beginning of the modinfo output stream...

Jeff Lane  (bladernr)
Changed in checkbox:
status: Triaged → Fix Committed
Revision history for this message
Wasim Hasan Raja (wasim-raja) wrote :

Help to solve the below error pls.

affects: checkbox → ubuntu
Revision history for this message
Daniel Manrique (roadmr) wrote :

Reverting to checkbox project.

affects: ubuntu → checkbox
Changed in checkbox:
status: Fix Committed → Fix Released
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.