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

Jin Liu m.liu.jin at gmail.com
Tue Sep 22 23:57:33 PDT 2015


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:
<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".
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.
Reading symbols from /usr/lib/libglapi.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libXext.so.6...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libXdamage.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libXfixes.so.3...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libX11-xcb.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libX11.so.6...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libxcb-glx.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libxcb-dri2.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libxcb-dri3.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libxcb-present.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libxcb-randr.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libxcb-xfixes.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libxcb-render.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libxcb-shape.so.0...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libxcb-sync.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libxcb.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libXxf86vm.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/xorg/modules/drivers/intel_drv.so...(no
debugging symbols found)...done.
Reading symbols from /usr/lib/libdrm_intel.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libstdc++.so.6...done.
Reading symbols from /usr/lib/libgcc_s.so.1...done.
Reading symbols from /usr/lib/xorg/modules/input/evdev_drv.so...(no
debugging symbols found)...done.
Reading symbols from /usr/lib/libmtdev.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libevdev.so.2...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/xorg/modules/input/synaptics_drv.so...(no
debugging symbols found)...done.
Reading symbols from /usr/lib/xorg/modules/dri/i965_dri.so...(no debugging
symbols found)...done.
Reading symbols from /usr/lib/libdrm_nouveau.so.2...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libdrm_radeon.so.1...(no debugging symbols
found)...done.
0x00007f47ceec8e23 in select () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007f47ceec8e23 in select () from /usr/lib/libc.so.6
#1  0x000000000058f537 in WaitForSomething ()
#2  0x0000000000438be1 in ?? ()
#3  0x000000000043cf0b in ?? ()
#4  0x00007f47cee07610 in __libc_start_main () from /usr/lib/libc.so.6
#5  0x0000000000427319 in _start ()
(gdb) quit
A debugging session is active.

Inferior 1 [process 614] will be detached.

Quit anyway? (y or n) Y
Detaching from program: /usr/lib/xorg-server/Xorg, process 614
$ ls -l /proc/614/fd/6
lrwx------ 1 jin users 64 9月  23 14:23 /proc/614/fd/6 -> socket:[15637]
$ lsof +E -p 614 | grep 15637
dbus-daem  449 dbus   16u     unix 0xffff8800d8c4e300      0t0   14185
/run/dbus/system_bus_socket type=STREAM ->INO=15637 614,Xorg,6u
Xorg       614  jin    6u     unix 0xffff8800d8c4e680      0t0   15637
type=STREAM ->INO=14185 449,dbus-daem,16u


BTW, I run xorg from a user session, not the usual root.
My software versions:
  systemd / libsystemd 226
  dbus / libdbus 1.10.0-3
  xorg-server 1.17.2-4

On Wed, Sep 23, 2015 at 7:25 AM David Herrmann <dh.herrmann at gmail.com>
wrote:

> Hi
>
> On Tue, Sep 22, 2015 at 9:23 PM, Jin Liu <m.liu.jin at gmail.com> 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 at 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 <pid>" on the offending process or "perf top".
> Then try to figure out which function is spinning.
>
> Thanks
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150923/e287fd8f/attachment-0001.html>


More information about the systemd-devel mailing list