Bug 1071336

Summary: readline-6.3 is available
Product: [Fedora] Fedora Reporter: Upstream Release Monitoring <upstream-release-monitoring>
Component: readlineAssignee: Jan Chaloupka <jchaloup>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: c.david86, jan.kratochvil, jchaloup, jklimes, lnykryn
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-19 09:20:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
readline rebase
none
journalctl --boot for readline6.2
none
journalctl --boot for readline6.3 none

Description Upstream Release Monitoring 2014-02-28 14:21:05 UTC
Latest upstream release: 6.3
Current version/release in Fedora Rawhide: 6.2-8.fc21
URL: http://ftp.gnu.org/gnu/readline/

Please consult the package updates policy before you issue an update to a stable branch: https://fedoraproject.org/wiki/Updates_Policy

More information about the service that created this bug can be found at:
https://fedoraproject.org/wiki/Upstream_release_monitoring

Comment 1 Jan Chaloupka 2014-05-20 11:09:45 UTC
Created attachment 897534 [details]
readline rebase

After rebase of readline to 6.3 and updating, startx fails with xinit: connection to X server lost. Before update, startx works properly. After inspecting xorg-x11-xinit, xinit shutdowns xserver because of unproper run of /usr/bin/X (readlink to /usr/bin/Xorg). Cannot figure out what is happening inside of Xorg because I am unable to find the correct source file to trace.

rpm: readline-6.3-1.fc21.x86_64

Steps to reproduce:
1) install rpm
2) reboot

How reproducible: always

Tested on fedora 20 with rawhide packages for xorg-x11-xinit and xorg-x11-server-Xorg.

I recommend to clone of fedora20 in virtual machine and switch to multi-user level, i.e. systemctl set-default multi-user.target
Then to compare the output of startx with another instance of fedora with the readline.6.2.

The problem is for 100% in readline package. After comparing content of /lib64/libreadline.so.6.2 with the new one, new one contains addional functions, nothing removed. Would be very helpfull to detect the piece of a code that behaves differently.

Comment 2 Jan Chaloupka 2014-05-20 11:18:21 UTC
Hi, Peter,

can you help me with this problem? Or at least guide me to the correct source codes? I have downloaded xorg-x11-server-1.15.99.902-6.20140428.fc21.src.rpm. Found hw/xfree86 as the only folder containing Xorg binary. So I have change symlink of /usr/bin/X to this binary. By cannot find which source file contains main function where I can continue to trace.

Thanks
Jan

Comment 3 Peter Hutterer 2014-05-21 03:30:05 UTC
dix/main.c:dix_main() is the normal entry point. the directory structure is dix and mi for general server stuff, anything in hw is for specific versions (Xorg, Xnest, Xquartz are all different). the rest is mostly extension handling, so dix/main.c and dix/dispatch.c is probably where you need to get started.

not sure if this matters in this case but /usr/bin/Xorg is not a binary anymore but a shell script that calls the wrapper or directly into Xorg, depending on whether we need suid or not.

Comment 4 Jan Chaloupka 2014-05-23 11:43:31 UTC
Thanks, Peter.

After further inspections and analysis, x-server is shutdown because of client. Execution path:

/usr/bin/startx ->
/usr/bin/xinit (x-server and client are forked)->
/etc/X11/xinit/xinitrc (forked client and execve) ->
/etc/X11/xinit/Xclients (exec)->
/usr/bin/gnome-session.

"Somewhere" in gnome-session, "something" is not working propetly.
Package: gnome-session-3.10.1-2.fc20
File: gnome-session/main.c
Line: 367

367:dup2(journalfd, 1); returns,
368:dup2(journalfd, 2); does not returns (process killed?)

Well, with readline6.2, dup2(journalfd, 2) does not return anyway.

Comment 5 Jan Chaloupka 2014-05-23 12:15:03 UTC
Created attachment 898663 [details]
journalctl --boot for readline6.2

Comment 6 Jan Chaloupka 2014-05-23 12:17:12 UTC
Created attachment 898664 [details]
journalctl --boot for readline6.3

Attachments contains output from journalctl --boot -0|-1

Among others:
May 23 08:00:58 localhost.localdomain systemd[1]: Failed to start Security Auditing Service.
May 23 08:00:59 localhost.localdomain systemd[1]: Failed to start Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling.
May 23 08:05:18 localhost.localdomain abrtd[626]: Got signal 15, exiting
May 23 08:05:18 localhost.localdomain login[654]: pam_systemd(login:session): Failed to release session: Connection was disconnected before a reply was received
May 23 08:05:18 localhost.localdomain systemd[1]: Failed to mark scope session-2.scope as abandoned : Stale file handle
May 23 08:05:21 localhost.localdomain NetworkManager[699]: dbus_g_proxy_new_for_name: assertion 'connection != NULL' failed
May 23 08:05:21 localhost.localdomain NetworkManager[699]: <error> [1400846721.572655] [nm-dispatcher.c:301] _dispatcher_call(): could not get dispatcher proxy!

There are more stuff broken

Comment 7 Jirka Klimes 2014-06-06 11:04:34 UTC
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libreadline.so: undefined reference to `_rl_keyseq_timeout'
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libreadline.so: undefined reference to `_rl_show_mode_in_prompt'
collect2: error: ld returned 1 exit status

There is a problem with patch 0003-add-TTY-input-audit-support.patch. It removes
definitions from readline.c
int _rl_show_mode_in_prompt = 0;
and
int _rl_keyseq_timeout = 500;

The variables are declared as extern in rlprivate.h, so they have to be defined somewhere.

$ nm -D /usr/lib64/libreadline.so | grep _rl_show_mode_in_prompt
                 U _rl_show_mode_in_prompt
$ nm -D /usr/lib64/libreadline.so | grep _rl_keyseq_timeout
                 U _rl_keyseq_timeout

Comment 8 Fedora Admin XMLRPC Client 2014-06-17 06:30:50 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Jan Chaloupka 2014-06-19 07:35:05 UTC
Thanks, Jirka Klimes, works like a magic.