selenium-ide
selenium-ide copied to clipboard
Heavy CPU usage on new tab in Chrome
🐛 Bug Report
When a new tab is opened on the Chrome browser with selenium ide extension, the CPU usage of chrome remains at a high level. Close the new tab, or enter url in address bar to visit the web page, the CPU usage will drop.
To Reproduce
Steps to reproduce the behavior:
- Click "+" to open a new tab.
- Wait some second and watch CPU usage.
Expected behavior
CPU usage will not increase significantly
Environment
OS: macOS 10.15.7 Selenium IDE Version: 3.17.0 Browser: Chrome Browser Version: 89.0.4389.82
Noticed this bug under Chrome 89.0.4389.114 on Linux Mint 20 -- single CPU core is pegged to 100 percent when Selenium IDE is open and a new tab is opened.
I attached strace to the process; this was a snippet of the output:
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=27, events=POLLIN}, {fd=30, events=POLLIN}, {fd=127, events=POLLIN}], 5, 0) = 0 (Timeout)
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
write(29, "\0", 1) = 1
write(29, "\0", 1) = 1
write(29, "\0", 1) = 1
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=27, events=POLLIN}, {fd=30, events=POLLIN}, {fd=127, events=POLLIN}], 5, 0) = 0 (Timeout)
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=27, events=POLLIN}, {fd=30, events=POLLIN}, {fd=127, events=POLLIN}], 5, 0) = 0 (Timeout)
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=27, events=POLLIN}, {fd=30, events=POLLIN}, {fd=127, events=POLLIN}], 5, 0) = 0 (Timeout)
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
write(29, "\0", 1) = 1
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=27, events=POLLIN}, {fd=30, events=POLLIN}, {fd=127, events=POLLIN}], 5, 0) = 0 (Timeout)
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
write(29, "\0", 1) = 1
write(29, "\0", 1) = 1
write(29, "\0", 1) = 1
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=27, events=POLLIN}, {fd=30, events=POLLIN}, {fd=127, events=POLLIN}], 5, 0) = 0 (Timeout)
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
write(29, "\0", 1) = 1
write(29, "\0", 1) = 1
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=27, events=POLLIN}, {fd=30, events=POLLIN}, {fd=127, events=POLLIN}], 5, 0) = 0 (Timeout)
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=27, events=POLLIN}, {fd=30, events=POLLIN}, {fd=127, events=POLLIN}], 5, 0) = 0 (Timeout)
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(27, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(30, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
File descriptor 27 refers to some socket: 27 -> socket:[15993600]
Same with file descriptor 30: 30 -> socket:[15993601]
Socket is being used for some Chrome ipc related things, it seems:
chrome 2471833 timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471840 sandbox_i timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471848 chrome timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471849 HangWatch timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471850 ThreadPoo timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471853 Chrome_IO timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471854 MemoryInf timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471855 gmain timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471856 gdbus timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471857 Bluez\x20 timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471858 CrShutdow timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471859 dconf\x20 timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471862 inotify_r timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471863 Composito timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471864 VideoCapt timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471865 BrowserWa timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471866 ThreadPoo timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471867 gpu-proce timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471868 CacheThre timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471870 utility_c timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471872 ThreadPoo timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471913 renderer_ timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2471990 extension timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2472004 BatterySt timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2509747 ThreadPoo timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2519014 ThreadPoo timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2529875 ThreadPoo timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
chrome 2471833 2529897 ThreadPoo timothy 27u unix 0x000000005f37aa44 0t0 15993600 type=STREAM
Hope this helps y'all debug things; I don't know the internals of the Chrome project at all.
Let me know if there's any progress made towards a fix. Thanks!
i can confirm this is still happening. once removed cpu load turns back to normal.
I believe I'm experiencing this on MacOS as well. I disabled the extension and my computer actually nets battery charge on low-power chargers now.
Also experiencing this. MacOS Catalina 10.15.7
This is not a full on outage or usage blocker, so it won't get resolved in v3. We're working hard on v4 however, which will have the benefit of being targetted only at electron instead of multiple browsers. Once we get there, we'll be able to actually target performance all the way down without hitting any unknown unknowns.
Thanks @toddtarsi. Is there a development Roadmap? From what you wrote it seems like the IDE is going to be electron-based? I'm new to the Selenium Ecosystem so am not sure what resources are out there for me to look at other than the docs.
@chaseTfreeman - I've gotten this question before. There isn't a development roadmap, but the plan I'm operating under is to have a beta in April. As a result, the only things I'm giving attention to in v3 are total deal breakers.
The closest thing to one is this project tracker, but it is QUITE out of date
Still having the problem on Ubuntu 20.04.1 with Chrome 103.0.5060.53 and Selenium IDE 3.17.2
Easily shown with Chrome Task explorer (SHIFT+ESC)
Note that killing the sub-process "https://google.com" that is attached to the new "empty" tab (and also uses 50% CPU) makes the CPU usage on Selenium IDE Extension go back to 0.
PS : Same screenshot, a few seconds after. Notice the increase in allocated memory... Still increasing. Above 1GB after 1min...
Not an issue in v4 where we're running as a standalone binary
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.