#1031557 uses a full CPU doing nothing in Wayland

#1031557#5
Date:
2023-02-18 16:16:27 UTC
From:
To:
It's been a long time since I used RPD and now when I start it up, it
eats up a whole CPU. The fans on my shiny new 12th gen intel Framework
CPU spin up like crazy and CPU temperature reaches 95C.

I'm not sure what is happening: nothing is going on in the UI. At
first I thought it was rendering thumbnails, but it not, the thumbs
are actually rendered already.

strace tells me the process is looping over something like this:

poll([{fd=4, events=POLLIN}, {fd=12, events=POLLIN}, {fd=76, events=POLLIN}, {fd=80, events=POLLIN}], 4, 0) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\5\0\0\0\0\0\0\0", 16)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
sendmsg(5, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\32\0\0\0\1\0\24\0,\0\0\0\0\0\0\0\0\0\0\0\32\0\0\0\t\0\30\0000\2\0\0"..., iov_len=76}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 76
poll([{fd=4, events=POLLIN}, {fd=12, events=POLLIN}, {fd=76, events=POLLIN}, {fd=80, events=POLLIN}], 4, 0) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\3\0\0\0\0\0\0\0", 16)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
futex(0x1eb0e70, FUTEX_WAKE_PRIVATE, 1) = 1
poll([{fd=4, events=POLLIN}, {fd=12, events=POLLIN}, {fd=76, events=POLLIN}, {fd=80, events=POLLIN}], 4, 0) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\5\0\0\0\0\0\0\0", 16)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
sendmsg(5, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\32\0\0\0\1\0\24\0,\0\0\0\0\0\0\0\0\0\0\0\32\0\0\0\t\0\30\0000\2\0\0"..., iov_len=76}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 76
poll([{fd=4, events=POLLIN}, {fd=12, events=POLLIN}, {fd=76, events=POLLIN}, {fd=80, events=POLLIN}], 4, 0) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\3\0\0\0\0\0\0\0", 16)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8

File descriptors 4 and 5 are:

lrwx------ 1 anarcat anarcat 64 2023-02-18 11:03 /proc/21490/fd/4 -> 'anon_inode:[eventfd]'
lrwx------ 1 anarcat anarcat 64 2023-02-18 11:03 /proc/21490/fd/5 -> 'socket:[174401]'

Inspecting the output of `sudo lsof -P -n` shows me that socket 174401
is a UNIX socket connected to another RPD thread that's called
WaylandEv[...?]:

COMMAND     PID   TID TASKCMD         USER   FD      TYPE             DEVICE  SIZE/OFF       NODE NAME
rapid-pho 21490 21503 WaylandEv    anarcat    5u     unix 0x00000000ce9ee8de       0t0     174401 type=STREAM (CONNECTED)

I've also ran out of 16GB of memory on this machine trying to run RPD
and Darktable in parallel, and also seen Sway crash.

It seems this thing really doesn't like to run under Wayland (or
Sway?)... This could also be a bug in python3-qt5 or Qt itself. It
could an instance of #996550 for example. Not sure.

a.

#1031557#10
Date:
2024-02-20 15:18:54 UTC
From:
To:
Hi,

I tried to reproduce this by runnung RPD after setting
QT_QPA_PLATFORM=wayland and performing some actions in the GUI, but
everything looks fine in top. I also downgraded to 0.9.33-1.1. I'll try
to get Sway running instead of Gnome and see if this makes a difference.

Regards,
Tino

#1031557#13
Date:
2024-02-20 15:18:54 UTC
From:
To:
Hi,

I tried to reproduce this by runnung RPD after setting
QT_QPA_PLATFORM=wayland and performing some actions in the GUI, but
everything looks fine in top. I also downgraded to 0.9.33-1.1. I'll try
to get Sway running instead of Gnome and see if this makes a difference.

Regards,
Tino

#1031557#18
Date:
2024-02-21 09:54:15 UTC
From:
To:
Hi Antoine,

is an NVidia GPU involved in your setup?

Regards,
Tino

#1031557#21
Date:
2024-02-21 09:54:15 UTC
From:
To:
Hi Antoine,

is an NVidia GPU involved in your setup?

Regards,
Tino

#1031557#26
Date:
2024-02-21 14:34:47 UTC
From:
To:
Hello!

Nvidia is not involved here.

I must admit I haven't seen this bug in a while, maybe it was a one-off
thing?

#1031557#31
Date:
2024-02-21 14:34:47 UTC
From:
To:
Hello!

Nvidia is not involved here.

I must admit I haven't seen this bug in a while, maybe it was a one-off
thing?

#1031557#34
Date:
2024-02-21 14:34:47 UTC
From:
To:
Hello!

Nvidia is not involved here.

I must admit I haven't seen this bug in a while, maybe it was a one-off
thing?