Re: [systemd-devel] xorg uses 100% CPU after upgrading to 226

2015-09-28 Thread David Herrmann
Hi

On Mon, Sep 28, 2015 at 4:56 AM, Jin Liu  wrote:
[...]
> I tried to start X the usual way - as root, via sddm display manager. It
> works fine. Seems the problem only happens when X is running as normal user.
> Any directions to investigate?

TBH, it sounds like an Xorg problem. Sure, it might be triggered by a
slightly different DBus behavior on the systemd side, but that doesn't
necessarily mean it's a bug in systemd. I have no idea why your
Xserver loops, I don't know the codebase very well.

It looks like your xserver never dispatches the DBus FD, but I cannot
tell you why.

David
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] xorg uses 100% CPU after upgrading to 226

2015-09-27 Thread Jin Liu
On Wed, Sep 23, 2015 at 2:57 PM Jin Liu  wrote:

> According to strace -p, xorg is spinning on a select(), which always
> return the same fd #6, which seems related to the system dbus:
>
>
> $ pgrep Xorg
> 614
> $ strace -p 614
> Process 614 attached
> select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL,
> {214, 537000}) = 1 (in [6], left {214, 536993})
> select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL,
> {214, 537000}) = 1 (in [6], left {214, 536995})
> select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL,
> {214, 537000}) = 1 (in [6], left {214, 536995})
> select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL,
> {214, 537000}) = 1 (in [6], left {214, 536995})
> select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL,
> {214, 537000}) = 1 (in [6], left {214, 536996})
> select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL,
> {214, 536000}) = 1 (in [6], left {214, 535996})
> select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL,
> {214, 536000}) = 1 (in [6], left {214, 535996})
> ^C
> $ gdb -p 614
> GNU gdb (GDB) 7.10
> Copyright (C) 2015 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-unknown-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> .
> Find the GDB manual and other documentation resources online at:
> .
> For help, type "help".
> Type "apropos word" to search for commands related to "word".
> Attaching to process 614
> Reading symbols from /usr/lib/xorg-server/Xorg...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libdbus-1.so.3...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libudev.so.1...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libgcrypt.so.20...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libdl.so.2...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libunwind.so.8...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libpciaccess.so.0...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libdrm.so.2...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libpixman-1.so.0...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libXfont.so.1...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libXau.so.6...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libsystemd.so.0...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libxshmfence.so.1...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libXdmcp.so.6...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libm.so.6...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libc.so.6...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libpthread.so.0...(no debugging symbols
> found)...done.
> [New LWP 980]
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/usr/lib/libthread_db.so.1".
> Reading symbols from /usr/lib/librt.so.1...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libresolv.so.2...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libcap.so.2...(no debugging symbols
> found)...done.
> Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libgpg-error.so.0...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/liblzma.so.5...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libfreetype.so.6...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libz.so.1...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libfontenc.so.1...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/liblz4.so.1...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libattr.so.1...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libbz2.so.1.0...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libpng16.so.16...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libharfbuzz.so.0...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libglib-2.0.so.0...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libgraphite2.so.3...(no debugging symbols
> found)...done.
> Reading symbols from /usr/lib/libpcre.so.1...(no debugging symbols
> found)...don

Re: [systemd-devel] xorg uses 100% CPU after upgrading to 226

2015-09-22 Thread Jin Liu
According to strace -p, xorg is spinning on a select(), which always return
the same fd #6, which seems related to the system dbus:


$ pgrep Xorg
614
$ strace -p 614
Process 614 attached
select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL, {214,
537000}) = 1 (in [6], left {214, 536993})
select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL, {214,
537000}) = 1 (in [6], left {214, 536995})
select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL, {214,
537000}) = 1 (in [6], left {214, 536995})
select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL, {214,
537000}) = 1 (in [6], left {214, 536995})
select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL, {214,
537000}) = 1 (in [6], left {214, 536996})
select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL, {214,
536000}) = 1 (in [6], left {214, 535996})
select(256, [1 3 5 6 8 10 19 23 25 29 36 37 38 39 40 41], NULL, NULL, {214,
536000}) = 1 (in [6], left {214, 535996})
^C
$ gdb -p 614
GNU gdb (GDB) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 614
Reading symbols from /usr/lib/xorg-server/Xorg...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libdbus-1.so.3...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libudev.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libgcrypt.so.20...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libdl.so.2...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libunwind.so.8...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libpciaccess.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libdrm.so.2...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libpixman-1.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libXfont.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libXau.so.6...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libsystemd.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libxshmfence.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libXdmcp.so.6...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libm.so.6...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libc.so.6...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libpthread.so.0...(no debugging symbols
found)...done.
[New LWP 980]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Reading symbols from /usr/lib/librt.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libresolv.so.2...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libcap.so.2...(no debugging symbols
found)...done.
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libgpg-error.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/liblzma.so.5...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libfreetype.so.6...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libz.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libfontenc.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/liblz4.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libattr.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libbz2.so.1.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libpng16.so.16...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libharfbuzz.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libglib-2.0.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libgraphite2.so.3...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libpcre.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/xorg/modules/extensions/libglx.so...(no
debugging symbols found)...done.
Reading symbols from /usr/lib/libGL.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libexpat.so.1...(no debugging symbols
found)...done.

Re: [systemd-devel] xorg uses 100% CPU after upgrading to 226

2015-09-22 Thread David Herrmann
Hi

On Tue, Sep 22, 2015 at 9:23 PM, Jin Liu  wrote:
> After upgrading to 226, the Xorg process keeps using 100% CPU. Also, the
> "xrandr --dpi 168" command in my .xinitrc no longer works.
>
> My startx.service and .xinitrc:
>
> $ systemctl cat startx.service
> # /etc/systemd/system/startx.service
> [Unit]
> Description=Direct X login
> After=systemd-user-sessions.service
> Conflicts=getty@tty1.service
>
> [Service]
> User=jin
> TTYPath=/dev/tty1
> PAMName=login
> Environment=DISPLAY=:0
> ExecStart=/usr/bin/bash --login -c "cd; (/usr/lib/xorg-server/Xorg -nolisten
> tcp vt1 &); source .xinitrc"
>
> [Install]
> WantedBy=graphical.target
> $ cat .xinitrc
> #!/bin/sh
> #
> # ~/.xinitrc
> #
> # Executed by startx (run your window manager from here)
>
> export DESKTOP_SESSION="plasma"
>
> if [ -d /etc/X11/xinit/xinitrc.d ]; then
>  for f in /etc/X11/xinit/xinitrc.d/*; do
>[ -x "$f" ] && . "$f"
>  done
>  unset f
> fi
>
> xrandr --dpi 168
>
> exec /usr/bin/startkde
>
> $
>
> BTW, if I move the "xrandr --dpi 168" line into /usr/bin/startkde, it works
> again (only DPI setting. Xorg still uses 100% CPU).
>
> What change in version 226 could cause the above problem, and how should I
> change the above files to fix it? Thanks.

Please run "strace -p " on the offending process or "perf top".
Then try to figure out which function is spinning.

Thanks
David
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] xorg uses 100% CPU after upgrading to 226

2015-09-22 Thread Jin Liu
After upgrading to 226, the Xorg process keeps using 100% CPU. Also, the
"xrandr --dpi 168" command in my .xinitrc no longer works.

My startx.service and .xinitrc:

$ systemctl cat startx.service
# /etc/systemd/system/startx.service
[Unit]
Description=Direct X login
After=systemd-user-sessions.service
Conflicts=getty@tty1.service

[Service]
User=jin
TTYPath=/dev/tty1
PAMName=login
Environment=DISPLAY=:0
ExecStart=/usr/bin/bash --login -c "cd; (/usr/lib/xorg-server/Xorg
-nolisten tcp vt1 &); source .xinitrc"

[Install]
WantedBy=graphical.target
$ cat .xinitrc
#!/bin/sh

#

# ~/.xinitrc

#

# Executed by startx (run your window manager from here)

export DESKTOP_SESSION="plasma"

if [ -d /etc/X11/xinit/xinitrc.d ]; then
 for f in /etc/X11/xinit/xinitrc.d/*; do
   [ -x "$f" ] && . "$f"
 done
 unset f
fi

xrandr --dpi 168

exec /usr/bin/startkde

$

BTW, if I move the "xrandr --dpi 168" line into /usr/bin/startkde, it works
again (only DPI setting. Xorg still uses 100% CPU).

What change in version 226 could cause the above problem, and how should I
change the above files to fix it? Thanks.

Regards,

Jin Liu
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel