Bug 1472421 - Busy loop (on syntax highlight?) after pasting a python script content
Busy loop (on syntax highlight?) after pasting a python script content
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: nano (Show other bugs)
25
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kamil Dudka
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-18 12:50 EDT by Milan Crha
Modified: 2017-07-25 17:28 EDT (History)
3 users (show)

See Also:
Fixed In Version: nano-2.6.1-2.fc25
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-25 17:28:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Savannah 50121 None None None 2017-07-19 09:58 EDT

  None (edit)
Description Milan Crha 2017-07-18 12:50:03 EDT
When I paste into nano this [1] script content from a web browser (firefox), then it begins with a busy loop. It recovers after ~5 seconds of a freeze, but I guess it would be good to let the upstream know and eventually fix that issue, because reopening the file after save is lightning fast, thus it has something to do with the paste/writing "input method".

Steps:
a) run gnome-terminal, then in it
b) nano /tmp/a.py
c) open [1] in firefox/web browser, then press Ctrl+A, Ctrl+Ins
d) switch back to gnome-terminal/nano (Alt+Tab), then press Shift+Ins

Observe high CPU usage for several seconds.

e) Ctrl+X, Y, Enter
f) nano /tmp/a.py

Observe no high CPU usage, the nano is lightning-fast opened instead.

This is with nano-2.6.1-1.fc25.x86_64.

The backtrace of nano in that particular state:


#0  0x00007fb5db258f10 in _dl_mcount_wrapper_check () from /lib64/libc.so.6
#1  0x00007fb5db1c04dc in mbrtowc () from /lib64/libc.so.6
#2  0x00007fb5db1ea1eb in build_wcs_buffer () from /lib64/libc.so.6
#3  0x00007fb5db1eb512 in re_string_reconstruct () from /lib64/libc.so.6
#4  0x00007fb5db1f67bb in re_search_internal () from /lib64/libc.so.6
#5  0x00007fb5db1fcc0d in regexec@@GLIBC_2.3.4 () from /lib64/libc.so.6
#6  0x00005588bf2fe1b5 in edit_draw (fileptr=fileptr@entry=0x5588bfc837d0, converted=converted@entry=0x5588bfc85780 "        if (val.errno == errno.ENOENT or # either kernel thread or process gone", line=line@entry=4, 
    start=start@entry=0) at winio.c:2400
#7  0x00005588bf2feb12 in update_line (fileptr=fileptr@entry=0x5588bfc837d0, index=0) at winio.c:2695
#8  0x00005588bf2ff2c8 in edit_refresh () at winio.c:2951
#9  0x00005588bf2ef075 in do_input (allow_funcs=<optimized out>) at nano.c:1703
#10 0x00005588bf2dd75a in main (argc=2, argv=0x7ffcbd90cc68) at nano.c:2653

[1] https://raw.githubusercontent.com/pixelb/ps_mem/master/ps_mem.py
Comment 1 Kamil Dudka 2017-07-19 09:58:03 EDT
Thank you for reporting the bug!  It seems to be fixed by the following commit:

http://git.savannah.gnu.org/cgit/nano.git/commit/?id=v2.7.5~28
Comment 2 Fedora Update System 2017-07-19 10:29:22 EDT
nano-2.6.1-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6a46f7bc9b
Comment 3 Milan Crha 2017-07-19 11:02:59 EDT
(In reply to Kamil Dudka from comment #1)
>It seems to be fixed by the following commit:

Thanks. I can confirm that that change really fixes the behaviour described in comment #0.
Comment 4 Fedora Update System 2017-07-20 02:53:47 EDT
nano-2.6.1-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6a46f7bc9b
Comment 5 Fedora Update System 2017-07-25 17:28:20 EDT
nano-2.6.1-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.