Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 271898 - x11-wm/awesome-3.2.1-r3 x11-libs/pango-1.24.2: crash on window title set
Summary: x11-wm/awesome-3.2.1-r3 x11-libs/pango-1.24.2: crash on window title set
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Alex Alexander (RETIRED)
URL: http://osdev.org/phpBB2
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-30 18:55 UTC by Khumba
Modified: 2013-02-05 23:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Gdb backtrace of awesome's coredump. (backtrace.txt,9.98 KB, text/plain)
2009-05-30 18:56 UTC, Khumba
Details
Output of startx. (x-output.txt,1.08 KB, text/plain)
2009-05-30 18:57 UTC, Khumba
Details
My make.conf. (make.conf,3.27 KB, text/plain)
2009-05-30 18:57 UTC, Khumba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Khumba 2009-05-30 18:55:11 UTC
Awesome crashes in a Pango function (pango_parse_markup) when Firefox and Epiphany set their window titles to certain strings.  Happens every time in both browsers, with specific web pages.  I haven't tried other web browsers or applications.  If I tell a tab to load the page, and activate another tab before the page loads so that the window title isn't set to the new tab's title, there is no crash.

Adding USE=debug to pango stops the crash from happening, but -ggdb and FEATURES=nostrip doesn't.

Pages I've found that this happens on are:
http://osdev.org/phpBB2
http://iolanguage.org/?page_id=2

Reproducible: Always

Steps to Reproduce:
1. Open Firefox or Epiphany.
2. Go to one of the pages:
http://osdev.org/phpBB2
http://iolanguage.org/?page_id=2
Actual Results:  
Awesome prints the following message to the terminal X was started from, then segfaults:
W: awesome: draw_iso2utf8:81: text conversion failed: Invalid or incomplete multibyte or wide character

Expected Results:  
The webpage should load normally.

The versions I have installed, and rebuilt with -ggdb and FEATURES=nostrip, are:
[ebuild   R   ] x11-libs/libxcb-1.1  USE="doc -debug" 0 kB
[ebuild   R   ] dev-lang/lua-5.1.4  USE="deprecated readline -static" 0 kB
[ebuild   R   ] x11-libs/pango-1.24.2  USE="X doc -debug" 0 kB
[ebuild   R   ] x11-wm/awesome-3.2.1-r3  USE="dbus doc" 0 kB

The versions of the browsers I'm using are:
[ebuild   R   ] www-client/mozilla-firefox-3.0.10  USE="dbus gnome java mozdevelop startup-notification xulrunner -bindist -custom-optimization -iceweasel -restrict-javascript" LINGUAS="en -af -ar -be -bg -bn -bn_IN -ca -cs -cy -da -de -el -en_GB -en_US -eo -es -es_AR -es_ES -et -eu -fi -fr -fy -fy_NL -ga -ga_IE -gl -gu -gu_IN -he -hi -hi_IN -hu -id -is -it -ja -ka -kn -ko -ku -lt -lv -mk -mn -mr -nb -nb_NO -nl -nn -nn_NO -oc -pa -pa_IN -pl -pt -pt_BR -pt_PT -ro -ru -si -sk -sl -sq -sr -sv -sv_SE -te -th -tr -uk -zh -zh_CN -zh_TW" 0 kB
[ebuild   R   ] www-client/epiphany-2.24.3-r10  USE="doc python spell -avahi -debug -networkmanager" 0 kB

emerge --info:

Portage 2.1.6.11 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.28-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.28-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9000_@_2.00GHz-with-glibc2.2.5
Timestamp of tree: Fri, 29 May 2009 17:45:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-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.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -ggdb"
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/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/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer nostrip parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://gentoo.arcticnetwork.ca/pub/gentoo/ http://mirror.usu.edu/mirrors/gentoo/ ftp://gentoo.llarian.net/pub/gentoo http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.mirrors.tera-byte.com/ http://gentoo.cites.uiuc.edu/pub/gentoo/ http://mirror.datapipe.net/gentoo http://mirror.mcs.anl.gov/pub/gentoo/ http://gentoo.llarian.net/ http://gentoo.arcticnetwork.ca/source/"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,-z,combreloc"
LINGUAS="en"
MAKEOPTS=" -j2"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="gzip"
PORTAGE_CONFIGROOT="/"
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/science"
SYNC="rsync://gentoo.arcticnetwork.ca/gentoo-portage"
USE="X Xaw3d a52 aac aalib acl alsa amd64 apache2 bash-completion berkdb branding bzip2 cairo cdr cgi cjk cli cracklib crypt cups curl dbus doc dri dvd dvdr dvdread dvi emacs encode exif ffmpeg firefox flac fltk foomaticdb fortran ftp gdbm gif gimp git gmp gnome gnutls gphoto2 gpm gstreamer gtk hal iconv id3tag imlib ipod iproute2 ipv6 isdnlog java javascript jpeg json lapack latex leim libnotify logrotate matroska midi mikmod mime mmap mmx mmxext mng mp3 mpeg mplayer msn mudflap multilib mysql mysqli nautilus ncurses nls nptl nptlonly nsplugin offensive ogg openal opengl openmp pam pcre pdf perl php png postgres ppds pppd python qt3 qt4 quicktime readline reflection samba sbcl scanner sdl server session snmp spell spl sqlite sse sse2 ssl startup-notification subversion svg sysfs tcpd theora threads tiff tk truetype type1 unicode usb vcd vhosts vorbis wifi wmf x264 xcomposite xft xorg xprint xrandr xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Khumba 2009-05-30 18:56:37 UTC
Created attachment 193000 [details]
Gdb backtrace of awesome's coredump.
Comment 2 Khumba 2009-05-30 18:57:05 UTC
Created attachment 193001 [details]
Output of startx.
Comment 3 Khumba 2009-05-30 18:57:46 UTC
Created attachment 193003 [details]
My make.conf.
Comment 4 Wormo (RETIRED) gentoo-dev 2009-06-01 06:31:24 UTC
Looks like non-ascii characters in title is what triggers the problem, since both your test cases use special characters (• bullet for first, » double angle for second) -- which fits with the complaint about wide characters you got before crash.

Thanks for the report, assigning to maintainer.
Comment 5 MATSUU Takuto (RETIRED) gentoo-dev 2009-06-01 16:30:36 UTC
Please try to set utf-8 locale to LANG environment variable before start awesome.
For example, LANG=en_US.UTF-8. 

cf.
http://www.mail-archive.com/awesome@naquadah.org/msg01112.html
Comment 6 Khumba 2009-06-04 17:14:50 UTC
Yes, I hadn't created an /etc/env.d/02local.  Setting LANG=en_US.UTF-8 in there fixed the problem for me.  Thanks!  Is it right for Pango to be crashing though?
Comment 7 Emmanuel Lepage Vallee 2009-06-09 20:31:55 UTC
Confirmed. It is the same with awesome 3.3 and 3.2.* worked before, it is an other package that broke them
Comment 8 Auke Booij (tulcod) 2009-06-15 10:10:26 UTC
Takuto's solution did not fix the problem for me. I'm using a number of masked X packages on ~amd64.
Comment 9 MATSUU Takuto (RETIRED) gentoo-dev 2009-06-15 16:10:36 UTC
(In reply to comment #8)
> Takuto's solution did not fix the problem for me. I'm using a number of masked
> X packages on ~amd64.
> 

please try these commands.
$ echo $LANG
$ echo $LC_ALL
$ locale
$ LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 awesome

and could you test this patch?
http://git.naquadah.org/?p=awesome.git;a=commit;h=9c8efee9bf06ac731454d293e269d5c909c8175b
Comment 10 Auke Booij (tulcod) 2009-06-15 17:24:52 UTC
LANG=en.US-UTF-8, but LC_ALL= (ie empty) (both in the terminal and in locale's output)
the patch didn't help, nor did setting LC_ALL to en.US-UTF-8.

I will try and make a backtrace soon.
Comment 11 Auke Booij (tulcod) 2009-06-16 12:49:32 UTC
sheesh, I should get one of those books on GDB, i'm really struggling with it.

anyway, rebuilt awesome with USE=debug, and although it depends on which planets line up, it seems like the problem is in property.c:168, which is an initialization call to xcb (and in some of my tests, xcb was indeed clearly doing stuff with uninitialized pointers). I suspect xcb is the cause of issues, here, since I haven't updated pango nor awesome since the problems began.
Comment 12 MATSUU Takuto (RETIRED) gentoo-dev 2009-06-19 23:59:45 UTC
awesome-3.3.1 in cvs. perhaps, its fixed the pango issue.
Comment 13 Gorka Gil 2009-08-09 14:43:43 UTC
This is what works for me:

  echo "es_ES.UTF-8 UTF-8" >> /etc/locale.gen
  locale-gen
  echo "LANG="es_ES.UTF-8" >> /etc/env.d/02locale
  reboot

(with env-update, source /etc/profile and restart of xdm don't work, so finally I reboot the computer and works. I don't understand why)

Only for curiosity, if you want to see the text that are causing the crash, you can edit /usr/share/awesome/lib/awful/util.lua in line 98, change:

  function escape(text)
    return text and text:gsub("['&<>\"]", xml_entity_names) or nil
  end

by

  function escape(text)
    os.execute("echo '" .. text .. "' >> /tmp/aw.log")
    return text and text:gsub("['&<>\"]", xml_entity_names) or nil
  end

When it crash again, you can see the text that causes the crash in the last line of /tmp/aw.log.

In my case I can't access to gmail page in spanish, it tries to display:
  Gmail: correo electr?nico de Google - Mozilla Firefox

instead of:
  Gmail: correo electrónico de Google - Mozilla Firefox




Comment 14 Mart Raudsepp gentoo-dev 2009-09-19 15:03:41 UTC
pango-1.24.2 was crashing instead of logging a critical warning (which should get fixed in the API consumer - awesome - too still) due to a packaging bug that disabled the safeguards against bad API usage. pango-1.24.4 and later packages shouldn't crash on markup_text being NULL, but log a critical warning instead, which should be fixed from awesome's end probably, but at least not crashing.
Comment 15 Alex Alexander (RETIRED) gentoo-dev 2013-02-05 23:13:01 UTC
This works OK here (with properly set locale) in latest awesome.

Please re-open if you still have issues after setting up your locale.