Bug 1300513

Summary: readline slow to accept new characters when pasting input
Product: Red Hat Enterprise Linux 7 Reporter: Daniel Villeneuve <dvilleneuve>
Component: readlineAssignee: Siteshwar Vashisht <svashisht>
Status: CLOSED ERRATA QA Contact: Jan Houska <jhouska>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: isenfeld
Target Milestone: rcKeywords: EasyFix, FastFix, Patch
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: readline-6.2-10.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 20:33:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Makefile + slow-readline.c to demonstrate slow readline behavior
none
readline62-003 none

Description Daniel Villeneuve 2016-01-21 03:40:50 UTC
Created attachment 1116776 [details]
Makefile + slow-readline.c to demonstrate slow readline behavior

Description of problem:  when using readline to read lines in an application, the behavior is exceedingly slow when pasting text using the mouse


Version-Release number of selected component (if applicable): 6.2


How reproducible: compile the small program attached, run it, type in some lines followed by newlines, use Ctrl-p to recuperate past lines (this should be fast), then type a long line and <newline>, then cut-and-paste that line using the mouse (this should be slow).


Steps to Reproduce:
0. cd /tmp && tar jxf slow-readline.tar.bz2 && cd slow-readline
1. make
2. ./slow-readline
3. follow instructions in preceding paragraph

Actual results:
- fast with Ctrl-p
- slow with mouse pasting


Expected results:
- fast with Ctrl-p and with mouse pasting (as in bash, for example)


Additional info:

Comment 1 Daniel Villeneuve 2016-01-21 03:42:18 UTC
One possible solution could be to check/apply the following patch:

ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-003

Comment 3 Daniel Villeneuve 2016-08-11 18:08:11 UTC
The problem is still there with the latest RH7.2 updates.

uname -a

Linux XXXX 3.10.0-327.28.2.el7.x86_64 #1 SMP Mon Jun 27 14:48:28 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

rpm -qa|grep readline

readline-devel-6.2-9.el7.x86_64
readline-6.2-9.el7.x86_64
readline-6.2-9.el7.i686

Comment 4 Siteshwar Vashisht 2017-01-31 14:31:24 UTC
Created attachment 1246267 [details]
readline62-003

Comment 5 Siteshwar Vashisht 2017-01-31 14:32:07 UTC
Patch in comment 4 fixes the issue in RHEL

Comment 9 Jan Houska 2017-03-30 13:09:48 UTC
Verified,

OLD FAIL  the insertion was slow, the text appeared slowly - letter by letter. 
NEW PASS  the insertion was fast, whole line just appear at once.

Comment 10 errata-xmlrpc 2017-08-01 20:33:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1943