From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#31547: 25.3; Core dump: g_main_context_prepare() called recursively from within a source's check() or prepare() member. Date: Mon, 04 Jun 2018 19:36:52 +0200 Message-ID: <87vaay5u8b.fsf@gmail.com> References: <87zi0se1sk.fsf@ebla.i-did-not-set--mail-host-address--so-tickle-me> <83h8mzejjk.fsf@gnu.org> <87a7srh3x3.wl-marc@budabe.eu> <83wovvcdez.fsf@gnu.org> <87o9h70xg7.wl-marc@budabe.eu> <83lgcacsdk.fsf@gnu.org> <87po1fcafq.wl-marc@budabe.eu> <87o9gtf94s.wl-marc@budabe.eu> <8336y5dtwz.fsf@gnu.org> <410eadf7-3a0f-ec4b-8657-e59c3694e058@budabe.eu> <83zi0dc7qz.fsf@gnu.org> <997a15cf-3015-2929-2da4-86187eb84c74@budabe.eu> <83vaaybjy0.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1528133786 22328 195.159.176.226 (4 Jun 2018 17:36:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Jun 2018 17:36:26 +0000 (UTC) Cc: 31547@debbugs.gnu.org To: Marc Wilhelm =?UTF-8?Q?K=C3=BCster?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 04 19:36:22 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPtOv-0005O6-8h for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Jun 2018 19:36:13 +0200 Original-Received: from localhost ([::1]:41245 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPtR0-00081A-99 for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Jun 2018 13:38:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPtQj-0007yf-MA for bug-gnu-emacs@gnu.org; Mon, 04 Jun 2018 13:38:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPtQg-00084b-5U for bug-gnu-emacs@gnu.org; Mon, 04 Jun 2018 13:38:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53942) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPtQg-00084L-18 for bug-gnu-emacs@gnu.org; Mon, 04 Jun 2018 13:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fPtQf-00046M-Iq for bug-gnu-emacs@gnu.org; Mon, 04 Jun 2018 13:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Jun 2018 17:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31547 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31547-submit@debbugs.gnu.org id=B31547.152813382215693 (code B ref 31547); Mon, 04 Jun 2018 17:38:01 +0000 Original-Received: (at 31547) by debbugs.gnu.org; 4 Jun 2018 17:37:02 +0000 Original-Received: from localhost ([127.0.0.1]:33606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPtPh-000452-Vr for submit@debbugs.gnu.org; Mon, 04 Jun 2018 13:37:02 -0400 Original-Received: from mail-wr0-f180.google.com ([209.85.128.180]:38523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPtPg-00044W-9Y for 31547@debbugs.gnu.org; Mon, 04 Jun 2018 13:37:00 -0400 Original-Received: by mail-wr0-f180.google.com with SMTP id 94-v6so45013409wrf.5 for <31547@debbugs.gnu.org>; Mon, 04 Jun 2018 10:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version; bh=X9ofE0z5VGeJScFB+IZIN1Er/Dk5hjYYmnG+cRcoifA=; b=kVEQaeUrvtBHn+KqypiViFjcXO4F4rGysokdRrCjC+dT0U0j6b09dDgUrmwT6n1Gl0 TD6Tub4hgDw8nVDRkyDJZvbPjyuiuA7Q1nL6eU9QWi77jMR8DX7aH1N824Y4fPFT8SYt Mqz4IB0zlesHEWUq+54JSlw+KDVZI6bEe4dAMe2iBEh0UZbbzz+L8EwoyS9sWYLjHGBn /Bwfes0URZLyKwMX3ejIqR8BnkzFtLnZ8r4I98Ag6lGAzP/nkczILhAe3FcHJ15hvhze q+oVjObagaAt6oNhjCmou/aPQtiCk4Z+veOe/Zw5ApeyuDTgnTZvNg3qNvBGtYX9CFBD vkBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version; bh=X9ofE0z5VGeJScFB+IZIN1Er/Dk5hjYYmnG+cRcoifA=; b=e91uro/vYQnQjBV7hSTzE92E15qjAoIPfa3daXydiQlBvZ5+wSgEltzD+jAJa50YBt u5we8G94xtXvax4GO8KkVRjffIVrZ/vUAxzd95ygY4ds/UHa4vhjYPbi9sbfGkB67sCX eB/BxRMDSpJULX/pTNjYzUZsH42RnvtMCQQEjcED1tvx6373p/ny01yMDOGYt28Q/vwV TJS2TaRbahJPt3Qe2Vg9vyzlGL4s01LGnY0XwkXB8x912+Bx0zV5rjknlLDn8Vm2HzPu A8nKO2EOZ8dgO0NNE2Idw135Rwz8uWjQiIkbLs+iN/lppa5i9oQdbQlFasQeP4DeLfOU 5pBw== X-Gm-Message-State: ALKqPwcIjYUjLhPtNlKZkxfsCLEOXC7gYj2IZ/pYAqMupsluN27VDsXh UotrFqm6A+M0AdjcvfrOH1TXDYkMPV8= X-Google-Smtp-Source: ADUXVKIcmSueogvYzRLDiJch607wPkwfMwTLOElihqGeKb+C/Bm80QxJloBBGmmxj2pM1L9yctJ6cg== X-Received: by 2002:adf:96ad:: with SMTP id u42-v6mr17545699wrb.184.1528133814099; Mon, 04 Jun 2018 10:36:54 -0700 (PDT) Original-Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id 75-v6sm879747wmw.37.2018.06.04.10.36.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 10:36:52 -0700 (PDT) In-Reply-To: <83vaaybjy0.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 04 Jun 2018 19:22:31 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146968 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: > [Please keep the bug address on the CC list.] > >> From: Marc Wilhelm K=C3=BCster >> Date: Sun, 3 Jun 2018 22:40:00 +0200 >>=20 >> When running the error case in gdb the behaviour changes in that it is=20 >> now possible to open the Sent folder without crash. However, scrolling=20 >> through the folder's contents causes Emacs to freeze (not crash)=20 >> reliably. When then interrupting the process in gdb and running a=20 >> backtrace, I get the following one (I've run this test a couple of times= =20 >> with the same behaviour and substantially the same backtrace each time. >>=20 >> A possible "culprit" could be a mail with a mix of Latin and Greek=20 >> characters, but this is just a suspicion (I get a regularly mails with=20 >> both Latin and Greek characters which don't pose any problems) >>=20 >> Best regards, >>=20 >> Marc >>=20 >> (gdb) run -xrm "emacs.synchronous: true" >> Starting program: /home/mwkuster/src/emacs-26.1/src/emacs -xrm=20 >> "emacs.synchronous: true" >> [Thread debugging using libthread_db enabled] >> Using host libthread_db library "/usr/lib/libthread_db.so.1". >> [New Thread 0x7fffe7174700 (LWP 25375)] >> [New Thread 0x7fffe6506700 (LWP 25377)] >> [New Thread 0x7fffe4a51700 (LWP 25380)] >> =C2=A0=C2=A0 **** Emacs freezes while scrolling through the Folder ***** >> ^C >> Thread 1 "emacs" received signal SIGINT, Interrupt. >> 0x00007ffff0cc2ffc in pthread_cond_wait@@GLIBC_2.3.2 () from=20 >> /usr/lib/libpthread.so.0 >> (gdb) bt >> #0=C2=A0 0x00007ffff0cc2ffc in pthread_cond_wait@@GLIBC_2.3.2 () at=20 >> /usr/lib/libpthread.so.0 >> #1=C2=A0 0x00007ffff468049d in _XReply () at /usr/lib/libX11.so.6 >> #2=C2=A0 0x00007ffff467bfdd in XSync () at /usr/lib/libX11.so.6 >> #3=C2=A0 0x00007ffff467c07b in=C2=A0 () at /usr/lib/libX11.so.6 >> #4=C2=A0 0x00007ffff3dfaea8 in XftDrawDestroy () at /usr/lib/libXft.so.2 >> #5=C2=A0 0x0000000000704769 in xftfont_end_for_frame (f=3D0x1483c30=20 >> ) >> =C2=A0=C2=A0=C2=A0 at xftfont.c:686 >> #6=C2=A0 0x000000000067cd57 in font_update_drivers (f=3D0x1483c30=20 >> , new_drivers=3D...) at font.c:3540 >> #7=C2=A0 0x000000000042fba7 in delete_frame (frame=3D..., force=3D...) a= t=20 >> frame.c:2006 >> #8=C2=A0 0x0000000000557223 in x_connection_closed (dpy=3D0x2ec1590,=20 >> error_message=3D0x7ffffffefd80 "X protocol error: BadLength (poly reques= t=20 >> too large or internal Xlib length error) on protocol request 139",=20 >> ioerror=3Dfalse) at xterm.c:9795 >> #9=C2=A0 0x00000000005574a5 in x_error_quitter (display=3D0x2ec1590,=20 >> event=3D0x7ffffffeff30) >> =C2=A0=C2=A0=C2=A0 at xterm.c:9904 >> #10 0x00000000005573f0 in x_error_handler (display=3D0x2ec1590,=20 >> event=3D0x7ffffffeff30) >> =C2=A0=C2=A0=C2=A0 at xterm.c:9874 >> #11 0x00007ffff46826ed in _XError () at /usr/lib/libX11.so.6 >> #12 0x00007ffff467f617 in=C2=A0 () at /usr/lib/libX11.so.6 >> #13 0x00007ffff467f6d5 in=C2=A0 () at /usr/lib/libX11.so.6 >> #14 0x00007ffff46805e8 in _XReply () at /usr/lib/libX11.so.6 >> #15 0x00007ffff467bfdd in XSync () at /usr/lib/libX11.so.6 >> #16 0x00007ffff467c07b in=C2=A0 () at /usr/lib/libX11.so.6 >> #17 0x00007ffff400b136 in XRenderAddGlyphs () at /usr/lib/libXrender.so.1 >> #18 0x00007ffff3dff9e2 in XftFontLoadGlyphs () at /usr/lib/libXft.so.2 >> #19 0x00007ffff3dfc5b3 in XftGlyphExtents () at /usr/lib/libXft.so.2 >> #20 0x00007ffff3dfc64a in XftTextExtents8 () at /usr/lib/libXft.so.2 >> #21 0x0000000000703865 in xftfont_open (f=3D0x1483c30=20 >> , entity=3D..., pixel_size=3D16) at xftfont.c:3= 78 > > This sounds like another case of bug#30045 and bug#30874. In both > cases, there's a font that causes libXft to blow up. If that's the > same bug, it should be solved on the master branch, see the commit > mentioned in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D30874#114. > Yes. Just as a sanity check, could you do XFT_DEBUG=3D16 ./gdb and then repeat the same commands? That should give us an indication of which font XFT is trying to open. > Robert, how about backporting it to the emacs-26 branch, so that it > ends up in Emacs 26.2? Sure. Perhaps a PROBLEMS entry as well? Although if it=CA=BCs backported the problem won't arise. Marc, I=CA=BCve attached the patch here, would it be possible for you to check if it fixes your problem? Thanks Robert --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=out.patch diff --git c/src/font.c i/src/font.c index e53935a15c..305bb14576 100644 --- c/src/font.c +++ i/src/font.c @@ -5476,6 +5476,13 @@ Disabling compaction of font caches might enlarge the Emacs memory footprint in sessions that use lots of different fonts. */); inhibit_compacting_font_caches = 0; + DEFVAR_BOOL ("xft-ignore-color-fonts", + Vxft_ignore_color_fonts, + doc: /* +Non-nil means don't query fontconfig for color fonts, since they often +cause Xft crashes. Only has an effect in Xft builds. */); + Vxft_ignore_color_fonts = 1; + #ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_FREETYPE syms_of_ftfont (); diff --git c/src/ftfont.c i/src/ftfont.c index c2e093e633..8f048d2983 100644 --- c/src/ftfont.c +++ i/src/ftfont.c @@ -764,6 +764,13 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots if (scalable >= 0 && ! FcPatternAddBool (pattern, FC_SCALABLE, scalable ? FcTrue : FcFalse)) goto err; +#if defined HAVE_XFT && defined FC_COLOR + /* We really don't like color fonts, they cause Xft crashes. See + Bug#30874. */ + if (Vxft_ignore_color_fonts + && ! FcPatternAddBool (pattern, FC_COLOR, FcFalse)) + goto err; +#endif goto finish; --=-=-=--