andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 39 forks source link

Closed Enki eats 100% cpu. #312

Closed vi closed 8 years ago

vi commented 8 years ago

(from fuzzyopen branch)

# strace -p 914 2>&1 | head -n 10
Process 914 attached - interrupt to quit
clock_gettime(CLOCK_MONOTONIC, {149090, 386481973}) = 0
poll([{fd=10, events=POLLIN}, {fd=8, events=POLLIN}], 2, -1) = 1 ([{fd=8, revents=POLLIN}])
clock_gettime(CLOCK_MONOTONIC, {149090, 386677944}) = 0
poll([{fd=10, events=POLLIN}, {fd=8, events=POLLIN}], 2, -1) = 1 ([{fd=8, revents=POLLIN}])
clock_gettime(CLOCK_MONOTONIC, {149090, 386823019}) = 0
poll([{fd=10, events=POLLIN}, {fd=8, events=POLLIN}], 2, -1) = 1 ([{fd=8, revents=POLLIN}])
clock_gettime(CLOCK_MONOTONIC, {149090, 386963006}) = 0
poll([{fd=10, events=POLLIN}, {fd=8, events=POLLIN}], 2, -1) = 1 ([{fd=8, revents=POLLIN}])
clock_gettime(CLOCK_MONOTONIC, {149090, 387103461}) = 0

# ls -l /proc/906/fd/10 
lrwx------ 1 mvp mvp 64 Sep 16 00:20 /proc/906/fd/10 -> anon_inode:[eventfd]

# strace -e '!poll,clock_gettime' -p 914 |& head -n 10
Process 914 attached - interrupt to quit
^C

(914 is Enki's thread that is stuck, 906 is main process PID)

There is no Enki window anywhere.

Update: it finally terminated by itself.

Still I don't think that closed Anki should keep CPU busy for minutes.

vi commented 8 years ago

Note: this may be related with triggering standby mode (i.e. a clock jump for Enki).

andreikop commented 8 years ago

Should be fine now. See the comments for #310