From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#29031: 25.3; Segmentation fault when starting emacs with my config Date: Mon, 30 Oct 2017 16:03:43 +0000 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f4030437f31006fe6d055cc5c91b" X-Trace: blaine.gmane.org 1509379681 26707 195.159.176.226 (30 Oct 2017 16:08:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Oct 2017 16:08:01 +0000 (UTC) To: 29031@debbugs.gnu.org, Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 30 17:07:49 2017 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 1e9CbF-00059d-F8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Oct 2017 17:07:41 +0100 Original-Received: from localhost ([::1]:41471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9CbM-0007iP-JY for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Oct 2017 12:07:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9CYk-0005xk-9R for bug-gnu-emacs@gnu.org; Mon, 30 Oct 2017 12:05:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9CYh-00065J-0S for bug-gnu-emacs@gnu.org; Mon, 30 Oct 2017 12:05:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33738) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9CYg-00065B-Sy for bug-gnu-emacs@gnu.org; Mon, 30 Oct 2017 12:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e9CYg-0005GJ-J8 for bug-gnu-emacs@gnu.org; Mon, 30 Oct 2017 12:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Oct 2017 16:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29031 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29031-submit@debbugs.gnu.org id=B29031.150937944420148 (code B ref 29031); Mon, 30 Oct 2017 16:05:02 +0000 Original-Received: (at 29031) by debbugs.gnu.org; 30 Oct 2017 16:04:04 +0000 Original-Received: from localhost ([127.0.0.1]:42419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9CXi-0005Eo-Hy for submit@debbugs.gnu.org; Mon, 30 Oct 2017 12:04:03 -0400 Original-Received: from mail-yw0-f179.google.com ([209.85.161.179]:52376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9CXg-0005EJ-MJ for 29031@debbugs.gnu.org; Mon, 30 Oct 2017 12:04:01 -0400 Original-Received: by mail-yw0-f179.google.com with SMTP id w2so11996578ywa.9 for <29031@debbugs.gnu.org>; Mon, 30 Oct 2017 09:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=exlWNouz+lTDs4xKiV+B6jSB5JiIEvBg9s3SD1xctd4=; b=Pnnk64OuM3xussXdN9yp8U+VexcEfPAXvFPlTqVKTTb18C0o1GLC9mfndPSdDHJ7RB mzZjCR5mgLUKLvX5ImIE/fRM6cC4YNZ0oGbiKGlHroAJE3EUVYvLsrtR1wLNwpouJI0y EeJlwfL0eBe9j5VIWrPzhod1bIFirJljPHW85zAoZbnBd+46NA8qDJv/CVcxHDjckeCq QMse+2njVvBs1MxNrHIeXbd/lsh4M+AjWOHDraXlVjHV3DWT5PDBLVk+I2FYdNsqYN+P ovjc/XU3+r3Nz/i/OKAnurr8+eHz34IiqfjP0xUciLNhMkiF4E+8Swgktt9qnGOorG8K aVBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=exlWNouz+lTDs4xKiV+B6jSB5JiIEvBg9s3SD1xctd4=; b=afQ2NPK0yORKvyvq4kfrYQ7dQs7y3HuHGSwhAzzWcflQz0pPnSSpGhc6jCOSn0cg1A QPK7X8AnZ6Drx8OBArHfLaySK59mTx3FIYrsTyYYZqtk0POUnFJxGGatFfjMcAbdmQx/ zrbF16ro61MPtlfNey6RMDv2gnGbmAGT/RlR6V0YJPsIX+ftgjXveUs1zErcADfy6rrV 48tznRLXYKmmzjAHrkHkk/YROOZfkgWe8Ec/Oma2NkIHwfmNmO8mkJ/vH+uIu3PI6iYD DisYNS6X8s6iVwKsSQAZgAsw8rBI5cMxjqP9/bAZS69Q4hn/Si7pN2aQ0XGZN47sSg7M WFoA== X-Gm-Message-State: AMCzsaU0Kno87z4BOnIdYJTt6rt80LZh4VBCZeDbvjJNaTZG/0ghU/C6 PdEXlxozFU8a01DZ4ZrFoLddwMMju7x2xrMVV1Q= X-Google-Smtp-Source: ABhQp+SSp/LH9D4L0vkHzgVJwXhuLY+S8+z4I1OjMucLkiGpi+feJ/7i0W/+HUzSbWSs/UzIs73bmeq9GsJ0yfo85GY= X-Received: by 10.37.139.8 with SMTP id i8mr6183375ybl.389.1509379434542; Mon, 30 Oct 2017 09:03:54 -0700 (PDT) In-Reply-To: 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:139184 Archived-At: --f4030437f31006fe6d055cc5c91b Content-Type: text/plain; charset="UTF-8" Hello all, I cannot understand why, but reverting nlinum to version 1.7 fixed this. stable nlinum version for me: http://git.savannah.gnu.org/cgit/emacs/elpa.git/commit/?id=e885224c70f5fc03b23590304dd0fd21524d27e1 Also I couldn't figure out how to reproduce this issue on emacs -Q. But here are some observations (on emacs 25.3): - I started this bug saying that I can reproduce this crash only on the company CAD built emacs 25.3. But turns out that the crash happens on my build of emacs-25 branch that I had done a long time back, only when running emacs, not emacsclient. - Crash happened only when I loaded nlinum (not linum) AND had my config call the below modi/blend-linum function in wrapper function in window-setup-hook. - Couldn't recreate crash if I commented out the lines calling that function, *or* the lines loading nlinum in my config. - Even if I commented out the call to modi/blend-linum, emacs 25.3 does not crash, but the line numbers look BAD (see this gifv to see what I mean: https://i.imgur.com/8npahiz.gifv). That is with current line number highlight enabled in nlinum. - The crash AND visual artifact issue went away on reverted to nlinum 1.7 without having to comment out the call to modi/blend-linum, on emacs 25.3. ===== (defun modi/blend-linum () "Set the linum foreground face to that of `font-lock-comment-face' and background color to that of the theme." (interactive) (set-face-attribute 'linum nil :height 0.9 :foreground (if (string= (face-foreground 'font-lock-comment-face) "unspecified-fg") "#8f8f8f" (face-foreground 'font-lock-comment-face)) :background (if (string= (face-background 'default) "unspecified-bg") "#282828" (face-background 'default)))) ===== **I couldn't reproduce the visual artifact issues or crash on emacs 26.x+.** Appendix: I generate my theme-loading function 'load-theme/smyx' (that loads my custom theme smyx). That is the wrapper fn I referred above, that's called in window-setup-hook. That wrapper fn calls modi/blend-linum. Relevant part from my config[1]. [1]: https://github.com/kaushalmodi/.emacs.d/blob/1e37e3502ed1337420d7fb0db7f940c52694bdca/setup-files/setup-visual.el#L157-L221 On Mon, Oct 30, 2017 at 10:17 AM Kaushal Modi wrote: > The CAD department built 25.3 again, this time, with libotf. But I still > get the segmentation fault. See the backtrace below. The backtrace looks > different this time though.. "xdisp.c: No such file or directory"!? > > Emacs version: GNU Emacs 25.3.1 (x86_64-unknown-linux-gnu, GTK+ Version > 2.24.23) > of 2017-10-30, built using commit . > > ./configure options: > --prefix=/cad/adi/apps/gnu/linux/x86_64/6/local/emacs/25.3 --with-modules > > Features: > XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GCONF NOTIFY ACL LIBSELINUX GNUTLS > LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 MODULES > > > ===== > > Starting program: > /cad/adi/apps/gnu/linux/x86_64/6/local/emacs/25.3/bin/emacs > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib64/libthread_db.so.1". > [New Thread 0x7fffef071700 (LWP 10664)] > > Thread 1 "emacs" received signal SIGSEGV, Segmentation fault. > 0x000000000043d101 in append_glyph (it=0x7fffffff2390) at xdisp.c:25880 > 25880 xdisp.c: No such file or directory. > (gdb) bt > #0 0x000000000043d101 in append_glyph (it=0x7fffffff2390) at xdisp.c:25880 > #1 x_produce_glyphs (it=0x7fffffff2390) at xdisp.c:27175 > #2 0x0000000000452032 in display_line (it=0x7fffffff2390) at xdisp.c:20676 > #3 0x0000000000457868 in try_window (window=18793157, pos=..., flags=1) > at xdisp.c:17251 > #4 0x0000000000460e41 in redisplay_window (window=18793157, > just_this_one_p=false) > at xdisp.c:16700 > #5 0x0000000000463b36 in redisplay_window_0 (window=) at > xdisp.c:14491 > #6 0x000000000055e7c6 in internal_condition_case_1 (bfun=0x463b10 > , > arg=18793157, handlers=, hfun=0x429b40 > ) > at eval.c:1339 > #7 0x000000000044612e in redisplay_windows (window=) at > xdisp.c:14471 > #8 0x000000000045cfd5 in redisplay_internal () at xdisp.c:14031 > #9 0x00000000004f5299 in read_char (commandflag=1, map=109811619, > prev_event=0, > used_mouse_menu=0x7fffffffb11f, end_time=0x0) at keyboard.c:2482 > #10 0x00000000004f90c0 in read_key_sequence (keybuf=0x7fffffffb190, > prompt=0, > dont_downcase_last=false, can_return_switch_frame=true, > fix_current_buffer=true, > prevent_redisplay=false, bufsize=30) at keyboard.c:9068 > #11 0x00000000004fa3ba in command_loop_1 () at keyboard.c:1370 > #12 0x000000000055e82a in internal_condition_case (bfun=0x4fa1f0 > , > handlers=, hfun=0x4f8200 ) at eval.c:1315 > #13 0x00000000004f81ec in command_loop_2 (ignore=) at > keyboard.c:1112 > #14 0x000000000055e8b8 in internal_catch (tag=, > func=0x4f81d0 , arg=0) at eval.c:1080 > #15 0x00000000004f7f67 in command_loop () at keyboard.c:1091 > #16 0x00000000004f7ff5 in recursive_edit_1 () at keyboard.c:697 > #17 0x00000000004f8135 in Frecursive_edit () at keyboard.c:768 > #18 0x00000000004e997e in main (argc=, argv= out>) at emacs.c:1629 > > -- > > Kaushal Modi > -- Kaushal Modi --f4030437f31006fe6d055cc5c91b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello all,

I cannot understand why, but= reverting nlinum to version 1.7 fixed this.


Also I couldn't figur= e out how to reproduce this issue on emacs -Q. But here are some observatio= ns (on emacs 25.3):

- I started this bug saying th= at I can reproduce this crash only on the company CAD built emacs 25.3. But= turns out that the crash happens on my build of emacs-25 branch that I had= done a long time back, only when running emacs, not emacsclient.

- Crash happened only when I loaded nlinum (not linum) AND = had my config call the below modi/blend-linum function in wrapper function = in window-setup-hook.
- Couldn't recreate crash if I commente= d out the lines calling that function, *or* the lines loading nlinum in my = config.
- Even if I commented out the call to modi/blend-linum, e= macs 25.3 does not crash, but the line numbers look BAD (see this gifv to s= ee what I mean:=C2=A0https://i= .imgur.com/8npahiz.gifv). That is with current line number highlight en= abled in nlinum.
- The crash AND visual artifact issue went away = on reverted to nlinum 1.7 without having to comment out the call to modi/bl= end-linum, on emacs 25.3.

=3D=3D=3D=3D=3D
(defun modi/blend-linum ()
=C2=A0 "Set the linum fore= ground face to that of
`font-lock-comment-face' and backgroun= d color to that of the
theme."
=C2=A0 (interactive= )
=C2=A0 (set-face-attribute
=C2=A0 =C2=A0'linum ni= l
=C2=A0 =C2=A0:height 0.9
=C2=A0 =C2=A0:foreground (if= (string=3D (face-foreground 'font-lock-comment-face) "unspecified= -fg")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0"#8f8f8f"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(face-foreground 'font-lock-comment-f= ace))
=C2=A0 =C2=A0:background (if (string=3D (face-background &#= 39;default) "unspecified-bg")
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"#282828"
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(face-backgro= und 'default))))
=3D=3D=3D=3D=3D

**I couldn't reproduce the visual artifact issues or crash on emacs = 26.x+.**

Appendix: I generate my theme-loading fun= ction 'load-theme/smyx' (that loads my custom theme smyx). That is = the wrapper fn I referred above, that's called in window-setup-hook. Th= at wrapper fn calls modi/blend-linum. Relevant part from my config[1].

=



On Mon, Oct 30, 2017 at 10:17 AM Kaushal Modi <kaushal.modi@gmail.com> wrote:
The CAD department built= 25.3 again, this time, with libotf. But I still get the segmentation fault= . See the backtrace below. The backtrace looks different this time though..= "xdisp.c: No such file or directory"!?

= Emacs version: GNU Emacs 25.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.2= 4.23)
=C2=A0of 2017-10-30, built using commit .

./configure options:
=C2=A0 --prefix=3D/cad/adi/apps/gnu/= linux/x86_64/6/local/emacs/25.3 --with-modules

Fea= tures:
=C2=A0 XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GCONF NOTIFY = ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS = GTK2 X11 MODULES


=3D=3D=3D=3D=3D

Starting program: /cad/adi/apps/gnu/linux/x86_6= 4/6/local/emacs/25.3/bin/emacs
[Thread debugging using libthread_= db enabled]
Using host libthread_db library "/lib64/libthrea= d_db.so.1".
[New Thread 0x7fffef071700 (LWP 10664)]

Thread 1 "emacs" received signal SIGSEGV, Segmen= tation fault.
0x000000000043d101 in append_glyph (it=3D0x7fffffff= 2390) at xdisp.c:25880
25880=C2=A0 =C2=A0xdisp.c: No such file or= directory.
(gdb) bt
#0=C2=A0 0x000000000043d101 in app= end_glyph (it=3D0x7fffffff2390) at xdisp.c:25880
#1=C2=A0 x_produ= ce_glyphs (it=3D0x7fffffff2390) at xdisp.c:27175
#2=C2=A0 0x00000= 00000452032 in display_line (it=3D0x7fffffff2390) at xdisp.c:20676
#3=C2=A0 0x0000000000457868 in try_window (window=3D18793157, pos=3D..., = flags=3D1) at xdisp.c:17251
#4=C2=A0 0x0000000000460e41 in redisp= lay_window (window=3D18793157, just_this_one_p=3Dfalse)
=C2=A0 = =C2=A0 at xdisp.c:16700
#5=C2=A0 0x0000000000463b36 in redisplay_= window_0 (window=3D<optimized out>) at xdisp.c:14491
#6=C2= =A0 0x000000000055e7c6 in internal_condition_case_1 (bfun=3D0x463b10 <re= display_window_0>,
=C2=A0 =C2=A0 arg=3D18793157, handlers=3D&l= t;optimized out>, hfun=3D0x429b40 <redisplay_window_error>)
<= div>=C2=A0 =C2=A0 at eval.c:1339
#7=C2=A0 0x000000000044612e in r= edisplay_windows (window=3D<optimized out>) at xdisp.c:14471
#8=C2=A0 0x000000000045cfd5 in redisplay_internal () at xdisp.c:14031
#9=C2=A0 0x00000000004f5299 in read_char (commandflag=3D1, map=3D109= 811619, prev_event=3D0,
=C2=A0 =C2=A0 used_mouse_menu=3D0x7ffffff= fb11f, end_time=3D0x0) at keyboard.c:2482
#10 0x00000000004f90c0 = in read_key_sequence (keybuf=3D0x7fffffffb190, prompt=3D0,
=C2=A0= =C2=A0 dont_downcase_last=3Dfalse, can_return_switch_frame=3Dtrue, fix_cur= rent_buffer=3Dtrue,
=C2=A0 =C2=A0 prevent_redisplay=3Dfalse, bufs= ize=3D30) at keyboard.c:9068
#11 0x00000000004fa3ba in command_lo= op_1 () at keyboard.c:1370
#12 0x000000000055e82a in internal_con= dition_case (bfun=3D0x4fa1f0 <command_loop_1>,
=C2=A0 =C2= =A0 handlers=3D<optimized out>, hfun=3D0x4f8200 <cmd_error>) at= eval.c:1315
#13 0x00000000004f81ec in command_loop_2 (ignore=3D&= lt;optimized out>) at keyboard.c:1112
#14 0x000000000055e8b8 i= n internal_catch (tag=3D<optimized out>,
=C2=A0 =C2=A0 func= =3D0x4f81d0 <command_loop_2>, arg=3D0) at eval.c:1080
#15 0= x00000000004f7f67 in command_loop () at keyboard.c:1091
#16 0x000= 00000004f7ff5 in recursive_edit_1 () at keyboard.c:697
#17 0x0000= 0000004f8135 in Frecursive_edit () at keyboard.c:768
#18 0x000000= 00004e997e in main (argc=3D<optimized out>, argv=3D<optimized out&= gt;) at emacs.c:1629

--

Kaushal Modi

--

Ka= ushal Modi

--f4030437f31006fe6d055cc5c91b--