failure to parse xorg output leads to a hung gui.

Bug #17595 reported by Andreas Schildbach
398
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hwdb-client (Ubuntu)
Medium
Oliver Grawert
Gutsy
Undecided
Unassigned
Hardy
Medium
Oliver Grawert

Bug Description

There are two issues in this bug. Firstly the xorg output parsing fails, and secondly, when that fails the gui is left hanging and the user is unable to recover.

There are other possible causes of xorg data parsing to fail, we should fix the gui being left stuck in all cases, perhaps with partial data gathering, or something similar.

TEST CASE:run hwdb-gui or hwdb-kde and step to the video page, it should give an error on the console. The updated package won't.

Related branches

Revision history for this message
Andreas Schildbach (schildbach) wrote :

Created an attachment (id=2548)
screenshot

Revision history for this message
Oliver Grawert (ogra) wrote :

could you run hwdb-gui from the commandline and post the output as attachment
please.

Revision history for this message
Andreas Schildbach (schildbach) wrote :

$ hwdb-gui
Xlib: extension "RANDR" missing on display ":0.0".
Traceback (most recent call last):
  File "/usr/bin/hwdb-gui", line 122, in <lambda>
    self.advance.connect("clicked", lambda w: self.adv(self.xmlfile))
  File "/usr/bin/hwdb-gui", line 552, in adv
    set[2] = set[2]+self.get_xorgdata()
  File "/usr/bin/hwdb-gui", line 225, in get_xorgdata
    return retval
UnboundLocalError: local variable 'retval' referenced before assignment

Revision history for this message
Andreas Schildbach (schildbach) wrote :

I am running the tool on a Dell Latitude X1, which is equipped with the i915GMS.
Thus, I have to use the i810 driver, which as far as I know does not support XRANDR.

Revision history for this message
Andreas Schildbach (schildbach) wrote :

On the daily build Breezy Live-CD (2005-09-08.2), this issue seems to be fixed.
I can't reproduce it any more, and hwdb-gui runs without errors.

Maybe the bug is still present in hwdb-*, but my system now supports XRANDR (at
least I can switch through resolutions with the "Screen Resolution Preferences"
on the fly).

Revision history for this message
Christof Krüger (christofkr) wrote :

I can confirm the problem. Just upgraded from dapper to edgy beta. See duplicate bug #62890 (sorry for filing it. Launchpad is sometimes confusing for me)

description: updated
Revision history for this message
Christof Krüger (christofkr) wrote :

The problem still exists in feisty herd 2.

The problem was that hwdb-gui relies on the fact that xrandr -q will return some useful information. When xrandr is not present, a variable used later fails to be set. This could be easily fixed by ensuring that the variable ("retval") will be assigned to on every possible execution path.

The bigger problem I see here is that hwdb-gui has a bigger design issue. It collects data in the format "width x height @ frequency Hz". But what if the user has multiple monitors (possibly running with different frequencies)?

The question is: what kind of data does the ubuntu team want to collect? It would be no problem to collect correct information about multiple screens, color depth, running extensions, dpi etc. Is there a specification of what kind of data in which format is expected to be sent?

I've attached a patch that fixes the bug and furthermore queries "xwininfo -root" if the xrandr-query fails. I could easily extend the code to return the layout of dual-head setups but as already mentioned: I would need to know which data and which format is desired by the ubuntu team.

PS: The hwdb-gui program could need unifying tabs/whitespace.

Changed in hwdb-client:
status: Needs Info → Confirmed
Revision history for this message
Dan O'Huiginn (daniel-ohuiginn) wrote :

Was this patch ever reviewed? It seems the problem is still present: Bug #102172 and its four duplicates seem to be the same bug as this one (in the broad sense of 'xorg data parsing fails', not necessarily of it failing in the same way)

Revision history for this message
berg (berg-foss) wrote :

I can confime this bug too in gutsy devel 27 july 2007 YET

root@gutsy-laptop:/home/gutsy/bugs/wireless# hwdb-gui
/bin/sh: /usr/bin/esd: not found
Traceback (most recent call last):
  File "/usr/bin/hwdb-gui", line 153, in <lambda>
    self.advance.connect("clicked", lambda w: self.adv(self.xmlfile))
  File "/usr/bin/hwdb-gui", line 597, in adv
    set[2] = set[2]+self.get_xorgdata()
  File "/usr/bin/hwdb-gui", line 256, in get_xorgdata
    return retval
UnboundLocalError: local variable 'retval' referenced before assignment
root@gutsy-laptop:/home/gutsy/bugs/wireless# dpkg -l hwdb*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=================================-=================================-==================================================================================
un hwdb-client <none> (no description available)
ii hwdb-client-common 0.6.11 common files for Ubuntu Hardware Database client
ii hwdb-client-gnome 0.6.11 Gnome client programs for the Ubuntu Hardware Database
root@gutsy-laptop:/home/gutsy/bugs/wireless#

Revision history for this message
Basilio Kublik (sourcercito) wrote :

i'll attach a patch to fix this bug, take in consideration that I'm _NOT_ a python programmer and this just an ugly hack, but gets the job done.
please review it, i was unable to strip the "*" symbol from the monitor frequency, so if anyone can, that would be great.

hope this helps.

Revision history for this message
Matteo Settenvini (tchernobog) wrote :

Seeing this on latest Gutsy.

Revision history for this message
Rafael Sachetto (rsachetto) wrote :

The patch works in Gutsy

Revision history for this message
Rafael Sachetto (rsachetto) wrote :

Actually the above path is a little bit wrong only because the indentation. I corrected that and I'm sending it again. PS: I'm _NOT_ a python programmer, I only tested this patch on gutsy and it works for me.

Revision history for this message
Joss Winn (josswinn) wrote :

Getting this on up-to-date Gutsy beta with Intel 950 card using 'intel' driver. (Lenovo 3000 N100 0768FPG)

Revision history for this message
Savvas Radevic (medigeek) wrote :

I can confirm this bug as well, msi nvidia nx7300gt, using compiz-fusion and the restricted nvidia driver

Revision history for this message
Savvas Radevic (medigeek) wrote :

the patch worked, I don't if I did this correctly, but:
cd ~/Desktop
wget http://launchpadlibrarian.net/9214201/fix_hwdb_screen-res_detection.patch
sudo patch -d /usr/bin/ < "$HOME/Desktop/fix_hwdb_screen-res_detection.patch"

in "File to patch:" type: hwdb-gui
all done!

Revision history for this message
Diego Collaziol (dcollaziol) wrote : Re: [Bug 17595] Re: failure to parse xorg output leads to a hung gui.

I'll try this. medigeek. maybe developers could put this path
automagically on xorg.

thanks, Diego

Em 04/10/2007, às 21:18, medigeek escreveu:

> the patch worked, I don't if I did this correctly, but:
> cd ~/Desktop
> wget http://launchpadlibrarian.net/9214201/fix_hwdb_screen-
> res_detection.patch
> sudo patch -d /usr/bin/ < "$HOME/Desktop/fix_hwdb_screen-
> res_detection.patch"
>
> in "File to patch:" type: hwdb-gui
> all done!
>
> --
> failure to parse xorg output leads to a hung gui.
> https://bugs.launchpad.net/bugs/17595
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.

Revision history for this message
Ryan Budney (delooper) wrote :

I can confirm the bug on today's version of Ubuntu 7.10:

rybu@rybu-laptop:~$ hwdb-gui
Traceback (most recent call last):
  File "/usr/bin/hwdb-gui", line 153, in <lambda>
    self.advance.connect("clicked", lambda w: self.adv(self.xmlfile))
  File "/usr/bin/hwdb-gui", line 597, in adv
    set[2] = set[2]+self.get_xorgdata()
  File "/usr/bin/hwdb-gui", line 256, in get_xorgdata
    return retval
UnboundLocalError: local variable 'retval' referenced before assignment
rybu@rybu-laptop:~$

Plus, during the audio test, hwdb-gui produces no sound, even though sound otherwise works perfectly for me in Ubuntu.

Revision history for this message
Ryan Budney (delooper) wrote :

The patch works for me, too. At least, it no longer gets stuck in the video stage.

Revision history for this message
Joss Winn (josswinn) wrote :

I get the same output as rybu. And audio is no longer being detected as rybu describes. I have a Centrino Duo Lenovo 3000 N100 withi intel video, sound and wireless. The patch fixes video detection for me but audio detection is still broken.

Revision history for this message
Diego Collaziol (dcollaziol) wrote :

I reinstaled the kubuntu tribe 5 and everything is normal again since then....updating diary and no more issues.
Diego

Revision history for this message
Jonathan Riddell (jr) wrote :
Revision history for this message
Jonathan Riddell (jr) wrote :
Revision history for this message
Jonathan Riddell (jr) wrote :

uploaded

Changed in hwdb-client:
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into gutsy-proposed.

Changed in hwdb-client:
status: Confirmed → Fix Committed
Revision history for this message
Derek (it-cheekwood) wrote :

Patch worked for me as well. Thank you.

Revision history for this message
Stealth (g1ann1) wrote :

The patch works for me too, but i can't hear any sound during the test. The sound system works properly on every other program. My hardware is:
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
on a acer travelmate notebook

Revision history for this message
Stéphane Loeuillet (leroutier) wrote :

Stealth : it is probably related to the fact that another process is already bound to your sound device.
(like a sound server : esound or pulseaudio)

Revision history for this message
Rafael Sachetto (rsachetto) wrote :

I had the same problem with the sound here
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)

Revision history for this message
Jamie Pietarinen (jpietari) wrote :

Patch worked for me. Good work!

On Nov 3, 2007 8:44 AM, Rafael Sachetto <email address hidden> wrote:

> I had the same problem with the sound here
> 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio
> Controller (rev 03)
>
> --
> failure to parse xorg output leads to a hung gui.
> https://bugs.launchpad.net/bugs/17595
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

Revision history for this message
pinam (pinamichael) wrote :

I got everything to work by installing GUTSY over again. This time I made
sure everything was plugged in, meaning, the network card cat 5, the wireless
was up adn running, etc... AND everything worked like a charm!

On Saturday 03 November 2007 5:44:47 am Rafael Sachetto wrote:
> I had the same problem with the sound here
> 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio
> Controller (rev 03)

--
Peace.

Jonathan Riddell (jr)
description: updated
Revision history for this message
Jonathan Riddell (jr) wrote :

hwdb-client (0.6.12) hardy; urgency=low

  * Sync with patch from gutsy-updates
    Closes LP: #17595

 -- Jonathan Riddell <email address hidden> Tue, 13 Nov 2007 18:04:33 +0000

Changed in hwdb-client:
status: Confirmed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

I tested hwdb-client version 0.6.11 in gutsy and was able to reproduce the hang. I then installed hwdb-client version 0.6.11.1 from gutsy-proposed and was able to submit my data to the hardware database.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to gutsy-updates.

Changed in hwdb-client:
status: Fix Committed → Fix Released
To post a comment you must log in.