Bug 1469861 - Powerline is very slow on F26 even with powerline-daemon running
Powerline is very slow on F26 even with powerline-daemon running
Product: Fedora
Classification: Fedora
Component: powerline (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Andreas Schneider
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-07-11 23:01 EDT by Mike Goodwin
Modified: 2017-07-24 15:20 EDT (History)
1 user (show)

See Also:
Fixed In Version: powerline-2.6-2.fc26
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-07-24 15:20:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mike Goodwin 2017-07-11 23:01:58 EDT
Description of problem:

The execution of a new prompt (by say pressing enter) is very slow after upgrading to F26.

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


How reproducible:

Always, on all systems I upgraded to F26

Steps to Reproduce:
1. Use powerline on a F26 system
2. Hold enter at the command prompt 
3. Observe slow behavior compared with F25

Actual results:

Prompt is generated slowly, you can see a MUCH more pronounced effect on older slower systems. You can also see it hang slightly with set -x; <enter>

Expected results:

Since this is a regression, I would expect that it worked as quickly as before. 

Additional info:

I'd love to work with troubleshooting this with you, but I'm not really sure where to start. I'm pretty confident that you're going to see this behavior on any desktop environment and in any terminal, as I also tested it in a normal tty and it is also slow there.
Comment 1 Mike Goodwin 2017-07-12 15:00:02 EDT
See upstream bug here: https://github.com/powerline/powerline/issues/1800
Comment 2 Mike Goodwin 2017-07-12 17:58:43 EDT
Developer closed both bugs because it is apparently our fault for packaging the python version of the script as /usr/bin/powerline. 



file $(which powerline)
/usr/bin/powerline: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=04e4042f5650ff2b23f858862231a59472aeaddd, stripped


file $(which powerline)
/usr/bin/powerline: Python script, ASCII text executable

I suspect this unintentional and is some install time weirdness based on the way the developer decided to automatically choose which one would be build based on available dependencies, but I'll have to dive into the SPEC to say more. Get back when I can!
Comment 3 Mike Goodwin 2017-07-12 18:56:55 EDT
client/powerline.c: In function ‘main’:
client/powerline.c:125:36: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character
  snprintf(num_args, NUM_ARGS_SIZE, "%x", argc - 1);
In file included from /usr/include/stdio.h:939:0,
                 from client/powerline.c:4:
/usr/include/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 2 and 9 bytes into a destination of si
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
        __bos (__s), __fmt, __va_arg_pack ());
/tmp/ccKwNdgL.o: In function `main':
/builddir/build/BUILD/powerline-2.6/client/powerline.c:114: undefined reference to `true_sun_len'
collect2: error: ld returned 1 exit status
ERROR:root:Command '['cc', '-O2', '-g', '-pipe', '-Wall', '-Werror=format-security', '-Wp,-D_FORTIFY_SOURCE=2', '-fexcep
Traceback (most recent call last):
  File "setup.py", line 38, in <module>
  File "setup.py", line 35, in compile_client
    subprocess.check_call(compiler + shlex.split(cflags) + ['client/powerline.c', '-o', 'scripts/powerline'])
  File "/usr/lib64/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cc', '-O2', '-g', '-pipe', '-Wall', '-Werror=format-security', '-Wp,-D_FORTIFY
Compiling C version of powerline-client failed
Using powerline.py script instead of C version

This is why F25 and F26 differ. 

It seems that you found that out the hard way given that as I'm looking at the SPEC differences between F25 and F26, you added this:

+# As we only have python files do not create a debuginfo package
+%global debug_package %{nil}

And switch it to the `noarch` BuildArch. 

The way the comment is written, with the absence of info about this in the changelog leads me to believe you didn't realize that this was an automatic fallback because the C program failed to build, so that's why I'm documenting that here. Again, more info happening at github, too.
Comment 4 Fedora Update System 2017-07-13 11:07:22 EDT
powerline-2.6-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-222bbba94a
Comment 5 Fedora Update System 2017-07-14 18:55:02 EDT
powerline-2.6-2.fc26 has been pushed to the Fedora 26 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-222bbba94a
Comment 6 Fedora Update System 2017-07-24 15:20:26 EDT
powerline-2.6-2.fc26 has been pushed to the Fedora 26 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.