For what it might be worth: the bt posted above showed me that libmozjs is involved in these freezes.
I noticed that when I have firefox running - and I have gnome-shell-integration installed as an add-on on my platforms and I also use gnome-shell-extension taskbar - these segfaults are catastrophic - meaning they cause me to have to restart lightdm (or gdm - I've used both). gnome-shell isn't auto-restarted in that case. I haven't root caused that yet - nor has anyone, I think.
I stopped using firefox for the past few hours - I had generally only been using firefox for gnome-shell-integration and the purpose of management of the gnome extensions, otherwise I use chrome for general browsing, so no big for me to stop using it for now.
I've seen twice now without using firefox that I still get the segfaults from libgjs.so.0, but gnome-shell auto restarts cleanly - it looks a lot like the behavior seen with a controlled restart using Alt-F2 <r>, for example.
I'll keep watching it. My first order of business is to stop the catastrophes where I need to restart the display manager. If it means not keeping firefox running for now - I'll live with it.
This bug with libgjs dates way back - there seem to be many bug reports that taper off to no resolution.
Again - this back-trace with symbols is a big help - thanks for posting that and the link to the bugzilla-gnome work.
]]>packages/gjs/trunk$ svn diff PKGBUILD
Index: PKGBUILD
===================================================================
--- PKGBUILD (révision 300688)
+++ PKGBUILD (copie de travail)
@@ -26,7 +26,8 @@
build() {
cd $pkgname
- ./configure --prefix=/usr --disable-static --libexecdir=/usr/lib
+ export CXXFLAGS='-g -O0'
+ ./configure --prefix=/usr --disable-static --libexecdir=/usr/lib --enable-debug-symbols=-gdwarf-2
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
After a crash:
$ coredumpctl -1
TIME PID UID GID SIG COREFILE EXE
Mon 2017-07-17 15:34:49 CEST 27368 1000 1000 11 present /usr/bin/gnome-shell
$ coredumpctl gdb 27368
Program terminated with signal SIGSEGV, Segmentation fault.
#0 js::GCMethods<JSObject*>::needsPostBarrier (v=0x7fbc0a9548c0) at /usr/include/mozjs-38/js/RootingAPI.h:663
663 return v != nullptr && gc::IsInsideNursery(reinterpret_cast<gc::Cell*>(v));
[Current thread is 1 (Thread 0x7fbc7c3d69c0 (LWP 27368))]
(gdb) bt
#0 0x00007fbc7b997945 in js::GCMethods<JSObject*>::needsPostBarrier(JSObject*) (v=0x7fbc0a9548c0) at /usr/include/mozjs-38/js/RootingAPI.h:663
#1 0x00007fbc7b997945 in JS::Heap<JSObject*>::set(JSObject*) (newPtr=0x0, this=0x254c260) at /usr/include/mozjs-38/js/RootingAPI.h:296
#2 0x00007fbc7b997945 in JS::Heap<JSObject*>::operator=(JSObject* const&) (p=<optimized out>, this=0x254c260) at /usr/include/mozjs-38/js/RootingAPI.h:266
#3 0x00007fbc7b997945 in GjsMaybeOwned<JSObject*>::reset() (this=0x254c250) at ./gjs/jsapi-util-root.h:267
#4 0x00007fbc7b997945 in closure_clear_idle(void*) (data=0x254c220) at gi/closure.cpp:133
#5 0x00007fbc79abd8c5 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#6 0x00007fbc79abdc88 in () at /usr/lib/libglib-2.0.so.0
#7 0x00007fbc79abdfa2 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#8 0x00007fbc7b27508c in meta_run () at /usr/lib/libmutter-0.so.0
#9 0x0000000000401ff7 in main ()
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f4b6d201625 in ?? () from /usr/lib/libgjs.so.0
[Current thread is 1 (Thread 0x7f4b6dc3e9c0 (LWP 868))]
(gdb) bt
#0 0x00007f4b6d201625 in () at /usr/lib/libgjs.so.0
#1 0x00007f4b6b3278c5 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#2 0x00007f4b6b327c88 in () at /usr/lib/libglib-2.0.so.0
#3 0x00007f4b6b327fa2 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#4 0x00007f4b6cadf08c in meta_run () at /usr/lib/libmutter-0.so.0
#5 0x0000000000401ff7 in main ()
svn checkout --depth=empty svn://svn.archlinux.org/packages
cd packages
svn update js38
cd js38/trunk
vim PKGBUILD # change options to (!staticlibs debug)
makepkg
sudo pacman -U js38-debug-38.8.0-3-x86_64.pkg.tar.xz
Then restarted
Index: PKGBUILD
===================================================================
--- PKGBUILD (révision 300681)
+++ PKGBUILD (copie de travail)
@@ -10,7 +10,7 @@
license=(MPL)
depends=(nspr gcc-libs readline zlib icu libffi)
makedepends=(python2 libffi zip)
-options=(!staticlibs)
+options=(!staticlibs debug)
source=(https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.bz2
mozjs38-fix-tracelogger.patch
mozjs38-shell-version.patch
This way you can bisect yourself to one offender. If there're multiples, you'll have to repeat this (without the known offenders)
Since your last trace (and the OPs one) cross libmozjs, you may try building js38 debug enabled
]]>(gdb) bt full
#0 0x00007fc2ef3de925 in () at /usr/lib/libgjs.so.0
#1 0x00007fc2ef3dfa0a in () at /usr/lib/libgjs.so.0
#2 0x00007fc2e861dc73 in () at /usr/lib/libmozjs-38.so
#3 0x00007fc2e8678a3c in () at /usr/lib/libmozjs-38.so
#4 0x00007fc2e861ef61 in () at /usr/lib/libmozjs-38.so
#5 0x00007fc2e8634733 in () at /usr/lib/libmozjs-38.so
#6 0x00007fc2e8635172 in () at /usr/lib/libmozjs-38.so
#7 0x00007fc2e8636f18 in () at /usr/lib/libmozjs-38.so
#8 0x00007fc2e86378c0 in () at /usr/lib/libmozjs-38.so
#9 0x00007fc2e8637b0d in () at /usr/lib/libmozjs-38.so
#10 0x00007fc2e8637ed4 in () at /usr/lib/libmozjs-38.so
#11 0x00007fc2ef3f64f9 in gjs_schedule_gc_if_needed () at /usr/lib/libgjs.so.0
#12 0x00007fc2ef3f6564 in gjs_call_function_value () at /usr/lib/libgjs.so.0
#13 0x00007fc2ef3ce7db in () at /usr/lib/libgjs.so.0
#14 0x00007fc2ef3cfc75 in () at /usr/lib/libgjs.so.0
#15 0x00007fc2c949e663 in ()
#16 0x0000000000000000 in ()
Nothing really special in journal:
juil. 13 15:59:03 mymachine systemd[1]: Starting Cleanup of Temporary Directories...
juil. 13 15:59:03 mymachine systemd[1]: Started Cleanup of Temporary Directories.
juil. 13 15:59:08 mymachine kernel: gnome-shell[2817]: segfault at 7fc26b5fffe8 ip 00007fc2ef3de925 sp 00007ffc464abc20 error 4 in libgjs.so.0.0.0[7fc2ef3a6000+bc000]
juil. 13 15:59:08 mymachine systemd[1]: Started Process Core Dump (PID 28503/UID 0).
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007ff63c1c5625 in ?? () from /usr/lib/libgjs.so.0
[Current thread is 1 (Thread 0x7ff63cc419c0 (LWP 389))]
(gdb) bt
#0 0x00007ff63c1c5625 in () at /usr/lib/libgjs.so.0
#1 0x00007ff63a2eb8c5 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#2 0x00007ff63a2ebc88 in () at /usr/lib/libglib-2.0.so.0
#3 0x00007ff63a2ebfa2 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#4 0x00007ff63baa308c in meta_run () at /usr/lib/libmutter-0.so.0
#5 0x0000000000401ff7 in main ()
I rebuilt gjs with the following but i don't know if it'll be enough
$ svn diff
Index: PKGBUILD
===================================================================
--- PKGBUILD (révision 300134)
+++ PKGBUILD (copie de travail)
@@ -13,6 +13,7 @@
_commit=43c5d7839630dd166372f2c404a9a72c87fd102a # tags/1.48.5^0
source=("git+https://git.gnome.org/browse/gjs#commit=$_commit")
sha256sums=('SKIP')
+options=(debug !strip)
pkgver() {
cd $pkgname
juil. 12 09:19:32 mymachine audacious.desktop[1705]: ERROR plugin-load.cc:72 [plugin_load]: /usr/lib/audacious/Input/amidi-plug.so could not be loaded: libfluidsynth.so.1: Ne peut ouvrir le fic
juil. 12 09:19:32 mymachine audacious.desktop[1705]: ERROR plugin-load.cc:72 [plugin_load]: /usr/lib/audacious/Input/sid.so could not be loaded: libsidplayfp.so.4: Ne peut ouvrir le fichier d'o
juil. 12 09:19:32 mymachine audacious.desktop[1705]: ERROR plugin-load.cc:72 [plugin_load]: /usr/lib/audacious/General/lirc.so could not be loaded: liblirc_client.so.0: Ne peut ouvrir le fichie
juil. 12 09:19:33 mymachine gnome-shell[395]: JS WARNING: [resource:///org/gnome/shell/ui/messageList.js 353]: reference to undefined property this._useBodyMarkup
juil. 12 09:19:33 mymachine gnome-shell[395]: JS WARNING: [resource:///org/gnome/shell/ui/messageList.js 386]: reference to undefined property this._useBodyMarkup
juil. 12 09:19:35 mymachine kernel: gnome-shell[395]: segfault at 7f84698fffe8 ip 00007f84ddcc6625 sp 00007ffe96e504c0 error 4 in libgjs.so.0.0.0[7f84ddc9b000+bc000]
juil. 12 09:19:35 mymachine systemd[1]: Started Process Core Dump (PID 1717/UID 0).
$ coredumpctl -1 gdb 395
PID: 395 (gnome-shell)
UID: 1000 (myuser)
GID: 1000 (myuser)
Signal: 11 (SEGV)
Timestamp: Wed 2017-07-12 09:19:35 CEST (1min 6s ago)
Command Line: /usr/bin/gnome-shell
Executable: /usr/bin/gnome-shell
Control Group: /user.slice/user-1000.slice/session-c1.scope
Unit: session-c1.scope
Slice: user-1000.slice
Session: c1
Owner UID: 1000 (myuser)
Boot ID: 75051cb32d0d4135818ddf967dc9598c
Machine ID: 1769e2fbb9354350b3203f658bb6f526
Hostname: mymachine
Storage: /var/lib/systemd/coredump/core.gnome-shell.1000.75051cb32d0d4135818ddf967dc9598c.395.1499843975000000.lz4
Message: Process 395 (gnome-shell) of user 1000 dumped core.
Stack trace of thread 395:
#0 0x00007f84ddcc6625 n/a (libgjs.so.0)
#1 0x00007f84dbdec8c5 g_main_context_dispatch (libglib-2.0.so.0)
#2 0x00007f84dbdecc88 n/a (libglib-2.0.so.0)
#3 0x00007f84dbdecfa2 g_main_loop_run (libglib-2.0.so.0)
#4 0x00007f84dd5a408c meta_run (libmutter-0.so.0)
#5 0x0000000000401ff7 main (gnome-shell)
#6 0x00007f84db7ff43a __libc_start_main (libc.so.6)
#7 0x000000000040212a n/a (gnome-shell)
Stack trace of thread 431:
#0 0x00007f84db8c224d poll (libc.so.6)
#1 0x00007f84dbdecc09 n/a (libglib-2.0.so.0)
#2 0x00007f84dbdecd1c g_main_context_iteration (libglib-2.0.so.0)
#3 0x00007f84bd50b55d n/a (libdconfsettings.so)
#4 0x00007f84dbe13ae5 n/a (libglib-2.0.so.0)
#5 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#6 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 1695:
#0 0x00007f84db8c7349 syscall (libc.so.6)
#1 0x00007f84dbe31cba g_cond_wait_until (libglib-2.0.so.0)
#2 0x00007f84dbdc1121 n/a (libglib-2.0.so.0)
#3 0x00007f84dbdc16dc g_async_queue_timeout_pop (libglib-2.0.so.0)
#4 0x00007f84dbe1458e n/a (libglib-2.0.so.0)
#5 0x00007f84dbe13ae5 n/a (libglib-2.0.so.0)
#6 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#7 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 396:
#0 0x00007f84db8c224d poll (libc.so.6)
#1 0x00007f84dbdecc09 n/a (libglib-2.0.so.0)
#2 0x00007f84dbdecd1c g_main_context_iteration (libglib-2.0.so.0)
#3 0x00007f84dbdecd61 n/a (libglib-2.0.so.0)
#4 0x00007f84dbe13ae5 n/a (libglib-2.0.so.0)
#5 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#6 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 477:
#0 0x00007f84dbb9139d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00007f84ce605d10 PR_WaitCondVar (libnspr4.so)
#2 0x00007f84d6bef811 n/a (libmozjs-38.so)
#3 0x00007f84ce60b88b n/a (libnspr4.so)
#4 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#5 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 481:
#0 0x00007f84dbb9139d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00007f84ce605d10 PR_WaitCondVar (libnspr4.so)
#2 0x00007f84d6bef811 n/a (libmozjs-38.so)
#3 0x00007f84ce60b88b n/a (libnspr4.so)
#4 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#5 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 432:
#0 0x00007f84db8c224d poll (libc.so.6)
#1 0x00007f84d7c12ee1 n/a (libpulse.so.0)
#2 0x00007f84d7c046f1 pa_mainloop_poll (libpulse.so.0)
#3 0x00007f84d7c04d8e pa_mainloop_iterate (libpulse.so.0)
#4 0x00007f84d7c04e40 pa_mainloop_run (libpulse.so.0)
#5 0x00007f84d7c12e29 n/a (libpulse.so.0)
#6 0x00007f84ccebdfe8 n/a (libpulsecommon-10.0.so)
#7 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#8 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 397:
#0 0x00007f84db8c224d poll (libc.so.6)
#1 0x00007f84dbdecc09 n/a (libglib-2.0.so.0)
#2 0x00007f84dbdecfa2 g_main_loop_run (libglib-2.0.so.0)
#3 0x00007f84dc3d4546 n/a (libgio-2.0.so.0)
#4 0x00007f84dbe13ae5 n/a (libglib-2.0.so.0)
#5 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#6 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 476:
#0 0x00007f84dbb9139d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00007f84ce605d10 PR_WaitCondVar (libnspr4.so)
#2 0x00007f84d6bef811 n/a (libmozjs-38.so)
#3 0x00007f84ce60b88b n/a (libnspr4.so)
#4 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#5 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 774:
#0 0x00007f84db8c224d poll (libc.so.6)
#1 0x00007f84c519d815 n/a (libGLX_nvidia.so.0)
#2 0x00007f84bf2ee2eb n/a (libnvidia-glcore.so.381.22)
#3 0x00007f84c5166174 glXWaitVideoSyncSGI (libGLX_nvidia.so.0)
#4 0x00007f84d92ade03 n/a (libmutter-cogl-0.so)
#5 0x00007f84dbe13ae5 n/a (libglib-2.0.so.0)
#6 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#7 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 480:
#0 0x00007f84dbb9139d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00007f84ce605d10 PR_WaitCondVar (libnspr4.so)
#2 0x00007f84d6bef811 n/a (libmozjs-38.so)
#3 0x00007f84ce60b88b n/a (libnspr4.so)
#4 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#5 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 479:
#0 0x00007f84dbb9139d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00007f84ce605d10 PR_WaitCondVar (libnspr4.so)
#2 0x00007f84d6bef811 n/a (libmozjs-38.so)
#3 0x00007f84ce60b88b n/a (libnspr4.so)
#4 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#5 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 483:
#0 0x00007f84dbb9139d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00007f84ce605d10 PR_WaitCondVar (libnspr4.so)
#2 0x00007f84d6bef811 n/a (libmozjs-38.so)
#3 0x00007f84ce60b88b n/a (libnspr4.so)
#4 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#5 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 482:
#0 0x00007f84dbb9139d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00007f84ce605d10 PR_WaitCondVar (libnspr4.so)
#2 0x00007f84d6bef811 n/a (libmozjs-38.so)
#3 0x00007f84ce60b88b n/a (libnspr4.so)
#4 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#5 0x00007f84db8cc1ef __clone (libc.so.6)
Stack trace of thread 478:
#0 0x00007f84dbb9139d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00007f84ce605d10 PR_WaitCondVar (libnspr4.so)
#2 0x00007f84d6bef811 n/a (libmozjs-38.so)
#3 0x00007f84ce60b88b n/a (libnspr4.so)
#4 0x00007f84dbb8b297 start_thread (libpthread.so.0)
#5 0x00007f84db8cc1ef __clone (libc.so.6)
GNU gdb (GDB) 8.0
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/gnome-shell...(no debugging symbols found)...done.
[New LWP 395]
[New LWP 431]
[New LWP 1695]
[New LWP 396]
[New LWP 477]
[New LWP 481]
[New LWP 432]
[New LWP 397]
[New LWP 476]
[New LWP 774]
[New LWP 480]
[New LWP 479]
[New LWP 483]
[New LWP 482]
[New LWP 478]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/gnome-shell'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f84ddcc6625 in ?? () from /usr/lib/libgjs.so.0
[Current thread is 1 (Thread 0x7f84de7449c0 (LWP 395))]
(gdb) bt
#0 0x00007f84ddcc6625 in () at /usr/lib/libgjs.so.0
#1 0x00007f84dbdec8c5 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#2 0x00007f84dbdecc88 in () at /usr/lib/libglib-2.0.so.0
#3 0x00007f84dbdecfa2 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#4 0x00007f84dd5a408c in meta_run () at /usr/lib/libmutter-0.so.0
#5 0x0000000000401ff7 in main ()
$ coredumpctl gdb 24482
PID: 24482 (gnome-shell)
UID: 1000 (myuser)
GID: 1000 (myuser)
Signal: 11 (SEGV)
Timestamp: Tue 2017-07-11 09:48:43 CEST (3min 9s ago)
Command Line: /usr/bin/gnome-shell
Executable: /usr/bin/gnome-shell
Control Group: /user.slice/user-1000.slice/session-c6.scope
Unit: session-c6.scope
Slice: user-1000.slice
Session: c6
Owner UID: 1000 (myuser)
Boot ID: 5cb67433ebb24185a097faa6e49acfb7
Machine ID: aecacaf6ad964d768950e0a9b47f66af
Hostname: mymachine.mydomain.net
Storage: /var/lib/systemd/coredump/core.gnome-shell.1000.5cb67433ebb24185a097faa6e49acfb7.24482.1499759323000000.lz4
Message: Process 24482 (gnome-shell) of user 1000 dumped core.
Stack trace of thread 24482:
#0 0x00007f24ba7b7735 n/a (/usr/lib/libgjs.so.0.0.0 (deleted))
(gdb) bt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/gnome-shell'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f24ba7b7735 in ?? () from /usr/lib/libgjs.so.0
[Current thread is 1 (Thread 0x7f24bb1f79c0 (LWP 24482))]
(gdb) bt
#0 0x00007f24ba7b7735 in () at /usr/lib/libgjs.so.0
#1 0x00007f24b88e28b5 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#2 0x00007f24b88e2c78 in () at /usr/lib/libglib-2.0.so.0
#3 0x00007f24b88e2f92 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#4 0x00007f24ba094fdc in meta_register_with_session () at /usr/lib/libmutter-0.so.0
#5 0x0000000000401ff7 in main ()