First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 242462
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Ulrich Müller <ulm@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Sandro Bonazzola <sandro.bonazzola@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
hotkeys_email Bug report from Sandro to hotkeys upstream text/plain Wormo 2008-10-22 07:09 0000 8.88 KB Details
x11-misc:hotkeys-0.5.7.4.0.1:20081017-122340.log full build log text/plain Sandro Bonazzola 2008-10-22 18:01 0000 27.97 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 242462 depends on: 251832 Show dependency tree
Bug 242462 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-10-17 12:05 0000
emerge -pv hotkeys
x11-misc/hotkeys-0.5.7.4.0.1  USE="gtk -xosd"

The package is affected by some poor programming practices that I'll report
upstream. the result is:

$ hotkeys
X Error of failed request:  0
  Major opcode of failed request:  0 ()
  Serial number of failed request:  0
  Current serial number in output stream:  11
: Program exiting...: Bailing out...

$ emerge --info
Portage 2.2_rc12 (default/linux/amd64/2008.0/desktop, gcc-4.3.2,
glibc-2.8_p20080602-r0, 2.6.26-gentoo-r2 x86_64)
=================================================================
System uname:
Linux-2.6.26-gentoo-r2-x86_64-AMD_Athlon-tm-_64_Processor_3500+-with-glibc2.2.5
Timestamp of tree: Fri, 17 Oct 2008 05:34:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2,
1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fno-strict-aliasing"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/kde/4.1/env /usr/kde/4.1/share/config
/usr/kde/4.1/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/
/etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/initng/daemon
/etc/initng/net /etc/initng/system /etc/php/apache2-php5/ext-active/
/etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild
/etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe -fno-strict-aliasing"
DISTDIR="/home/media/dist"
FEATURES="collision-protect cvs distlocks elog java-strict metadata-transfer
multilib-strict parallel-fetch protect-owned sandbox sfperms strict
unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="it"
PKGDIR="/home/ftp/packages"
PORTAGE_COMPRESS="bzip2"
PORTAGE_COMPRESS_FLAGS="-9"
PORTAGE_RSYNC_EXTRA_OPTS=" --timeout=800 --progress "
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --stats --timeout=180 --exclude=/distfiles
--exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/portage
/home/sandro/cvstree/tinyos-2-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 3ds 7zip X a52 aac acl acpi alsa amd64 amr apache2 arts
audiofile avahi bash-completion berkdb bl branding bzip2 cairo cal3d caps
ccache cdb cddb cdparanoia cdr cg chroot cli cpudetection cracklib crypt css
cups curl custom-cflags dbus devhelp dga directfb disk-partition djvu dmi
dovecot-sasl dri dts dv dvd dvdr dvdread emboss emerald encode epydoc erandom
esd evo exif expat extrafilters fam fame ffmpeg firefox flac fltk foomaticdb
fortran gd gdbm ggi gif gimp glib glibc-omitfp glitz glut gmp gnokii gnome
gnutls gphoto2 gpm graphviz gsm gstreamer gtk gtkhtml guile hal hbci
howl-compat iconv idn ieee1394 imagemagick imlib ipv6 isc isdnlog ithreads java
javacomm javascript jbig jce jikes jpeg jpeg2k justify kde kdeenablefinal
kdehiddenvisibility kdeprefix kqemu lcms ldap libcaca libnotify
linuxthreads-tls lm_sensors logitech-mouse logrotate lzo mad mailwrapper
matroska mbox mdb mhash midi mikmod mjpeg mmap mmx mmxext mng motif mozdevelop
mp3 mpeg mppe-mppc msn mudflap multilib musepack musicbrainz mysql ncurses nfs
nls nptl nptlonly nsplugin numeric nvidia odbc ode offensive ofx ogg ogre
openexr opengl openmp oss pam parport pch pcre pdf perl php png povray ppds
pppd print pulseaudio python qa qt3 qt3support qt4 quicktime quotes rdesktop
readline reflection resolvconf restrict-javascript rtc samba scanner sdl
session slang slp smime sndfile snmp speex spell spl sse sse2 ssl
startup-notification subversion svg sysfs syslog tcpd test tetex tga theora
threads tidy tiff timidity tk truetype unicode usb userlocales utempter v4l
v4l2 vcd vda vorbis vorbis-psy wma wmf wmp www-client/mozilla-firefox xattr
xcomposite xforms xine xinerama xml xorg xpm xprint xscreensaver xulrunner xv
xvid xvmc yv12 zeroconf zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm
alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa
lfloat linear meter mmap_emul mulaw multi null plug rate route share shm
softvol" APACHE2_MODULES="actions alias auth_basic authn_anon authn_dbm
authn_default authn_file authz_dbm authz_default authz_groupfile authz_host
authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir
disk_cache env expires ext_filter file_cache filter headers include info
log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling
status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker"
CAMERAS="canon directory panasonic pccam300 " ELIBC="glibc"
FOO2ZJS_DEVICES="hp1005 hpp1005" INPUT_DEVICES="mouse evdev keyboard"
KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001
mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, MAKEOPTS

------- Comment #1 From Wormo 2008-10-17 22:42:08 0000 -------
Could you give more information on the coding problem you believe is leading to
the crash? I was unable to reproduce the problem merely by building hotkeys
with the same useflags (I am running the stable gcc 4.1.2 however).

------- Comment #2 From Wormo 2008-10-22 07:07:07 0000 -------
Oops, I had an email with the requested information sitting in my box for a few
days (Sandro sent it via email while bugzilla was down). I'll attach it now.

------- Comment #3 From Wormo 2008-10-22 07:09:04 0000 -------
Created an attachment (id=169380) [details]
Bug report from Sandro to hotkeys upstream

------- Comment #4 From Wormo 2008-10-22 07:18:22 0000 -------
Looking at the warning messages from the attached message, I think this will
turn out to be source needing to be updated for gcc 4.3. Time for the hotkeys
ebuild maintainers to take a look...

------- Comment #5 From Ulrich Müller 2008-10-22 08:04:27 0000 -------
gcc 4.3.2 doesn't show these warnings for me. Can you please attach the
complete build.log?

------- Comment #6 From Ulrich Müller 2008-10-22 15:46:09 0000 -------
I can reproduce the X error, and even get a segmentation fault in function
dummyHandler(). The seg fault occurs in line 1224 of hotkeys.c:

    XGetErrorDatabaseText(dpy, "XRequest", mesg, "", minor_op, BUFSIZ);

This function will return the error description in minor_op, which is a
statically declared character array of size 128, whereas BUFSIZ is defined as
8192 (I'm not sure where it comes from, probably from stdio.h).

I think that this is the same issue as in the Debian bug report:
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495763>. So let's wait for
upstream to come up with a solution.

(You are of course also welcome to provide us with a bugfix.)

------- Comment #7 From Sandro Bonazzola 2008-10-22 18:01:14 0000 -------
Created an attachment (id=169452) [details]
full build log

Here is the full build log requested.

------- Comment #8 From Ulrich Müller 2008-10-22 18:46:33 0000 -------
(In reply to comment #7)
> Created an attachment (id=169452) [edit] [details]
> Here is the full build log requested.

Thanks. It seems that you had an additional -Wall in your CFLAGS there, which
would explain the many warnings.

I still think that these issues are best handled upstream. However, the
question is who is upstream for this package? The last released version at
ypwong.org is 0.5.7.1 from 2002, last activity in upstream CVS (on Sourceforge)
was 5 years ago. So, looks like de-facto upstream is now Debian.

------- Comment #9 From Sandro Bonazzola 2008-10-22 19:17:39 0000 -------
(In reply to comment #8)
> However, the
> question is who is upstream for this package? The last released version at
> ypwong.org is 0.5.7.1 from 2002, last activity in upstream CVS (on Sourceforge)
> was 5 years ago. So, looks like de-facto upstream is now Debian.

I've sent an email to everyone listed in AUTHORS file. Five of them have an
email address that doesn't exists anymore. The others haven't replyed up to
now. Maybe this is an abandoned project and we should move to something else
(if it exists) or fix it ourself. A joint effort between distros' package
maintainers would be a decent replacement for a missing upstream.

------- Comment #10 From Sandro Bonazzola 2008-10-25 12:16:44 0000 -------
Ok, nobody in AUTHORS seems maintaining the package anymore. Just one of the
people listed have a valid email address and replied he no longer worked on the
code in the last 6 years. Upstream does not exists anymore, reopening.

------- Comment #11 From Michael 2009-01-20 06:59:35 0000 -------
I've updated line 1225 in hotkeys.c to be  XGetErrorDatabaseText(dpy,
"XRequest", mesg, "", minor_op, 128); (fixing the buffer size) to allow
debugging. 

I've spent some time debugging this through X with my limited knowledge.

The bug appears to be somewhere near the _XkbHandleGetMapReply function in
libX11-1.1.4/src/xkb/XKBGetMap.c. It gets there from "xkb = XkbGetMap(dpy,
XkbAllMapComponentsMask, XkbUseCoreKbd); line 1324 in hotkeys.c".

There's many mentions of known bugs with related sections of X11 code, and way
too many bugzilla URLs to paste. I note none have been solved.

Just adding this info in the hope that someone with more experience may be
narrow down the problem and create a patch.

------- Comment #12 From Michael 2009-01-22 10:11:27 0000 -------
Bad news, hotkeys time has come.

I've still been unable to locate the bug... it's somewhere in the X server.
Going forward however, the functionality used by hotkeys (XkbSA_ActionMessage)
is being forcefully removed/deprecated.

Here's the changes in the xorg xserver's tree:


http://cgit.freedesktop.org/xorg/xserver/commit/?id=edeb033f29ae2d52e86c543ccbf22fb7ae1fdb7f

------- Comment #13 From Ulrich Müller 2009-01-22 11:28:59 0000 -------
So, what alternatives exist for this package? Is anything of the following a
feasible replacement?

   x11-misc/lineakd
   x11-misc/xbindkeys
   app-laptop/pbbuttonsd
   app-misc/esekeyd

------- Comment #14 From Michael 2009-01-22 12:19:23 0000 -------
Good question...

Lineakd will suffer from the same problems as Hotkeys (well it should according
to code). It doesn't even compile on my system.

XKeybinds works, but is limited like Gnome/KDE... That is, they'll work until
you select a menu or open a full-screen OpenGL app or something like that.

Seems esekeyd may not work properly any more. Haven't tried it, but have seen
reports it stops working after loading X because X uses evdev now.

As far as I know, there's no replacement daemon/program able to capture
(hot)keys from the X server itself regardless of window manager etc. If you
feel like running X 1.3.0, all should work fine tho.

------- Comment #15 From Ulrich Müller 2009-01-25 17:24:05 0000 -------
So the conclusion is that it's not working and that there is no easy way to fix
it. Therefore masking for removal. If someone should come up with a working
patch, we shall revert this decision of course.

   # Ulrich Mueller <ulm@gentoo.org> (25 Jan 2009)
   # Masked for removal in 60 days. Produces segfaults and doesn't work
   # with recent X server due to API changes. Upstream dead. Bug 242462.
   x11-misc/hotkeys

------- Comment #16 From Federico Moro 2009-01-28 09:47:30 0000 -------
Hey! Just a second! It works very well for me.

Raphael, could be intereseting run hoteys with '-t' flag.

# hotkeys
hotkeys: You must set the keyboard type, use hotkeys -t <type> to set it.

# hotkeys -t
hotkeys -t mswod2000

# emerge -vp hotkeys
x11-misc/hotkeys-0.5.7.4.0.1  USE="gtk xosd"

# emerge --info
Portage 2.1.6.4 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0,
2.6.27-gentoo-r7 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r7-i686-AMD_Athlon-TM-_XP2400+-with-glibc2.0
Timestamp of tree: Wed, 28 Jan 2009 01:40:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.5.2-r7
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/
/etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo
/etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms
strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="es es_ES"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --stats --timeout=180 --exclude=/distfiles
--exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/enlightenment
/usr/portage/local/layman/pro-audio /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amr amrnb amrwb animgif aotuv
aqua_theme asm aspell async atm audacious bash-completion bcmath bdf bigpatch
bittorrent bl bluetooth boost branding bzip2 c++ cairo carbone_theme cdaudio
cdda cddb cdparanoia cdr cdrom cg cli colordiff cracklib crypt cscope css ctype
cups cvs cxx dbus dga divx dlslang dri dts dv dvd dvdnav dvdr dvdread enca
encode enscript es escreen etwin exif expat fame fbcon ffmpeg flac flash flv
foomaticdb fping fpx gcj gd gdbm gecko geoip gif gimp gimpprint gkrellm glade
glibc-omitfp glitz glut gmedia gnutls gpm gps gsm gtk gtkspell gzip gzip-el
hacking hardened hpn http iconv icp id3 id3tag idn imagemagick imlib imlib2
inkjar ipv6 isdnlog jabber java javascript jikes john joystick jpeg jpeg2k lame
latin1 lcms live lzo m17n-lib mad midi mjpeg mmx mmxext mng mozdevelop mozilla
moznoirc mp3 mp4 mpeg mpeg2 mplayer msn mudflap ncurses nemesi net network
nextaw nls nowebdav nptl nptlonly nsplugin objc objc++ objc-gc offensive ogg
openal opengl openmp pam paste64 pcre pdf plotutils png ppds pppd prediction
profile python qt-static quicktime rar readline realmedia reflection rss rtc
samba sdl seamonkey session slang sound speex spell spl srt sse ssl svg svga
sysfs syslog tcpd teletext tftp tga theora threads tiff tivo
toolkit-scroll-bars truetype type1 unicode usb v4l v4l2 vdr vidix vim vim-pager
vim-syntax vim-with-x vlm vorbis win32codecs wma wmf wmp x264 x86 xanim
xcomposite xext xft xorg xosd xpm xterm xv xvid xvmc zlib zvbi"
ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop
empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul
mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions
alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file
authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user
autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires
ext_filter file_cache filter headers include info log_config logio mem_cache
mime mime_magic negotiation rewrite setenvif speling status unique_id userdir
usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse wacom
joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216
lcdm001 mtxorb ncurses text" LINGUAS="es es_ES" USERLAND="GNU"
VIDEO_CARDS="nvidia v4l"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG,
LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS,
PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #17 From Federico Moro 2009-01-28 10:09:00 0000 -------
Excuse me, here is the return value of hotkeys.

$ hotkeys -t mswod2000 &
[11:05] darkstar@BlackHost ~ $ hotkeys -t mswod2000 &
[1] 9277
[11:06] darkstar@BlackHost ~ $ echo $?
0
[1]+  Done                    hotkeys -t mswod2000

So, hotkeys is working fine.

------- Comment #18 From Ulrich Müller 2009-01-28 11:09:43 0000 -------
> So, hotkeys is working fine.

Please post the output of the following command:
$ emerge -pv x11-base/xorg-server

------- Comment #19 From Federico Moro 2009-01-29 19:48:07 0000 -------
Using stable one.

$ emerge -vp x11-base/xorg-server
[ebuild   R   ] x11-base/xorg-server-1.3.0.0-r6  USE="dri ipv6 nptl sdl xorg"
INPUT_DEVICES="evdev joystick keyboard mouse wacom" VIDEO_CARDS="nvidia v4l"

------- Comment #20 From Ulrich Müller 2009-01-29 21:07:03 0000 -------
So it is still working with xorg-server-1.3.0* but fails with recent versions,
as expected from comment #14.

------- Comment #21 From Federico Moro 2009-01-29 21:24:08 0000 -------
Tell me what xorg version mean you and I'll test it.

...but you should wait for remove it since debian make patch...

------- Comment #22 From Federico Moro 2009-01-29 21:25:18 0000 -------
and it _should_ be in portage tree until xorg-server-1.3.0* still being stable
version.

------- Comment #23 From Ulrich Müller 2009-02-02 21:35:41 0000 -------
We can leave it package.masked in the tree as long as xorg-server-1.3.0* is the
most recent stable version.

------- Comment #24 From Ulrich Müller 2009-03-30 18:43:03 0000 -------
xorg-server-1.5.3 is going stable in bug 251832.
We will proceed with hotkeys removal then.

------- Comment #25 From RaceMouse 2009-04-02 18:32:40 0000 -------
(In reply to comment #24)
> xorg-server-1.5.3 is going stable in bug 251832.
> We will proceed with hotkeys removal then.
> 

Greetings,
After reading that horkeys are now on the brink to be extinct I decided to take
a look at the code. I too can clearly see why it segfaults.

I have made a new project on sf.net that has the unexpected name hotkeys2. I
will take th existing code and clean it, refactor it, simplify and fix it.

My guess is that it now has to be compatible with xorg 1.5.3 too, right ?

I expect have something ready for testing shortly after easter. Does anyone
care to create an ebuild for it so we can test that part too ?

/The Race

------- Comment #26 From Ulrich Müller 2009-04-02 19:00:15 0000 -------
(In reply to comment #25)
> I have made a new project on sf.net that has the unexpected name hotkeys2.
> I will take th existing code and clean it, refactor it, simplify and fix it.
> My guess is that it now has to be compatible with xorg 1.5.3 too, right ?

Yes, that would be a good idea.

> I expect have something ready for testing shortly after easter. Does anyone
> care to create an ebuild for it so we can test that part too ?

We need the upstream package before we can do this. ;-)

------- Comment #27 From Ulrich Müller 2009-05-07 10:47:40 0000 -------
Removed from Portage tree.

First Last Prev Next    No search results available      Search page      Enter new bug