Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 754783 - xfce-base/xfce4-settings causing kernel traps
Summary: xfce-base/xfce4-settings causing kernel traps
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: XFCE Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-16 00:01 UTC by jorge
Modified: 2020-12-20 08:16 UTC (History)
3 users (show)

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


Attachments
Hopefully sequential log (journal.txt,206.60 KB, text/plain)
2020-11-17 02:15 UTC, jorge
Details
xfce4 log (xfce4.log,8.56 KB, text/x-log)
2020-11-17 10:16 UTC, jorge
Details
testing patch (gtkinit.patch,706 bytes, patch)
2020-11-17 11:01 UTC, Michał Górny
Details | Diff
xfce4 log 2 (xfce4_1.log,4.27 KB, text/x-log)
2020-11-17 13:55 UTC, jorge
Details
autogenerated log (auto.log,206.31 KB, text/x-log)
2020-11-17 14:21 UTC, jorge
Details
lightdm log (lightdm.log,4.88 KB, text/x-log)
2020-11-17 14:26 UTC, jorge
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jorge 2020-11-16 00:01:20 UTC
coredumpctl dump

           PID: 3202 (xfsettingsd)
           UID: 1000 (jorge)
           GID: 1000 (jorge)
        Signal: 5 (TRAP)
     Timestamp: Sun 2020-11-15 17:33:16 CST (9min ago)
  Command Line: xfsettingsd --display :0.0 --sm-client-id 261e2d80d-acd1-4b7d-a47d-618bb089d516
    Executable: /usr/bin/xfsettingsd
 Control Group: /user.slice/user-1000.slice/session-c2.scope
          Unit: session-c2.scope
         Slice: user-1000.slice
       Session: c2
     Owner UID: 1000 (jorge)
       Boot ID: aff922b37c3644a9897c03c22d59a512
    Machine ID: 170173c64e6b37a0c863c41e5ee1a2ee
      Hostname: localhost
       Storage: /var/lib/systemd/coredump/core.xfsettingsd.1000.aff922b37c3644a9897c03c22d59a512.3202.1605483196000000.zst
       Message: Process 3202 (xfsettingsd) of user 1000 dumped core.
Refusing to dump core to tty (use shell redirection or specify --output).


journalctl -b 0 | grep -e xfsettingsd || trap || coredump

Nov 15 17:33:11 localhost dbus-daemon[388]: [system] Activating via systemd: service name='org.freedesktop.UPower' unit='upower.service' requested by ':1.23' (uid=1000 pid=799 comm="xfsettingsd --display :0.0 --sm-client-id 20dd1ca4")
Nov 15 17:33:16 localhost kernel: traps: xfsettingsd[3131] trap int3 ip:7fd286d1c627 sp:7ffe4c7d6540 error:0 in libglib-2.0.so.0.6400.5[7fd286cd9000+97000]
Nov 15 17:33:16 localhost kernel: traps: xfsettingsd[3134] trap int3 ip:7fbedd06c627 sp:7ffe105283a0 error:0 in libglib-2.0.so.0.6400.5[7fbedd029000+97000]
Nov 15 17:33:16 localhost dbus-daemon[718]: [session uid=1000 pid=716] Activating service name='org.a11y.Bus' requested by ':1.445' (uid=1000 pid=2642 comm="xfsettingsd --display :0.0 --sm-client-id 24a73239")
Nov 15 17:33:16 localhost kernel: traps: xfsettingsd[3143] trap int3 ip:7fa7576f6627 sp:7fffb50e0580 error:0 in libglib-2.0.so.0.6400.5[7fa7576b3000+97000]
Nov 15 17:33:16 localhost kernel: traps: xfsettingsd[3144] trap int3 ip:7f33292ab627 sp:7ffc460c9fe0 error:0 in libglib-2.0.so.0.6400.5[7f3329268000+97000]
Nov 15 17:33:16 localhost kernel: traps: xfsettingsd[3149] trap int3 ip:7f231a42f627 sp:7fff80ca45c0 error:0 in libglib-2.0.so.0.6400.5[7f231a3ec000+97000]
Nov 15 17:33:16 localhost kernel: traps: xfsettingsd[3142] trap int3 ip:7fbf57821627 sp:7ffde5650240 error:0 in libglib-2.0.so.0.6400.5[7fbf577de000+97000]
Nov 15 17:33:16 localhost kernel: traps: xfsettingsd[3146] trap int3 ip:7efdb9259627 sp:7ffd13be7890 error:0 in libglib-2.0.so.0.6400.5[7efdb9216000+97000]
Nov 15 17:33:16 localhost kernel: traps: xfsettingsd[3160] trap int3 ip:7f60f539f627 sp:7ffc310ad870 error:0 in libglib-2.0.so.0.6400.5[7f60f535c000+97000]
Nov 15 17:33:16 localhost kernel: traps: xfsettingsd[3159] trap int3 ip:7f292b389627 sp:7ffc6c7975a0 error:0 in libglib-2.0.so.0.6400.5[7f292b346000+97000]
Nov 15 17:33:16 localhost kernel: traps: xfsettingsd[3166] trap int3 ip:7fe5b10a3627 sp:7ffdfbd12680 error:0 in libglib-2.0.so.0.6400.5[7fe5b1060000+97000]
Nov 15 17:33:18 localhost systemd-coredump[3192]: Process 3160 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:19 localhost systemd-coredump[3167]: Process 3143 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:19 localhost systemd-coredump[3204]: Process 3177 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:19 localhost systemd-coredump[3157]: Process 3134 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:19 localhost systemd-coredump[3158]: Process 3131 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:19 localhost systemd-coredump[3191]: Process 3159 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:19 localhost systemd-coredump[3233]: Process 3207 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:20 localhost systemd-coredump[3206]: Process 3185 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:20 localhost systemd-coredump[3199]: Process 3166 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:20 localhost systemd-coredump[3198]: Process 3142 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:20 localhost systemd-coredump[3205]: Process 3176 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:20 localhost systemd-coredump[3195]: Process 3146 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:20 localhost systemd-coredump[3222]: Process 3197 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:20 localhost systemd-coredump[3190]: Process 3144 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:20 localhost systemd-coredump[3183]: Process 3149 (xfsettingsd) of user 1000 dumped core.
Nov 15 17:33:20 localhost systemd-coredump[3219]: Process 3202 (xfsettingsd) of user 1000 dumped core.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-16 23:54:20 UTC
I'd use a backtrace from that.
Comment 2 jorge 2020-11-17 02:15:01 UTC
Created attachment 671701 [details]
Hopefully sequential log

I am adding the full log:

journalctl -b 0

but this time, I isolated 1 CPU from my system using

isolcpus=1-7

(my CPU has 8 cores) hopefully giving a sequential log of events. I am looking for a way to backtrace the problem...
Comment 3 jorge 2020-11-17 05:12:44 UTC
Hope this is useful:

coredumpctl debug
           PID: 3804 (xfsettingsd)
           UID: 1000 (jorge)
           GID: 1000 (jorge)
        Signal: 5 (TRAP)
     Timestamp: Mon 2020-11-16 22:41:12 CST (12min ago)
  Command Line: xfsettingsd --display :0.0 --sm-client-id 23526dd8b-908a-4cdb-8e1d-cb3ea2a7c698
    Executable: /usr/bin/xfsettingsd
 Control Group: /user.slice/user-1000.slice/session-c2.scope
          Unit: session-c2.scope
         Slice: user-1000.slice
       Session: c2
     Owner UID: 1000 (jorge)
       Boot ID: 03f5150313b242a092c15a8af23a77b9
    Machine ID: 170173c64e6b37a0c863c41e5ee1a2ee
      Hostname: localhost
       Storage: /var/lib/systemd/coredump/core.xfsettingsd.1000.03f5150313b242a092c15a8af23a77b9.3804.1605588072000000.zst
       Message: Process 3804 (xfsettingsd) of user 1000 dumped core.

GNU gdb (Gentoo 9.2 vanilla) 9.2
Copyright (C) 2020 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:
<https://bugs.gentoo.org/>.
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/xfsettingsd...
[New LWP 3804]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `xfsettingsd --display :0.0 --sm-client-id 23526dd8b-908a-4cdb-8e1d-cb3ea2a7c698'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0  0x00007f2c768a4627 in g_log_structured_array () from /usr/lib64/libglib-2.0.so.0
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-17 08:34:25 UTC
You may need to rebuild xfce4-settings with '-g -O0' to get something meaningful.  Since 'coredump dump' apparently doesn't print the stack trace, try 'coredump gdb -1' and then 'bt'.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-17 08:40:00 UTC
Sorry, posted before reading your final comment.  I'd use your xfce4-settings version, though.
Comment 6 jorge 2020-11-17 08:47:03 UTC
Hi: I've issued 'bt' and there are more lines from gdb:

Reading symbols from /usr/bin/xfsettingsd...
[New LWP 3804]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `xfsettingsd --display :0.0 --sm-client-id 23526dd8b-908a-4cdb-8e1d-cb3ea2a7c698'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0  0x00007f2c768a4627 in g_log_structured_array () from /usr/lib64/libglib-2.0.so.0
(gdb) bt
#0  0x00007f2c768a4627 in g_log_structured_array () at /usr/lib64/libglib-2.0.so.0
#1  0x00007f2c768a4abc in g_log_default_handler () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f2c768a4d49 in g_logv () at /usr/lib64/libglib-2.0.so.0
#3  0x00007f2c768a4fc7 in g_log () at /usr/lib64/libglib-2.0.so.0
#4  0x000055904df298aa in main (argc=<optimized out>, argv=<optimized out>) at main.c:281

I've already compiled xfce-settings with -ggdb and with the nostrip feature. Followed the recommendations of https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
but if something else is required (such as recompiling) please let me know, I'll be happy to contribute and learn.

What do you mean to use the xfce4-settings version?
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-17 08:48:00 UTC
So if I'm reading this correctly, it means that xfsettingsd has logged a fatal error.  It probably output this error to the console on which it is running.  I think the easiest way to get it would be to start X11/Xfce from a tty, something like this:

$ startxfce4 |& tee xfce4.log
Comment 8 jorge 2020-11-17 10:16:33 UTC
Created attachment 671806 [details]
xfce4 log

First I had to disable LightDM in order to start from tty (lightdm did not grant me access to a console start, but that's another bug/problem). After disabling it, I tried your command

startxcfe4 &| tee this.log

and got this attachment.

I also tried to use gdb to xfce4 but this is a batch file, not an executable, so I was not able to get debug information this way.

Note: The system sound on my session where turned off after I disabled LighDM. Every other sound worked correctly. I think there's something in the log related to this, but just ignore that portion.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-17 10:45:44 UTC
> What do you mean to use the xfce4-settings version?

The version of installed xfce-base/xfce4-settings package.
Comment 10 jorge 2020-11-17 10:47:59 UTC
Oh yeah, sorry:

=================================================================
                        Package Settings
=================================================================

xfce-base/xfce4-settings-4.14.3::gentoo was built with the following:
USE="colord libcanberra libnotify upower xklavier" ABI_X86="(64)" INPUT_DEVICES="libinput"
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-17 11:01:46 UTC
Created attachment 671812 [details, diff]
testing patch

Ok, so it's:

    if (!gtk_init_check (&argc, &argv))
    {
        if (G_LIKELY (error))
        {
            g_printerr ("%s: %s.\n", G_LOG_DOMAIN, error->message);
            g_printerr (_("Type '%s --help' for usage."), G_LOG_DOMAIN);
            g_printerr ("\n");
            g_error_free (error);
        }
        else
        {
            g_error ("Unable to open display.");   // <-
        }

        return EXIT_FAILURE;
    }


It seems that the whole error checking logic here is a bit convoluted and broken.

Could you try rebuilding with the attached patch (put it into /etc/portage/xfce-base/xfce4-settings/), and see if it produces any better error message?
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-17 11:01:58 UTC
Also, is this a regression from the previous version or a new install?
Comment 13 jorge 2020-11-17 11:02:50 UTC
Have an interesting update:

I mentioned system sounds were off when lightdm was disabled. I wouldn't know how these two things are related but, when I got a look into a journal log when lightdm was indeed disabled, the coredump errors where gone. So:

1) Disable lightdm via: systemctl disable lightdm
2) Get into gui session via: startxfce4
3) The coredump errors are gone... so are the system sounds, e.g:

coredumpctl dump
           PID: 3969 (xfsettingsd)
           UID: 1000 (jorge)
           GID: 1000 (jorge)
        Signal: 5 (TRAP)
     Timestamp: Tue 2020-11-17 04:09:07 CST (51min ago)
  Command Line: xfsettingsd --display :0.0 --sm-client-id 2825c7735-637e-4d14-8238-ea73c75fca0b
    Executable: /usr/bin/xfsettingsd
 Control Group: /user.slice/user-1000.slice/session-c2.scope
          Unit: session-c2.scope
         Slice: user-1000.slice
       Session: c2
     Owner UID: 1000 (jorge)
       Boot ID: fd5443324c6d4038ac694df3ab5a8602
    Machine ID: 170173c64e6b37a0c863c41e5ee1a2ee
      Hostname: localhost
       Storage: /var/lib/systemd/coredump/core.xfsettingsd.1000.fd5443324c6d4038ac694df3ab5a8602.3969.1605607747000000.zst
       Message: Process 3969 (xfsettingsd) of user 1000 dumped core.
Refusing to dump core to tty (use shell redirection or specify --output).


the last coredump was almost an hour ago, when lightdm was still enabled as a service. How do we proceed?
Comment 14 jorge 2020-11-17 11:11:19 UTC
(In reply to Michał Górny from comment #12)
> Also, is this a regression from the previous version or a new install?

I always update using emerge. Would a new install mean un-emerging and emerging again? if so, then it's not a new install. Also, for the purposes of this debugging, I re-installed xfce4-settings (using the appropriate flags, changing the make.conf file) so that emerge would signal a reinstall (e.g. with [R] not [N] or [U]).
Comment 15 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-17 11:13:46 UTC
I was merely asking if you used the previous version before and it worked fine.
Comment 16 jorge 2020-11-17 11:15:48 UTC
(In reply to Michał Górny from comment #11)

> Could you try rebuilding with the attached patch (put it into
> /etc/portage/xfce-base/xfce4-settings/), and see if it produces any better
> error message?

Sure, no problem. But the directory /etc/portage/xfce-base/xfce4-settings/ is missing in my system :S
Comment 17 jorge 2020-11-17 11:19:45 UTC
(In reply to Michał Górny from comment #15)
> I was merely asking if you used the previous version before and it worked
> fine.

Oh, to be fair, I can't remember. I've had this problem long ago but I can't say for sure if this is a problem since this version. But I'll bet this problem was present even in previous versions.
Comment 18 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-17 11:23:18 UTC
(In reply to jorge from comment #16)
> (In reply to Michał Górny from comment #11)
> 
> > Could you try rebuilding with the attached patch (put it into
> > /etc/portage/xfce-base/xfce4-settings/), and see if it produces any better
> > error message?
> 
> Sure, no problem. But the directory /etc/portage/xfce-base/xfce4-settings/
> is missing in my system :S

Create it ;-).  mkdir -p.
Comment 19 jorge 2020-11-17 11:27:30 UTC
(In reply to Michał Górny from comment #18)
> (In reply to jorge from comment #16)
> > (In reply to Michał Górny from comment #11)
> > 
> > > Could you try rebuilding with the attached patch (put it into
> > > /etc/portage/xfce-base/xfce4-settings/), and see if it produces any better
> > > error message?
> > 
> > Sure, no problem. But the directory /etc/portage/xfce-base/xfce4-settings/
> > is missing in my system :S
> 
> Create it ;-).  mkdir -p.

Got it :) 

Should I save it as main.c?
Comment 20 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-17 12:59:43 UTC
(In reply to jorge from comment #19)
> (In reply to Michał Górny from comment #18)
> > (In reply to jorge from comment #16)
> > > (In reply to Michał Górny from comment #11)
> > > 
> > > > Could you try rebuilding with the attached patch (put it into
> > > > /etc/portage/xfce-base/xfce4-settings/), and see if it produces any better
> > > > error message?
> > > 
> > > Sure, no problem. But the directory /etc/portage/xfce-base/xfce4-settings/
> > > is missing in my system :S
> > 
> > Create it ;-).  mkdir -p.
> 
> Got it :) 
> 
> Should I save it as main.c?

No, as whatever.patch.
Comment 21 jorge 2020-11-17 13:55:30 UTC
Created attachment 671878 [details]
xfce4 log 2

This log after the patch.
Comment 22 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-17 14:02:19 UTC
(In reply to jorge from comment #21)
> Created attachment 671878 [details]
> xfce4 log 2
> 
> This log after the patch.

But xfsettingsd doesn't fail here, does it?  I think you need to play with lightdm a bit, I think it stores logs somewhere.
Comment 23 jorge 2020-11-17 14:18:23 UTC
(In reply to Michał Górny from comment #22)
> (In reply to jorge from comment #21)
> > Created attachment 671878 [details]
> > xfce4 log 2
> > 
> > This log after the patch.
> 
> But xfsettingsd doesn't fail here, does it?  

That's correct =(

> I think you need to play with
> lightdm a bit, I think it stores logs somewhere.

I have more log files ready...
Comment 24 jorge 2020-11-17 14:21:08 UTC
Created attachment 671887 [details]
autogenerated log

This file was created by changing the line

exec xfce4-session

to:

exec xfce4-session |& tee auto.log

in the file 

/etc/xdg/xfce4/xinitrc

so that I could circumvent having to shut off lightdm in order to start xfce4 from terminal manually.
Comment 25 jorge 2020-11-17 14:26:57 UTC
Created attachment 671890 [details]
lightdm log

This is the log generated automatically by lightdm stored in 

/var/log/lightdm/lightdm.log
Comment 26 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-17 14:47:32 UTC
I'm sorry but I have no clue how to help you.  The log clearly indicates that xfsettingsd keeps crashing and being restarted but it doesn't provide any tips why it's crashing, beyond some potential error with connecting to display.

You could try looking for help with Xfce upstream: https://www.xfce.org/community

You could also try some other display manager, to see if the problem isn't lightdm specific.  That said, I'm using lightdm (with autologin) and I haven't had any problems like that.

You could try creating a new user account and seeing if the user can start xfce sucessfully.
Comment 27 jorge 2020-11-17 15:08:34 UTC
A last resort... I remember following the instructions at:

https://wiki.gentoo.org/wiki/LightDM#LightDM_crashes_upon_first_login_if_hostname_changes_during_login

because lightdm would not start after the first login (I would have to enter the password twice for lightdm to "react" and let me in). So I reverted back to the unedited file (by commenting out the "hostname-mode=none" line), and the errors went away! but other one appeared... Take a look:

---------------------------------------------------------------------------
---------------------------------------------------------------------------
Reading symbols from /usr/sbin/lightdm-gtk-greeter...
(No debugging symbols found in /usr/sbin/lightdm-gtk-greeter)

warning: core file may not match specified executable file.
[New LWP 559]
[New LWP 583]
[New LWP 560]
[New LWP 585]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/sbin/lightdm-gtk-greeter'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f0573a67700 in cairo_surface_get_type () from /usr/lib64/libcairo.so.2
[Current thread is 1 (Thread 0x7f05701dd9c0 (LWP 559))]
(gdb) bt
#0  0x00007f0573a67700 in cairo_surface_get_type () at /usr/lib64/libcairo.so.2
#1  0x0000561211d0cf69 in greeter_background_save_xroot ()
#2  0x0000561211d07dbe in  ()
#3  0x00007f0573780136 in  () at /usr/lib64/libgobject-2.0.so.0
#4  0x00007f057379f91d in g_signal_emit_valist () at /usr/lib64/libgobject-2.0.so.0
#5  0x00007f057379fd47 in g_signal_emit () at /usr/lib64/libgobject-2.0.so.0
#6  0x00007f05736198c1 in handle_end_authentication (offset=0x7ffe9905c5f0, message_length=<optimized out>, message=<optimized out>, greeter=0x561212b9d620) at greeter.c:716
#7  handle_message (greeter=greeter@entry=0x561212b9d620, message=0x561212e76fe0 "", message_length=<optimized out>) at greeter.c:806
#8  0x00007f0573619a32 in from_server_cb (source=<optimized out>, condition=<optimized out>, data=0x561212b9d620) at greeter.c:920
#9  0x00007f05736868fd in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#10 0x00007f0573686cc8 in  () at /usr/lib64/libglib-2.0.so.0
#11 0x00007f0573686fb3 in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#12 0x00007f0573e7038d in gtk_main () at /usr/lib64/libgtk-3.so.0
#13 0x0000561211d04216 in main ()
-----------------------------------------------------------------------
-----------------------------------------------------------------------

One of the differences between this error and the last one is that this error only occurred "once" in the journalctl log while the first one had many instances of "coredumps". The other difference being that I have to manually log on twice =( 

Could this be related?
Comment 28 jorge 2020-11-17 15:15:12 UTC
I've recompiled lightdm-gtk-greeter to work correctly with bactracing:

--------------------------------------------------------------------
--------------------------------------------------------------------
Reading symbols from /usr/sbin/lightdm-gtk-greeter...

warning: core file may not match specified executable file.
[New LWP 558]
[New LWP 559]
[New LWP 582]
[New LWP 584]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/sbin/lightdm-gtk-greeter'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f8436bdf700 in cairo_surface_get_type () from /usr/lib64/libcairo.so.2
[Current thread is 1 (Thread 0x7f84333559c0 (LWP 558))]
(gdb) bt
#0  0x00007f8436bdf700 in cairo_surface_get_type () at /usr/lib64/libcairo.so.2
#1  0x000055821023bce0 in set_surface_as_root (surface=0x0, screen=0x558210d60040) at greeterbackground.c:1740
#2  greeter_background_save_xroot (background=<optimized out>) at greeterbackground.c:1104
#3  0x000055821023613e in start_session () at lightdm-gtk-greeter.c:2135
#4  0x00007f84368f8136 in  () at /usr/lib64/libgobject-2.0.so.0
#5  0x00007f843691791d in g_signal_emit_valist () at /usr/lib64/libgobject-2.0.so.0
#6  0x00007f8436917d47 in g_signal_emit () at /usr/lib64/libgobject-2.0.so.0
#7  0x00007f84367918c1 in handle_end_authentication (offset=0x7ffec3599b00, message_length=<optimized out>, message=<optimized out>, greeter=0x558210ee1620) at greeter.c:716
#8  handle_message (greeter=greeter@entry=0x558210ee1620, message=0x5582111bc3a0 "", message_length=<optimized out>) at greeter.c:806
#9  0x00007f8436791a32 in from_server_cb (source=<optimized out>, condition=<optimized out>, data=0x558210ee1620) at greeter.c:920
#10 0x00007f84367fe8fd in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#11 0x00007f84367fecc8 in  () at /usr/lib64/libglib-2.0.so.0
#12 0x00007f84367fefb3 in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#13 0x00007f8436fe838d in gtk_main () at /usr/lib64/libgtk-3.so.0
#14 0x0000558210234216 in main (argc=<optimized out>, argv=<optimized out>) at lightdm-gtk-greeter.c:3327
Comment 29 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-11-17 16:15:23 UTC
This one looks like a problem inside lightdm-gtk-greeter.  I wonder if there's anything special in your system that could cause so many weird issues.  Did you do anything uncommon, or maybe suffer some hardware failures, disk corruption, anything like that?
Comment 30 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2020-11-17 16:27:06 UTC
Can you please post the output of

  emerge --info lightdm-gtk-greeter

(preferrably as comment) to this bug?
Comment 31 jorge 2020-11-18 01:19:51 UTC
(In reply to Michał Górny from comment #29)
> This one looks like a problem inside lightdm-gtk-greeter.  I wonder if
> there's anything special in your system that could cause so many weird
> issues.  Did you do anything uncommon, or maybe suffer some hardware
> failures, disk corruption, anything like that?

Not that I remember... I have a spare CPU for this system though... I could try swapping that and see if it makes a difference. Only thing "special" in my system is that has dual monitor setup, other than that, it's hard to tell :S
Comment 32 jorge 2020-11-18 01:20:55 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #30)
> Can you please post the output of
> 
>   emerge --info lightdm-gtk-greeter
> 
> (preferrably as comment) to this bug?

Hi!, here's the full output:

Portage 3.0.8 (python 3.7.9-final-0, default/linux/amd64/17.1/desktop, gcc-9.3.0, glibc-2.32-r2, 5.4.72-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.4.72-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E3-1285_v4_@_3.50GHz-with-gentoo-2.7
KiB Mem:    32737716 total,  29622560 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Sun, 15 Nov 2020 16:00:01 +0000
Head commit of repository gentoo: cf9f180a59ff174f931cd487b1d0e2d6dc1641b5
sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p6) 2.34.0
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18-r4::gentoo, 3.7.9::gentoo, 3.8.5::gentoo, 3.9.0::gentoo
dev-util/cmake:           3.17.4-r1::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.34-r2::gentoo
sys-devel/gcc:            9.3.0-r1::gentoo
sys-devel/gcc-config:     2.3.2::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r2::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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"
CXXFLAGS="-march=native -O2 -ggdb"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS=" --jobs=8 --load-average=7.8"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -ggdb"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -ggdb"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo caps cdda cdr cli colord crypt cuda cups dbus djvu dri dts dvd dvdr encode eselect-ldso exif fftw flac fortran gallium gdbm gif gnome-keyring gphoto2 gpm gtk gui iconv icu ipv6 iwd jack jpeg jpeg2k latex lcms libglvnd libnotify libsamplerate libtirpc lzma lzo mad matroska mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl nvenc ogg opencl opengl openmp pam pango pcre pdf png policykit postscript ppds pulseaudio quicktime raw readline sdl seccomp spell split-usr ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb v4l vdpau vorbis wxwidgets x264 xattr xcb xml xv xvid zip zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda_intel ca0132" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en es la" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="nvidia intel iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

x11-misc/lightdm-gtk-greeter-2.0.7-r1::gentoo was built with the following:
USE="branding -appindicator" ABI_X86="(64)"
Comment 33 jorge 2020-11-24 13:27:16 UTC
I think I found the problem:

The lightdm service /lib/systemd/system/lightdm.service:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[Unit]
Description=Light Display Manager
Documentation=man:lightdm(1)
After=systemd-user-sessions.service

[Service]
ExecStart=/usr/sbin/lightdm
StandardOutput=syslog
Restart=always
IgnoreSIGPIPE=no
BusName=org.freedesktop.DisplayManager

[Install]
Alias=display-manager.service
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

has syslog as its default output/error logger. I do not have installed either app-admin/sysklogd, app-admin/syslog-ng or app-admin/metalog. As I have systemd, I am fine with only having journal. So, to solve this problem I had to change 

StandardOutput=syslog

to

StandardOutput=journal

And all errors (coredumps) went away. In my system, there are several other services that default to syslog, either in StandarOutput:

/lib/systemd/system/gpm.service
/lib/systemd/system/lightdm.service
/lib/systemd/system/smartd.service
/lib/systemd/system/rsyncd.service

or ins StandardError:

/lib/systemd/system/sshd@.service
/lib/systemd/system/rsyncd.service
/lib/systemd/system/git-daemon@.service

I've changed them all to journal. I think system updates will mess up with this unit files in the future so, maybe it's a good idea to create a USE flag "systemd" for lightdm an such as to prevent using syslog as the default logger?
Comment 34 jorge 2020-11-24 21:51:53 UTC
Sorry, the error returned. I did test it three times by restarting and none of the times did the error appeared, but now after an update the error came back.
Comment 35 Matthew Stoltenberg 2020-11-29 20:06:25 UTC
I was having the same error message until I changed the use flags of xfce-base/xfwm4 to remove xcomposite. I'm running with the nouveau driver. The really odd thing was that I could launch xfce with a new user but only once. The second time I logged in, the window mananger would silently quit and everything would fail.
Comment 36 jorge 2020-12-20 01:15:37 UTC
I did a fresh Gentoo install: formatting the drive, reinstalling all packages, carefully selecting the right profile and USE flags and now the problem is gone. It seems it was a configuration problem on my end. Sadly, I don't know what configuration was messing up the installation.