Zenity --list uses 100%cpu and does nothing

Bug #995435 reported by Nick on 2012-05-06
82
This bug affects 16 people
Affects Status Importance Assigned to Milestone
Zenity
Fix Released
Critical
zenity (Ubuntu)
High
Unassigned
Precise
Undecided
Unassigned

Bug Description

Lubuntu 12.04-64
Zenity and zenity-common 3.4.0-0ubuntu3 from proposed/main archive.ubuntu.com

Eternal Lands (MMORPG-client) script (part of script):
...
{
 sort -u $serverfile | tr -d '\015' | grep -v -e ^$ -e ^# | \
 while read name dir server port description
 do
  echo $name
  echo $description
  echo $server
  echo $port
  echo $dir
 done | \
 zenity --title="Eternal Lands Launcher${non_standard}" --width=450 --height=280 \
  --list \
  --column "Name" \
  --column "Description" \
  --column "Server" \
  --column "Port" \
  --column "Directory" \
  --text "Choose the Server/Configuration - main is the standard"
}
...

When this script start - zenity get 25% of CPU and 22 Mb RSS and 430 Mb memory - and nothing (not window, not anything)...

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zenity (Ubuntu):
status: New → Confirmed
yurx cherio (cherio) wrote :

After upgrading to 12.04 none of my zenity scripts that rely on the "--list" option work. They all hang consuming 100% of one CPU core. I am surprised this slipped into the LTS release.

Andy S (andy-speed) wrote :

I am also affected by this as it hangs while consuming one of the cpu cores but never displays anything.

Julian Taylor (jtaylor) wrote :

it busy waits in tree.c:123:
123 while (g_io_channel_get_flags(channel) != G_IO_FLAG_IS_READABLE)
124 ;

summary: - Zenity do not work?
+ Zenity --list uses 100%cpu and does nothing
Changed in zenity (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Julian Taylor (jtaylor) wrote :

easy to reproduce from an manpage example
find . -name '*' | zenity --list --title "Search Results" --text "Finding all header files.." --column "Files"

Julian Taylor (jtaylor) wrote :

revised listview patch

Changed in zenity:
importance: Unknown → Critical
status: Unknown → Fix Released
tags: added: patch
Julian Taylor (jtaylor) on 2012-05-08
no longer affects: zenity (Debian)
Julian Taylor (jtaylor) on 2012-05-08
tags: added: regression-release

Hello Nick, or anyone else affected,

Accepted zenity into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in zenity (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Paul Broadhead (pjbroad) wrote :

The packages in proposed fix the problem for me. Thanks.

Martin Pitt (pitti) wrote :

I also confirm that the hangs are gone, using both test cases in this bug and in bug 968534.

tags: added: verification-done
removed: verification-needed
Rico Zoss (rico.zoss) wrote :

I also confim that the packages in proposed fix the problem for me. Thanks.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zenity - 3.4.0-0ubuntu4

---------------
zenity (3.4.0-0ubuntu4) precise-proposed; urgency=low

  * debian/patches/git_gio_get_flags.patch:
    - git patch backport to fix zenity running into a cpu loop when using
      the --list option (regression from the previous upload),
      thanks Julian Taylor (lp: #995435)
 -- Sebastien Bacher <email address hidden> Thu, 10 May 2012 10:13:54 -0700

Changed in zenity (Ubuntu Precise):
status: Fix Committed → Fix Released
Dmitry Shachnev (mitya57) wrote :

zenity (3.4.0-2) unstable; urgency=low

  [ Jordi Mallach ]
  * Mark zenity as Multi-Arch: foreign (thanks, Stéphane Graber).

  [ Michael Biebl ]
  * debian/patches/02_fix_segfault_in_listview.patch: Fix segfault when using
    --list option. Patch cherry-picked from upstream Git. Closes: #668292
  * Set <email address hidden> as Maintainer.

 -- Michael Biebl <email address hidden> Sat, 12 May 2012 21:12:05 +0200

Changed in zenity (Ubuntu):
status: Triaged → Fix Released
Alkis Georgopoulos (alkisg) wrote :

Zenity here in Trusty is still causing 100% CPU.
Just run:

$ zenity --list --column X </dev/null

...and try to close it, it won't close but stderr will be full of those:

(zenity:8103): GLib-WARNING **: /build/buildd/glib2.0-2.32.4/./glib/giounix.c:411Error while getting flags for FD: Bad file descriptor (9)

Changed in zenity (Ubuntu):
status: Fix Released → Triaged
Changed in zenity:
status: Fix Released → New
Changed in zenity:
status: New → Fix Released
Rolf Leggewie (r0lf) wrote :

I can confirm #13 for trusty.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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