Loading a high number of Onion V3 Descriptors trough Tor Control Port lead to sustained 100% CPU
Loading a high number of Onion V3 Descriptors trough Tor Control Port lead to sustained 100% CPU.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1516 debian-+ 20 0 136604 122136 8880 R 100.0 6.0 95:16.49 tor
This is a GlobaLeaks system, try.globaleaks.org that have more than 1200 evaluation whistleblowing sites.
Trying profiling with strace and ltrace gives those data, if could be interesting to diagnose what's the issue:
root@scw-nostalgic-stonebraker:/var/log# strace -f -c -p 1516 strace: Process 1516 attached strace: [ Process PID=1516 runs in x32 mode. ] strace: [ Process PID=1516 runs in 64 bit mode. ] ^Cstrace: Process 1516 detached % time seconds usecs/call calls errors syscall
100.00 0.008475 15 560 getpid 0.00 0.000000 0 36 read 0.00 0.000000 0 22 write 0.00 0.000000 0 1 close 0.00 0.000000 0 6 ioctl 0.00 0.000000 0 7 sendto 0.00 0.000000 0 6 getsockopt 0.00 0.000000 0 1 rename 0.00 0.000000 0 2 epoll_wait 0.00 0.000000 0 14 epoll_ctl 0.00 0.000000 0 1 openat 0.00 0.000000 0 64 getrandom
100.00 0.008475 720 total
root@scw-nostalgic-stonebraker:/var/log# ltrace -c -f -p 1516
^C% time seconds usecs/call calls function
25.29 2.614242 127 20496 strlen 24.99 2.583754 126 20489 free 24.93 2.577376 125 20496 memset 24.70 2.553016 124 20485 strchr 0.02 0.002249 173 13 gettimeofday 0.02 0.001980 94 21 time 0.01 0.001290 86 15 __vsnprintf_chk 0.01 0.000653 130 5 pthread_mutex_lock 0.01 0.000642 128 5 pthread_mutex_unlock 0.00 0.000494 82 6 strcasecmp 0.00 0.000494 98 5 __vasprintf_chk 0.00 0.000439 87 5 pthread_getspecific 0.00 0.000423 84 5 event_active 0.00 0.000420 84 5 malloc
100.00 10.337472 82051 total
Tor version 0.3.5.8-1 is stock on Ubuntu Bionic .