urxvt menu hangs urxvt with x input frozen

Bug #317366 reported by Martin Pool
38
This bug affects 3 people
Affects Status Importance Assigned to Milestone
rxvt (Ubuntu)
Invalid
Undecided
Unassigned
Jaunty
Invalid
Undecided
Unassigned
Karmic
Invalid
Undecided
Unassigned
rxvt-unicode (Arch Linux)
New
Undecided
Unassigned
rxvt-unicode (Debian)
Fix Released
Unknown
rxvt-unicode (Ubuntu)
Fix Released
Low
Unassigned
Jaunty
Fix Released
Undecided
Unassigned
Karmic
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: rxvt-unicode

To reproduce:

1- start urxvt in jaunty
2- ctrl-middle click in the terminal

What happens:

The urxvt menu appears. Then the mouse and keyboard become completely unresponsive: you can't click on the menu, close the window, or click in other windows. I guess it has hung with input grabbed.

Switching to a text vc and killing urxvt fixes the problem.

Here's an strace showing what it's doing, spanning the time from popping up until I killed it.

Revision history for this message
Martin Pool (mbp) wrote :
Revision history for this message
Martin Pool (mbp) wrote :

The same problem occurs with plain rxvt 1:2.6.4-14.

Revision history for this message
CodeBlock (codeblock) wrote :

Same issue using urxvt on FreeBSD:

$ X -version

X.Org X Server 1.6.0
Release Date: 2009-2-25
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 7.2-PRERELEASE i386
Current Operating System: FreeBSD R-1.local. 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 08:49:13 UTC 2009 <email address hidden>:/usr/obj/usr/src/sys/GENERIC i386
Build Date: 22 April 2009 02:40:51PM

and:

rxvt-unicode (urxvt) v9.06 - released: 2008-06-15

Any fixes?

Revision history for this message
Peter Jakobi (jakobi) wrote :

Menu is broken for me as well.

Effects: X11 hangs except for the mouse until the
urxvt in question is killed from a console; a grab maybe?

work around is disabling popups in .Xdefaults
(use xrdb -merge ~/.Xdefaults if necessary):

(if you still want perl running)
Rxvt.perl-ext-common: defaults,-option-popup,-selection-popup
otherwise its:
Rxvt.perl-ext:
Rxvt.perl-ext-common:

likely culprits are:
/usr/lib/urxvt/urxvt.pm # contains code for popups
/usr/lib/urxvt/perl/option-popup # menu itself
/usr/lib/urxvt/perl/selection-popup # possibly innocent??

Revision history for this message
Peter Jakobi (jakobi) wrote :

Addendum:

hang occurs _AFTER_ displaying the menu.

ubuntu jaunty 64bit, standard gnome/metacity setup
rxvt-unicode (urxvt) v9.06 - released: 2008-06-15
urxvt info toii rxvt-unicode-ml 9.06-1

urxvt >LOG 2>&1 produces NO output on hang or kill.

Info from urxvt isn't in any log.

Other possibly related messages:
maybe this one in the X log (the log itself at least has a suitable change time):
(II) AT Translated Set 2 keyboard: Device reopened after 1 attempts.
(II) SCISSORS Keyboard: Device reopened after 1 attempts.
(II) Macintosh mouse button emulation: Device reopened after 1 attempts.
(II) PS2++ Logitech Wheel Mouse: Device reopened after 1 attempts.

daemon.log (that was around the console switch to kill the urxvt, so gpm
noticed _SOMETHING_ (?)):
Jul 29 12:07:06 anuurn /usr/sbin/gpm[3306]: *** warning [daemon/old_main.c(254)]:
Jul 29 12:07:06 anuurn /usr/sbin/gpm[3306]: Data on strange file descriptor 4

upstream is also wondering:
http://lists.schmorp.de/pipermail/rxvt-unicode/2009q2.txt.gz

Revision history for this message
Peter Jakobi (jakobi) wrote :

both popups are affected (C-middle/C-right button).

Revision history for this message
Peter Jakobi (jakobi) wrote :

Appending straces as per request from Thomas Adam.

strace -o LOG.strace.hang-f -f urxvt -e /bin/dash
strace -o LOG.strace.hang urxvt -e /bin/dash
strace -o LOG.strace.nohang-f -f urxvt -e /bin/dash
strace -o LOG.strace.nohang urxvt -e /bin/dash

The difference being just CTRL-RIGHTBUTTON being pressed before kill or exit.
The reliability of the hangup is 100%, so getting good traces was easy :).

Revision history for this message
ThomasAdam (thomas-adam22) wrote :

As per:

http://lists.schmorp.de/pipermail/rxvt-unicode/2009q3/001044.html

Please see patch attached which might help --- not tested though. Feedback welcome, if via mailing list, please.

-- Thomas Adam

Revision history for this message
Peter Jakobi (jakobi) wrote :

Patch success confirmed.

There's still a small annoyance, as I'm required to move the mouse over another
window and back again to properly regain focus, but that's no show stopper,
and quite likely also influenced by metacity and me using sloppy focus, which
the metacity dev's hate with passion...

thanx,
Peter

Revision history for this message
Martin Pohlack (mp26+launch) wrote :

Patch works for me too.

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

Confirming on Karmic

Changed in rxvt-unicode (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

Attached debdiff against rxvt-unicode 9.06-1

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

Is this bug also present in rxvt package? I can't reproduce it (as It doesn't have a menu)

Changed in rxvt (Ubuntu):
status: New → Incomplete
Revision history for this message
ThomasAdam (thomas-adam22) wrote : Re: [Bug 317366] Re: urxvt menu hangs urxvt with x input frozen

2009/8/2 Krzysztof Klimonda <email address hidden>:
> Is this bug also present in rxvt package? I can't reproduce it (as It
> doesn't have a menu)

No -- it's not present in rxvt as the code is *completely* different.
(They're written in different languages for a start.)

-- Thomas Adam

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

Bug isn't present in rxvt

Changed in rxvt (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

After actually reading a linked post from ML (It was unavailable before) I've decided to use the same patch that was proposed upstream. Attaching patch and quoting description for further reference as rxvt-unicode doesn't use any patch system. I'll prepare a new debdiff shortly.

> Hi,
>
> With recent Xorg upgrades, grabbing synchronously when a popup window
> is mapped is fatal, as this sends the event loop to continually wait
> for the server to come available again which it can't do as nothing is
> ever releasing the grab. The fix then is for the callers to *not*
> force synchronous mode when calling rxvt_term::grab().
>
> See patch attached.
>
> (Note that originally I was almost tempted to just mangle the
> selection of GrabModeSync and GrabModeAsync to always be
> GrabModeAsync, however there's perfectly valid times when something
> might want to grab synchronously -- it's just nothing uses that yet.)

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :
Revision history for this message
Nick Markwell (duckinator) wrote :

Here it fails on:
  ctrl+middle click
  ctrl+right click
  ctrl+alt+middle click
  ctrl+alt+right click
gonna look into trying the patch if nobody in #archlinux on freenode has already

Revision history for this message
Nick Markwell (duckinator) wrote :

So i apparently can not read
Sorry about that *adds to proper page*

Revision history for this message
Nick Markwell (duckinator) wrote :

Ok, well, despite me looking like a total retard above -- the patch *does work* on archlinux

Revision history for this message
Scott Kitterman (kitterman) wrote :

Package FTBFS, so that will need to be fixed before anything can be uploaded:

background.C: In member function 'bool bgPixmap_t::set_geometry(const char*)':
background.C:273: error: invalid conversion from 'const char*' to 'char*'
background.C:274: error: invalid conversion from 'const char*' to 'char*'
background.C: In member function 'bool bgPixmap_t::set_file(const char*)':
background.C:680: error: invalid conversion from 'const char*' to 'char*'

Unsubscribing uus.

Changed in rxvt-unicode (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

A fix for FTBFS from Fedora (the only link other than Gentoo BTS I could find is http://lists.schmorp.de/pipermail/rxvt-unicode/2009q2/000970.html)

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

A build log from karmic pbuilder

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :
Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

Karmic has been released so debdiff should go to karmic-proposed, also tweaked version.

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

A patch for Lucid Lynx

Changed in rxvt-unicode (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rxvt-unicode - 9.06-2ubuntu1

---------------
rxvt-unicode (9.06-2ubuntu1) lucid; urgency=low

  * apply patch to fix X "locking" on ctrl+middle mouse click (LP: #317366)
  * Fix FTBFS caused by changes in glibc 2.10
  * debian/control:
     - change Maintainer to Ubuntu MOTU Developers

rxvt-unicode (9.06-2) unstable; urgency=medium

  * Don't install an alternative for urxvtcd (due to #481123)
 -- Krzysztof Klimonda <email address hidden> Sun, 02 Aug 2009 13:43:36 +0200

Changed in rxvt-unicode (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
John Dong (jdong) wrote :

ACK from MOTU-SRU for debdiff in #26.

Revision history for this message
Scott Kitterman (kitterman) wrote : Please test proposed package

Accepted into karmic-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 rxvt (Ubuntu Karmic):
status: New → Fix Committed
Changed in rxvt-unicode (Ubuntu Karmic):
status: New → Fix Committed
tags: added: verification-needed
Changed in rxvt (Ubuntu Karmic):
status: Fix Committed → Won't Fix
status: Won't Fix → Invalid
Changed in rxvt (Ubuntu Jaunty):
status: New → Invalid
Changed in rxvt-unicode (Ubuntu Jaunty):
status: New → Fix Committed
Revision history for this message
Scott Kitterman (kitterman) wrote :

Accepted rxvt-unicode into jaunty-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!

Revision history for this message
John Eikenberry (jae) wrote :

Note that urxvt upstream has rejected the patch used here to fix this issue as it is not a bug in urxvt but in the xserver.
I think it is a good-enough workaround for now (better than freezing), but once this bug is fixed in the xserver, this workaround should be removed.

Changed in rxvt-unicode (Debian):
status: Unknown → New
Revision history for this message
machrider (machrider) wrote :

The version in karmic-proposed (9.06-1ubuntu0.09.10.1) fixes this problem for me.

Revision history for this message
Gregory Fong (gvfong) wrote :

Confirming that the version in karmic-proposed builds from source.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rxvt-unicode - 9.06-1ubuntu0.09.10.1

---------------
rxvt-unicode (9.06-1ubuntu0.09.10.1) karmic-proposed; urgency=low

  * apply patch to fix X "locking" on ctrl+middle mouse click (LP: #317366)
  * Fix FTBFS caused by changes in glibc 2.10
  * debian/control:
    - change Maintainer to Ubuntu MOTU Developers
 -- Krzysztof Klimonda <email address hidden> Sun, 02 Aug 2009 13:43:36 +0200

Changed in rxvt-unicode (Ubuntu Karmic):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Setting back to v-needed for the jaunty version.

tags: added: verification-needed
removed: verification-done
Revision history for this message
Martin Pitt (pitti) wrote :

Anyone who can test the proposed package? If not, the proposed update will be removed again. Thanks!

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 317366] Re: urxvt menu hangs urxvt with x input frozen

On 29 April 2010 19:27, Martin Pitt <email address hidden> wrote:
> Anyone who can test the proposed package? If not, the proposed update
> will be removed again. Thanks!

pitti, do you mean specifically this needs to be tested in jaunty-proposed?

--
Martin <http://launchpad.net/~mbp/>

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

@Martin: Right, since that's what this current SRU is aimed at. Thanks!

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU Verification for Jaunty:
I have reproduced the problem with rxvt-unicode=9.06-1 and have verified that the version ofrxvt-unicode=9.06-1ubuntu0.09.04.1 in -proposed fixes the issue. No more hang with middle-click.

Marking as verification-done

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rxvt-unicode - 9.06-1ubuntu0.09.04.1

---------------
rxvt-unicode (9.06-1ubuntu0.09.04.1) jaunty-proposed; urgency=low

  * apply patch to fix X "locking" on ctrl+middle mouse click (LP: #317366)
  * Fix FTBFS caused by changes in glibc 2.10
  * debian/control:
    - change Maintainer to Ubuntu MOTU Developers
 -- Krzysztof Klimonda <email address hidden> Sun, 02 Aug 2009 13:43:36 +0200

Changed in rxvt-unicode (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Changed in rxvt-unicode (Debian):
status: New → 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.