[Bug 1191517] New: emacs-gtk crashes on mouse selection due to XLIB_SKIP_ARGB_VISUALS=1 in /usr/bin/emacs
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 Bug ID: 1191517 Summary: emacs-gtk crashes on mouse selection due to XLIB_SKIP_ARGB_VISUALS=1 in /usr/bin/emacs Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: X11 Applications Assignee: screening-team-bugs@suse.de Reporter: pujos.michael@gmail.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Start /usr/bin/emacs so it launches emacs-gtk. Use mouse selection and notice that emacs insta-crashes. AFAIK this is new since TW 20211005. After a few WTFs since starting emacs-gtk did not crash, I traced it down to the /usr/bin/emacs wrapper shell script setting XLIB_SKIP_ARGB_VISUALS=1, which is the cause the crash, which can then be reproduced with: XLIB_SKIP_ARGB_VISUALS=1 emacs-gtk (and select some text with the mouse). So the fix would be to remove that XLIB_SKIP_ARGB_VISUALS=1 line in /usr/bin/emacs, assuming it is not needed anymore. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c1 --- Comment #1 from Michael Pujos <pujos.michael@gmail.com> --- For completeness, it crashes in XVisualIDFromVisual(): /lib64/libc.so.6(+0x427a0)[0x7f52513587a0] /lib64/libX11.so.6(XVisualIDFromVisual+0x0)[0x7f5256eb5440] /lib64/libgdk-3.so.0(gdk_x11_window_foreign_new_for_display+0x18e)[0x7f5257672dde] -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c2 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.wilck@suse.com, | |mgorse@suse.com Flags| |needinfo? --- Comment #2 from Dr. Werner Fink <werner@suse.com> --- (In reply to Michael Pujos from comment #0)
Start /usr/bin/emacs so it launches emacs-gtk. Use mouse selection and notice that emacs insta-crashes. AFAIK this is new since TW 20211005.
After a few WTFs since starting emacs-gtk did not crash, I traced it down to the /usr/bin/emacs wrapper shell script setting XLIB_SKIP_ARGB_VISUALS=1, which is the cause the crash, which can then be reproduced with:
XLIB_SKIP_ARGB_VISUALS=1 emacs-gtk (and select some text with the mouse).
So the fix would be to remove that XLIB_SKIP_ARGB_VISUALS=1 line in /usr/bin/emacs, assuming it is not needed anymore.
The only problem is that I had already skipped this line and then catched an other error report which caused me to readd this line again ... I'd like to see a real solution instead removing/readding a workaround. What goes wrong here? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.opensuse.o | |rg/show_bug.cgi?id=1186341 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c3 --- Comment #3 from Michael Pujos <pujos.michael@gmail.com> --- Yup, I saw your commits removing it then re-adding it later. I suppose that you re-added it to workaround another emacs issue ? I also verified that this crash only happens with the NVIDIA proprietary driver (actually: modesetting + nvidia on my Optimus laptop). No crash if only the modesetting (or intel) Xorg driver is loaded. Still, it would be great to not require XLIB_SKIP_ARGB_VISUALS=1 to workaround that other emacs issue, as after all, you can also start emacs directly with emacs-gtk, and it should not require any obscure XLIB (or is it GTK ?) evironment variable to work properly. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c4 --- Comment #4 from Michael Pujos <pujos.michael@gmail.com> --- To conclude, current emacs crashes when: - using the NVIDIA driver. - started with the emacs shell script (and emacs-gtk is started), - selecting text, with the mouse or keyboard This situation cannot be left this way and a solution (or workaround) must be found). Even if it can be trivially fixed by users, starting directly emacs-gtk or commenting XLIB_SKIP_ARGB_VISUALS=1 in /usr/bin/emacs. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 Bj�rn Voigt <bjoernv@arcor.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bjoernv@arcor.de -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 Michael Pujos <pujos.michael@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|emacs-gtk crashes on mouse |emacs-gtk crashes on mouse |selection due to |selection due to |XLIB_SKIP_ARGB_VISUALS=1 in |XLIB_SKIP_ARGB_VISUALS=1 in |/usr/bin/emacs |/usr/bin/emacs [NVIDIA | |driver only] -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c5 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sndirsch@suse.com --- Comment #5 from Dr. Werner Fink <werner@suse.com> --- I'd like to know which of the various widget styles of gtk you are using (like Breeze, Fusion, ... own configurations/combinations) I'm currently playing around with the next upcomming GNU Emacs 28(.0.60) maybe it would be an option to try this one ... but my guess is that one of the deeper gtk/gdk libraries shows this crash in combination with the vendor neutral dispatch openGL layer libraries cause this crash (as those GL libs switch over to the NVIDIA GL layer) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c6 --- Comment #6 from Stefan Dirsch <sndirsch@suse.com> --- The best documentation I could find about XLIB_SKIP_ARGB_VISUALS setting was on http://www.hyperproc.com/hwhelp/2020/topics/getting_started/xlib_skip_argb_v... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c7 --- Comment #7 from Stefan Dirsch <sndirsch@suse.com> --- It's also mentioned in NVIDIA driver documentation Chapter 11. Specifying OpenGL Environment Variable Settings [...] 11G. CONTROLLING WHICH OPENGL FBCONFIGS ARE AVAILABLE The NVIDIA GLX implementation will hide FBConfigs that are associated with a 32-bit ARGB visual when the XLIB_SKIP_ARGB_VISUALS environment variable is defined. This matches the behavior of libX11, which will hide those visuals from XGetVisualInfo and XMatchVisualInfo. This environment variable is useful when applications are confused by the presence of these FBConfigs. [...] -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c7 --- Comment #7 from Stefan Dirsch <sndirsch@suse.com> --- It's also mentioned in NVIDIA driver documentation Chapter 11. Specifying OpenGL Environment Variable Settings [...] 11G. CONTROLLING WHICH OPENGL FBCONFIGS ARE AVAILABLE The NVIDIA GLX implementation will hide FBConfigs that are associated with a 32-bit ARGB visual when the XLIB_SKIP_ARGB_VISUALS environment variable is defined. This matches the behavior of libX11, which will hide those visuals from XGetVisualInfo and XMatchVisualInfo. This environment variable is useful when applications are confused by the presence of these FBConfigs. [...] --- Comment #8 from Stefan Dirsch <sndirsch@suse.com> --- It's also mentioned in NVIDIA driver documentation Chapter 11. Specifying OpenGL Environment Variable Settings [...] 11G. CONTROLLING WHICH OPENGL FBCONFIGS ARE AVAILABLE The NVIDIA GLX implementation will hide FBConfigs that are associated with a 32-bit ARGB visual when the XLIB_SKIP_ARGB_VISUALS environment variable is defined. This matches the behavior of libX11, which will hide those visuals from XGetVisualInfo and XMatchVisualInfo. This environment variable is useful when applications are confused by the presence of these FBConfigs. [...] -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c9 --- Comment #9 from Stefan Dirsch <sndirsch@suse.com> --- Related: boo#1186341 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c10 --- Comment #10 from Stefan Dirsch <sndirsch@suse.com> --- Also there is in NVIDIA's README [...] Option "AddARGBGLXVisuals" "boolean" Adds a 32-bit ARGB visual for each supported OpenGL configuration. This allows applications to use OpenGL to render with alpha transparency into 32-bit windows and pixmaps. This option requires the Composite extension. Default: ARGB GLX visuals are enabled on X servers new enough to support them when the Composite extension is also enabled and the screen depth is 24 or 30. [...] Chapter 23. Using the X Composite Extension ______________________________________________________________________________ X.Org X servers support an X protocol extension called Composite. This extension allows windows to be drawn into pixmaps instead of directly onto the screen. In conjunction with the Damage and Render extensions, this allows a program called a composite manager to blend windows together to draw the screen. Performance will be degraded significantly if the "RenderAccel" option is disabled in xorg.conf. See Appendix B for more details. When the NVIDIA X driver is used and the Composite extension is enabled, NVIDIA's OpenGL implementation interacts properly with the Damage and Composite X extensions. This means that OpenGL rendering is drawn into offscreen pixmaps and the X server is notified of the Damage event when OpenGL renders to the pixmap. This allows OpenGL applications to behave properly in a composited X desktop. If the Composite extension is enabled on an X server older than X11R6.9.0, then GLX will be disabled. You can force GLX on while Composite is enabled on pre-X11R6.9.0 X servers with the "AllowGLXWithComposite" X configuration option. However, GLX will not render correctly in this environment. Upgrading your X server to X11R6.9.0 or newer is recommended. You can enable the Composite X extension by running 'nvidia-xconfig --composite'. Composite can be disabled with 'nvidia-xconfig --no-composite'. See the nvidia-xconfig(1) man page for details. If you are using an OpenGL-based composite manager, you may also need the "DisableGLXRootClipping" option to obtain proper output. The Composite extension also causes problems with other driver components: o Xv adaptors will ignore the sync-to-vblank option when drawing into a redirected window. o Workstation overlays are incompatible with Composite. Workstation overlays will be automatically disabled when Composite is detected. o The NVIDIA Linux driver supports quad-buffered stereo together with Composite. However, many composite managers will only texture from and display the left eye content, effectively disabling the stereo effect. Workarounds for this problem are either to use a different composite manager that supports stereo or disable the Composite extension. o The Composite extension is incompatible with Xinerama in X.Org X servers prior to version 1.10. Composite will be automatically disabled when Xinerama is enabled on those servers. o Prior to X.Org X server version 1.15, the Damage extension does not properly report rendering events on all physical X screens in Xinerama configurations. This prevents most composite mangers from rendering correctly. This NVIDIA Linux driver supports OpenGL rendering to 32-bit ARGB windows. 32-bit visuals are only available on screens with depths 24 or 30. If you are an application developer, you can use these new visuals in conjunction with a composite manager to create translucent OpenGL applications: int attrib[] = { GLX_RENDER_TYPE, GLX_RGBA_BIT, GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_ALPHA_SIZE, 1, GLX_DOUBLEBUFFER, True, GLX_DEPTH_SIZE, 1, None }; GLXFBConfig *fbconfigs, fbconfig; int numfbconfigs, render_event_base, render_error_base; XVisualInfo *visinfo; XRenderPictFormat *pictFormat; /* Make sure we have the RENDER extension */ if(!XRenderQueryExtension(dpy, &render_event_base, &render_error_base)) { fprintf(stderr, "No RENDER extension found\n"); exit(EXIT_FAILURE); } /* Get the list of FBConfigs that match our criteria */ fbconfigs = glXChooseFBConfig(dpy, scrnum, attrib, &numfbconfigs); if (!fbconfigs) { /* None matched */ exit(EXIT_FAILURE); } /* Find an FBConfig with a visual that has a RENDER picture format that * has alpha */ for (i = 0; i < numfbconfigs; i++) { visinfo = glXGetVisualFromFBConfig(dpy, fbconfigs[i]); if (!visinfo) continue; pictFormat = XRenderFindVisualFormat(dpy, visinfo->visual); if (!pictFormat) continue; if(pictFormat->direct.alphaMask > 0) { fbconfig = fbconfigs[i]; break; } XFree(visinfo); } if (i == numfbconfigs) { /* None of the FBConfigs have alpha. Use a normal (opaque) * FBConfig instead */ fbconfig = fbconfigs[0]; visinfo = glXGetVisualFromFBConfig(dpy, fbconfig); pictFormat = XRenderFindVisualFormat(dpy, visinfo->visual); } XFree(fbconfigs); When rendering to a 32-bit window, keep in mind that the X RENDER extension, used by most composite managers, expects "premultiplied alpha" colors. This means that if your color has components (r,g,b) and alpha value a, then you must render (a*r, a*g, a*b, a) into the target window. More information about Composite can be found at http://freedesktop.org/Software/CompositeExt -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c11 --- Comment #11 from Dr. Werner Fink <werner@suse.com> --- (In reply to Stefan Dirsch from comment #10)
X.Org X servers support an X protocol extension called Composite. This extension allows windows to be drawn into pixmaps instead of directly onto the screen. In conjunction with the Damage and Render extensions, this allows a program called a composite manager to blend windows together to draw the screen.
Performance will be degraded significantly if the "RenderAccel" option is disabled in xorg.conf. See Appendix B for more details.
Nevertheless it would help a lot if the reported crash in XVisualIDFromVisual() could be avoided. (In reply to Michael Pujos from comment #1)
For completeness, it crashes in XVisualIDFromVisual():
/lib64/libc.so.6(+0x427a0)[0x7f52513587a0] /lib64/libX11.so.6(XVisualIDFromVisual+0x0)[0x7f5256eb5440] /lib64/libgdk-3.so. 0(gdk_x11_window_foreign_new_for_display+0x18e)[0x7f5257672dde]
Please can you install libX11-6-debuginfo as well as libX11-debugsource to list the function XVisualIDFromVisual() within gdb -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c12 --- Comment #12 from Stefan Dirsch <sndirsch@suse.com> --- JFYI, I cannot reproduce this with current TW from today on an Optimus machine with nvidia driver in place and suse-prime in "nvidia" mode. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c13 --- Comment #13 from Dr. Werner Fink <werner@suse.com> --- I've looked into the sources of libX11 ... I found in src/OpenDis.c within function XOpenDisplay(register _Xconst char *display) if (dp->nvisuals > 0) { dp->visuals = Xcalloc(dp->nvisuals, sizeof(Visual)); if (dp->visuals == NULL) { OutOfMemory (dpy); return(NULL); } [... shorten ...] if (dp->depth == 32 && getenv ("XLIB_SKIP_ARGB_VISUALS")) { Xfree (dp->visuals); dp->visuals = NULL; dp->nvisuals = 0; } } else { dp->visuals = (Visual *) NULL; } and in src/Misc.c for function VisualID XVisualIDFromVisual(Visual *visual) VisualID XVisualIDFromVisual(Visual *visual) { return visual->visualid; } ... guess if *visual address is NULL then the crash must happen here ... as gtk libraries do call e.g. glx_pixmap_get(), find_fbconfig_for_visual(), and gdk_x11_window_foreign_new_for_display() the function XVisualIDFromVisual() without checking the *visual address for != NULL This does not look like a bug in emacs -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c14 --- Comment #14 from Dr. Werner Fink <werner@suse.com> --- (In reply to Stefan Dirsch from comment #12)
JFYI, I cannot reproduce this with current TW from today on an Optimus machine with nvidia driver in place and suse-prime in "nvidia" mode.
Hmmm ... I also had seen this on Leap 15.2 with Nvidia ... nevertheless if in XVisualIDFromVisual() the *visual address is NULL it should not be used but a default NULL visual returned (how ever this may look like) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c15 --- Comment #15 from Stefan Dirsch <sndirsch@suse.com> --- (In reply to Dr. Werner Fink from comment #13)
I've looked into the sources of libX11 ... I found in src/OpenDis.c within function XOpenDisplay(register _Xconst char *display)
if (dp->nvisuals > 0) { dp->visuals = Xcalloc(dp->nvisuals, sizeof(Visual)); if (dp->visuals == NULL) { OutOfMemory (dpy); return(NULL); } [... shorten ...] if (dp->depth == 32 && getenv ("XLIB_SKIP_ARGB_VISUALS")) { Xfree (dp->visuals); dp->visuals = NULL; dp->nvisuals = 0; } } else { dp->visuals = (Visual *) NULL; }
and in src/Misc.c for function VisualID XVisualIDFromVisual(Visual *visual)
VisualID XVisualIDFromVisual(Visual *visual) { return visual->visualid; }
... guess if *visual address is NULL then the crash must happen here ... as gtk libraries do call e.g. glx_pixmap_get(), find_fbconfig_for_visual(), and gdk_x11_window_foreign_new_for_display() the function XVisualIDFromVisual() without checking the *visual address for != NULL
This does not look like a bug in emacs
Ok. In that case we should reassign this ticket to GNOME component (for libgtk issues), right? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c16 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |werner@suse.com --- Comment #16 from Dr. Werner Fink <werner@suse.com> --- (In reply to Stefan Dirsch from comment #15)
Ok. In that case we should reassign this ticket to GNOME component (for libgtk issues), right?
That is the one method ... the other would be VisualID XVisualIDFromVisual(Visual *visual) { if (!visual) return (VisualID)0; return visual->visualid; } or is this not correct? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c17 --- Comment #17 from Stefan Dirsch <sndirsch@suse.com> --- Ok. Then I misunderstood. I thought it would crash in gdk_x11_window_foreign_new_for_display() instead. Not sure what gdk_x11_window_foreign_new_for_display() will do when it gets a 0 as VisualID though. I would expect then we'll see the next crash or breakage soon after ... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c18 --- Comment #18 from Dr. Werner Fink <werner@suse.com> --- Hmmm ... why does XOpenDisplay() remove the visuals for 32bit depth and XLIB_SKIP_ARGB_VISUALS set? And what should be the replacement? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c19 --- Comment #19 from Stefan Dirsch <sndirsch@suse.com> --- How should I know. All I know is the git commit. commit d558a53a6f57eecfcaadce5141fe3a08860defcb (tag: XORG-6_7_99_902) Author: Keith Packard <keithp@keithp.com> Date: Sat Aug 14 07:12:36 2004 +0000 Use XLIB_SKIP_ARGB_VISUALS environment variable to disable all depth 32 visuals. Necessary to keep Flash from crashing. Must call ValidateGC/ValidatePicture on "real" GC/Picture to ensure pCompositeClip is set correctly. Need to take the composite clip from the "real" GC/Picture and turn it into the clientClip for the backing version. Adjust pixmap screen origin to account for drawable->x/y Change debugging output a bit (disabled by default) diff --git a/src/OpenDis.c b/src/OpenDis.c index f9a148d7..78d56f65 100644 --- a/src/OpenDis.c +++ b/src/OpenDis.c @@ -570,6 +570,12 @@ XOpenDisplay ( u.vp = (xVisualType *) (((char *) u.vp) + sz_xVisualType); } + if (dp->depth == 32 && getenv ("XLIB_SKIP_ARGB_VISUALS")) + { + Xfree (dp->visuals); + dp->visuals = NULL; + dp->nvisuals = 0; + } } else { dp->visuals = (Visual *) NULL; } -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c20 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gnome-bugs@suse.de --- Comment #20 from Dr. Werner Fink <werner@suse.com> --- (In reply to Stefan Dirsch from comment #19)
How should I know. All I know is the git commit.
commit d558a53a6f57eecfcaadce5141fe3a08860defcb (tag: XORG-6_7_99_902) Author: Keith Packard <keithp@keithp.com> Date: Sat Aug 14 07:12:36 2004 +0000
Use XLIB_SKIP_ARGB_VISUALS environment variable to disable all depth 32 visuals. Necessary to keep Flash from crashing. Must call ValidateGC/ValidatePicture on "real" GC/Picture to ensure
Ohmmm ... Flash? ... Adobe Flash? I guess this is gone now but maybe other video players do have similar problems -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c21 --- Comment #21 from Stefan Dirsch <sndirsch@suse.com> --- Flash in 2004. Could be, yes. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c22 --- Comment #22 from Michael Pujos <pujos.michael@gmail.com> --- Sorry for the late reply, I was away from computers for a few days. After updating to latest TW (20211016), I cannot reproduce this crash anymore. A real mystery. Unfortunately, I do not have the coredump anymore for a better stack trace. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c24 --- Comment #24 from Michael Pujos <pujos.michael@gmail.com> --- Now that my PC has been used for a few hours, it crashes again ! Stack trace with filenames and line numbers this time: #8 0x00007f2348bca7a0 in <signal handler called> () at /lib64/libc.so.6 #9 XVisualIDFromVisual (visual=0x0) at /usr/src/debug/libX11-1.7.2-1.2.x86_64/src/Misc.c:60 #10 0x00007f234eee4dde in gdk_x11_window_foreign_new_for_display (display=0x27d20e0 [GdkX11Display], window=33554434) at x11/gdkwindow-x11.c:1270 #11 0x00007f234eed0068 in gdk_x11_display_translate_event (translator=<optimized out>, display=0x27d20e0 [GdkX11Display], event=0x27e99e0, xevent=0x7fff457b1900) at x11/gdkdisplay-x11.c:1116 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c25 --- Comment #25 from Dr. Werner Fink <werner@suse.com> --- I'm using in a /etc/X11/xorg.conf.d/99-local.conf the subsection SubSection "Display" Depth 24 Virtual 1920 1080 ViewPort 0 0 Modes "1920x1080_60" "1920x1080" "nvidia-auto-select" EndSubSection within my "Screen" sections for NVIDIA as well as for Intel GPU ... if you're doing that you might change to the correct resoluton of your monitor This avoids the depth 32 I guess and hence the visual address gets not freed and NULLed anymore -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c27 --- Comment #27 from Michael Pujos <pujos.michael@gmail.com> --- I will try the SubSection thing, but it cannot be a proper fix. Again, if the goal is to only workaround this issue, it is easy: I can either comment XLIB_SKIP_ARGB_VISUALS=1 in /usr/bin/emacs, or directly start emacs-gtk. My question is why XLIB_SKIP_ARGB_VISUALS=1 is needed in the first place? Do any other distro use it for launching emacs ? Why was it removed at some point then put back again in /usr/bin/emacs ? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c28 --- Comment #28 from Stefan Dirsch <sndirsch@suse.com> --- (In reply to Michael Pujos from comment #27)
I will try the SubSection thing, but it cannot be a proper fix.
Thanks. Would be just one step to understand things better. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c29 Adam Spiers <suse@adamspiers.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |suse@adamspiers.org --- Comment #29 from Adam Spiers <suse@adamspiers.org> --- Thanks a lot for debugging this! It was driving me crazy (I cannot live without my beloved emacs) and for some reason no search engine manages to find this bug. Luckily I thought to search this bugzilla and found this. I can confirm that on my TW machine, commenting XLIB_SKIP_ARGB_VISUALS=1 in /usr/bin/emacs fixes it. One strange thing is that I tried switching from nvidia to nouveau and even to Intel i915, and they all experience the crash. So unless I'm confusing things it does not seem to be an NVidia-specific issue.
hwinfo --gfx 15: PCI 100.0: 0300 VGA compatible controller (VGA) [Created at pci.386] Unique ID: VCu0.FNjqxwmjYWE Parent ID: vSkL.sDFZQnD7N71 SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.0 SysFS BusID: 0000:01:00.0 Hardware Class: graphics card Model: "nVidia TU117M [GeForce GTX 1650 Mobile / Max-Q]" Vendor: pci 0x10de "nVidia Corporation" Device: pci 0x1f91 "TU117M [GeForce GTX 1650 Mobile / Max-Q]" SubVendor: pci 0x17aa "Lenovo" SubDevice: pci 0x22a8 Revision: 0xff Memory Range: 0xcd000000-0xcdffffff (rw,non-prefetchable) Memory Range: 0xa0000000-0xafffffff (ro,non-prefetchable) Memory Range: 0xb0000000-0xb1ffffff (ro,non-prefetchable) I/O Ports: 0x3000-0x307f (rw) Memory Range: 0xce080000-0xce0fffff (ro,non-prefetchable) IRQ: 16 (314 events) Module Alias: "pci:v000010DEd00001F91sv000017AAsd000022A8bc03sc00i00" Driver Info #0: Driver Status: nouveau is not active Driver Activation Cmd: "modprobe nouveau" Driver Info #1: Driver Status: nvidia_drm is not active Driver Activation Cmd: "modprobe nvidia_drm" Driver Info #2: Driver Status: nvidia is not active Driver Activation Cmd: "modprobe nvidia" Config Status: cfg=new, avail=yes, need=no, active=unknown Attached to: #12 (PCI bridge)
36: PCI 02.0: 0300 VGA compatible controller (VGA) [Created at pci.386] Unique ID: _Znp.Byzzp9QuruB SysFS ID: /devices/pci0000:00/0000:00:02.0 SysFS BusID: 0000:00:02.0 Hardware Class: graphics card Model: "Intel CoffeeLake-H GT2 [UHD Graphics 630]" Vendor: pci 0x8086 "Intel Corporation" Device: pci 0x3e9b "CoffeeLake-H GT2 [UHD Graphics 630]" SubVendor: pci 0x17aa "Lenovo" SubDevice: pci 0x22a8 Revision: 0x02 Driver: "i915" Driver Modules: "i915" Memory Range: 0x6040000000-0x6040ffffff (rw,non-prefetchable) Memory Range: 0x4000000000-0x400fffffff (ro,non-prefetchable) I/O Ports: 0x4000-0x403f (rw) Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled) IRQ: 152 (240155 events) Module Alias: "pci:v00008086d00003E9Bsv000017AAsd000022A8bc03sc00i00" Driver Info #0: Driver Status: i915 is active Driver Activation Cmd: "modprobe i915" Config Status: cfg=no, avail=yes, need=no, active=unknown Primary display adapter: #15 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c32 --- Comment #32 from Stefan Dirsch <sndirsch@suse.com> --- Honestly I don't know, but you could try. Probably just for testing it would be easier to use something like this. X -depth 24 -fbbpp 24 -retro :1 & sleep 3 DISPLAY=:1 xterm & DISPLAY=:1 icewm & <... start your emacs on the new X session ...> -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c33 --- Comment #33 from Michael Pujos <pujos.michael@gmail.com> --- What's surprising is that this crash does not happen for me if I start emacs just after starting Xorg. It crashes if I start emacs after a few hours (maybe less) Xorg has been running. That's very weird. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c34 --- Comment #34 from Michael Pujos <pujos.michael@gmail.com> --- And that's why it might not be NVIDIA only, since when I tested on Intel (and could not reproduce it) I maybe did not wait enough time. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c35 --- Comment #35 from Adam Spiers <suse@adamspiers.org> --- (In reply to Michael Pujos from comment #33)
What's surprising is that this crash does not happen for me if I start emacs just after starting Xorg. It crashes if I start emacs after a few hours (maybe less) Xorg has been running. That's very weird.
I saw the same - restarting Xorg and then Emacs usually fixed it ... But not always! Very weird indeed. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 Michael Pujos <pujos.michael@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|emacs-gtk crashes on mouse |emacs-gtk crashes on mouse |selection due to |selection due to |XLIB_SKIP_ARGB_VISUALS=1 in |XLIB_SKIP_ARGB_VISUALS=1 in |/usr/bin/emacs [NVIDIA |/usr/bin/emacs |driver only] | -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c37 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?, | |needinfo?(martin.wilck@suse | |.com), | |needinfo?(pujos.michael@gma | |il.com) | --- Comment #37 from Stefan Dirsch <sndirsch@suse.com> --- Thanks for all the input and feedback. What can we make now out of it. Honestly, I don't know either. I'm afraid for now everyone needs to live with their current workaround. :-( -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c38 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo? --- Comment #38 from Dr. Werner Fink <werner@suse.com> --- I'm using on Leap as well as on Tumblweed the GNU Emacs as a service ll -G ~/.config/systemd/user/emacs.service lrwxrwxrwx 1 werner 35 May 8 2019 /suse/werner/.config/systemd/user/emacs.service -> /usr/lib/systemd/user/emacs.service systemctl --user status emacs ? emacs.service - Emacs text editor Loaded: loaded (/usr/lib/systemd/user/emacs.service; enabled; vendor preset: disabled) Active: active (running) since Fri 2021-10-15 09:34:50 CEST; 1 week 3 days ago Docs: info:emacs man:emacs(1) https://gnu.org/software/emacs/ Main PID: 11720 (emacs-gtk) Tasks: 7 (limit: 4915) Memory: 90.7M CPU: 26.515s CGroup: /user.slice/user-223.slice/user@223.service/app.slice/emacs.service ?? 5647 /usr/lib/uim/uim-helper-server ??11720 /usr/bin/emacs --fg-daemon ??11733 /usr/bin/uim-el-helper-agent ??11734 /usr/bin/uim-el-agent ... does this also crash if a window gets open with `emacsclient` -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c39 --- Comment #39 from Michael Pujos <pujos.michael@gmail.com> --- Confirming this happens with just the modesetting Xorg driver. Crash always happen after a while Xorg has been running. I wonder if this does not only happen after the laptop has been to sleep then resumed... I'm quite surprised not more people have complained about this issue. I still have no idea why XLIB_SKIP_ARGB_VISUALS=1 is religiously kept in /usr/bin/emacs... if it was this important, emacs would surely set that environment variable in its own code, wouldn't it ? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c42 Bharath Ghanta <mail@bharath-g.in> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mail@bharath-g.in --- Comment #42 from Bharath Ghanta <mail@bharath-g.in> --- This also happens to me. Emacs crashes when selecting text either using the mouse or keyboard. I am running a radeon 7750 with amdgpu. Only happens after X has been running for a while and it's fixed if I comment out XLIB_SKIP_ARGB_VISUALS=1. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c43 --- Comment #43 from Stefan Dirsch <sndirsch@suse.com> --- (In reply to Martin Wilck from comment #41)
Problem A): emacs crashes with XLIB_SKIP_ARGB_VISUALS=1 Problem B): emacs crashes without XLIB_SKIP_ARGB_VISUALS=1
A new occurence of A) was just reported in bug 1186341. It appears that the occurence of A) is increasing. The only person reporting B) was Maurizio Galli (comment 1186341, comment 20 ff.). Admittedly, there was only a short time window in which XLIB_SKIP_ARGB_VISUALS= wasn't set by default, so perhaps there would have been more reporters of B) if the change hadn't been reverted quickly.
Still, "Necessary to keep Flash from crashing" (comment 19) seems to be a very weak rationale for having emacs crash.
So perhaps we should vote for changing the default once more...
I agree. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c44 --- Comment #44 from Dr. Werner Fink <werner@suse.com> --- Then let's see SR#931550 ... nevertheless it might also help that the function XVisualIDFromVisual() can handle if the visual address is set to NULL -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c45 --- Comment #45 from Dr. Werner Fink <werner@suse.com> --- SR#931558 ... don't miss the shell script change ... I'm currentlxy working on the upcoming GNU Emacs 28.0 and have therefore two tree around -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c46 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo? | --- Comment #46 from Stefan Dirsch <sndirsch@suse.com> --- (In reply to Dr. Werner Fink from comment #44)
Then let's see SR#931550 ... nevertheless it might also help that the function XVisualIDFromVisual() can handle if the visual address is set to NULL
done https://build.opensuse.org/request/show/931562 I guess we can close now this ticket. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c47 --- Comment #47 from Stefan Dirsch <sndirsch@suse.com> --- (In reply to Dr. Werner Fink from comment #45)
SR#931558 ... don't miss the shell script change ... I'm currentlxy working on the upcoming GNU Emacs 28.0 and have therefore two tree around
Thanks. The new SR https://build.opensuse.org/request/show/931562 includes the shell script change. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c48 --- Comment #48 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1191517) was mentioned in https://build.opensuse.org/request/show/931558 Factory / emacs -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c49 --- Comment #49 from Stefan Dirsch <sndirsch@suse.com> --- @Werner Can we close this ticket now? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c50 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #50 from Dr. Werner Fink <werner@suse.com> --- (In reply to Stefan Dirsch from comment #49)
@Werner Can we close this ticket now?
I'm fine with but I suspect to see this again :/ -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c51 --- Comment #51 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1191517) was mentioned in https://build.opensuse.org/request/show/932482 Factory / emacs -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191517 http://bugzilla.opensuse.org/show_bug.cgi?id=1191517#c52 --- Comment #52 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1191517) was mentioned in https://build.opensuse.org/request/show/932549 Factory / emacs -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com