Zenity freezes

JD jd1008 at gmail.com
Mon Dec 31 02:51:19 UTC 2012


On Sun, Dec 30, 2012 at 6:25 PM, Johnny Rosenberg <gurus.knugum at gmail.com>wrote:

> In a terminal (things in <> are instructions, don't type those…):
> $ cat > Musicians
> FALSE
> First Name
> FALSE
> Second Name
> FALSE
> Third Name
> <Press Ctrl+d>
> $ zenity --list --title "Select musicians" --text="Some text"
> --column="Select" --column="Musician" --checklist --separator="\n"
> --height=480 --width=370 < Musicians
>
> The dialogue opens. Now hit OK or Cancel.
>
> Now, sometimes this works, but most of the time the dialogue freeze.
> The terminal shows the following:
>
> (zenity:3629): GLib-WARNING **:
> /build/buildd/glib2.0-2.32.3/./glib/giounix.c:411Error while getting
> flags for FD: Bad file descriptor (9)
>
>
> (zenity:3629): GLib-WARNING **:
> /build/buildd/glib2.0-2.32.3/./glib/giounix.c:411Error while getting
> flags for FD: Bad file descriptor (9)
>
>
> (zenity:3629): GLib-WARNING **:
> /build/buildd/glib2.0-2.32.3/./glib/giounix.c:411Error while getting
> flags for FD: Bad file descriptor (9)
>
> and so on.
>
> Ctrl+c in the terminal cancels the dialogue.
>
> So, what is this? User error or Zenity error? If user error, what did
> I do wrong? This worked in Ubuntu 10.10, at least better than in
> Ubuntu 12.04. I think I remember that it freeze in Ubuntu 10.10 too,
> but not almost every time, like it does in Ubuntu 12.04.
>
>
> Kind regards
>
> Johnny Rosenberg
> ジョニー・ローゼンバーグ


Hi Johnny,
The bad file descriptor number 9 very likely refers to a pipe file
descriptor.
The process on the other end of the pipe dies, and the process at the other
end
will not longer be able to read/write the pipe, and thus reports this error.
This is hapenning in the background, so you do not see it.

One way to get a total backtrace of all threads involved (and thus
determine which thread is exiting and thus closing it's FD's), is to
run  the command like so:

strace -tt -ff  -o /tmp/zenity  zenity --list --title "Select musicians"
--text="Some text" --column="Select" --column="Musician" --checklist
--separator="\n"  --height=480 --width=370 < Musicians

The files in /tmp called zenity.<pid> will contain the per-pid system
calls. Each system call
preceded by a full timestamp. This way you will be able to tell which
thread exited or closed
the FD before the thread that wanted to read/write  to it was hit with the
error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20121230/dcc0be09/attachment.html>


More information about the ubuntu-users mailing list