Bug 701131

Summary: 6.2 regression: no longed asks for --more--
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: readlineAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: c.david86, jan.kratochvil, lnykryn, mlichvar, pmuldoon, sergiodj, tromey
Target Milestone: ---Keywords: Regression, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: readline-6.2-4.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-11 16:31:54 UTC Type: ---
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
Add possibility to bypass RL_STATE_CALLBACK check
none
GDB patch to use RL_STATE_FEDORA_GDB. none

Description Jan Kratochvil 2011-05-01 12:42:34 UTC
Description of problem:
problem description + reproducer by hand + GDB testcase:
  [patch] testsuite: Test readline-6.2 "ask" regression
  http://sourceware.org/ml/gdb-patches/2011-05/msg00002.html
readline workaround:
  [patch 2/3] readline-6.2: Workaround "ask" regression
  http://sourceware.org/ml/gdb-patches/2011-05/msg00005.html

Version-Release number of selected component (if applicable):
readline-6.2-2.fc15.x86_64

How reproducible:
Always.

Steps to Reproduce:
$ gdb gdb
(gdb) p <tab><tab>

Actual results:
Display all 22129 possibilities? (y or n)
../../bfd/aout-target.h                                      cs_to_section
../../bfd/aout32.c                                           ctime
<screens and screens of dumps without any question>

Expected results:
Display all 21482 possibilities? (y or n)_

Additional info:

I see three ways how to solve it:

(1) Patch Fedora readline-6.2 by the workaround unconditionally.
    It may have readline regression for non-GDB apps:
    https://lists.gnu.org/archive/html/bug-readline/2011-04/msg00012.html
    That's a blocking read; it makes many multithreaded programs that use
    callback mode not useful.  (Especially window-based programs, which can't
    get the input they need to satisfy the request.)

(2) Patch Fedora readline-6.2 by the workaround only when the library is in use
    by GDB - using some variable flag activated by GDB Fedora-specific patch.

(3) Keep Fedore readline package as is and link patched readline into GDB
    statically until readline-7.0 gets released.

I would choose (3).

This is a Fedora 15 GDB regression.

Comment 1 Miroslav Lichvar 2011-05-02 12:00:42 UTC
If you feel comfortable with (3), please go ahead.

I think we could also extend the readline API to disable that part of the code.

Comment 2 Jan Kratochvil 2011-05-02 12:26:49 UTC
OK:
(3) Keep Fedore readline package as is and link patched readline into GDB
    statically until readline-7.0 gets released.

Comment 3 Fedora Update System 2011-05-02 14:28:08 UTC
gdb-7.2.90.20110429-36.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/gdb-7.2.90.20110429-36.fc15

Comment 4 Fedora Update System 2011-05-03 04:29:23 UTC
Package gdb-7.2.90.20110429-36.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gdb-7.2.90.20110429-36.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/gdb-7.2.90.20110429-36.fc15
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-05-10 03:32:42 UTC
gdb-7.2.90.20110429-36.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Jan Kratochvil 2012-01-08 10:29:55 UTC
Please discuss it at https://fedorahosted.org/fpc/ticket/129 whether (3) is appropriate.  FESCo says it probably is not.

Comment 7 Lukáš Nykrýn 2012-01-11 13:46:22 UTC
Created attachment 552121 [details]
Add possibility to bypass RL_STATE_CALLBACK check

If we are talking about temporary fix (and solution (1) probably is not completely correct), I would suggest to alter readline with this potential patch. In gdb then you can just call RL_SETSTATE(RL_STATE_FEDORA_GDB) and problem should disappear.

Comment 8 Jan Kratochvil 2012-01-11 14:30:50 UTC
Created attachment 552133 [details]
GDB patch to use RL_STATE_FEDORA_GDB.

Confirming it works as expected, thanks.  Please build new readline into Rawhide so I can build new patched gdb with it in the Koji buildroots.

Comment 9 Lukáš Nykrýn 2012-01-11 15:08:53 UTC
Fix committed to git -> http://lists.fedoraproject.org/pipermail/scm-commits/2012-January/703853.html -> modified 

And build should be done by now.

Comment 10 Jan Kratochvil 2012-01-11 16:31:54 UTC
It is now built also into gdb:
gdb-7.4.50.20120103-7.fc17