Page MenuHomeVyOS Platform

equuleus: `show version all` throws broken pipe exception on abort
Closed, ResolvedPublicBUG

Description

Aborting show version all with q before the list of packages are completed throws an Broken pipe exception.

vyos@runar-gw# run show ver all

Version:          VyOS 1.3-rolling-202007012118
Release Train:    equuleus

.....
ii  accel-ppp                        1.12.0-72-ged7b287                  amd64        PPtP/L2TP/PPPoE/SSTP server for Linux
ii  acpid                            1:2.0.31-1                          amd64        Advanced Configuration and Power Interface event daemon
ii  adduser                          3.118                               all          add and remove users and groups
ii  apt                              1.8.2.1                             amd64        commandline package manager
ii  apt-transport-https              1.8.2.1                             all          transitional package for https support
ii  apt-utils                        1.8.2.1                             amd64        package management related utility programs
.....
ii  debianutils                      4.8.6.1                             amd64        Miscellaneous utilities specific to Debian
ii  dialog                           1.3-20190211-1                      amd64        Displays user-friendly dialog boxes from shell scripts
ii  diffutils                        1:3.7-3                             amd64        File comparison utilities
ii  dirmngr                          2.2.12-1+deb10u1                    amd64        GNU privacy guard - network certificate management service
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/show_version.py", line 70, in <module>
    call("dpkg -l")
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 199, in call
    print(out)
BrokenPipeError: [Errno 32] Broken pipe
[edit]
vyos@runar-gw#

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.3-rolling-202007012118
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

A workaround

replace https://github.com/vyos/vyos-1x/blob/current/src/op_mode/show_version.py#L70
to

call("screen dpkg -l")

Other solution for cli

dpkg -l | tail -n 700
dpkg -l | cat

But it doesn't work for "show version all"

And final what can we do

show version all | no-more

It also do pipe "cat"

https://github.com/vyos/vyatta-op/blob/current/etc/bash_completion.d/vyatta-op#L490

Can't find a good solution how to fix this is limits.

PR https://github.com/vyos/vyos-1x/pull/542

vyos@r2-roll:~$ show version all
Package versions:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                 Version                             Architecture Description
+++-====================================-===================================-============-===============================================================================
ii  accel-ppp                            1.12.0-95-g59f8e1b                  amd64        PPtP/L2TP/PPPoE/SSTP server for Linux
ii  acpid                                1:2.0.31-1                          amd64        Advanced Configuration and Power Interface event daemon
ii  adduser                              3.118                               all          add and remove users and groups
ii  apt                                  1.8.2.1                             amd64        commandline package manager
ii  apt-transport-https                  1.8.2.1                             all          transitional package for https support
ii  apt-utils                            1.8.2.1                             amd64        package management related utility programs
...
ii  dctrl-tools                          2.24-3                              amd64        Command-line tools to process Debian package information
vyos@r2-roll:~$
Viacheslav changed the task status from Open to Backport candidate.Sep 23 2020, 12:32 PM
Viacheslav claimed this task.
erkin set Issue type to Bug (incorrect behavior).Aug 29 2021, 1:12 PM
erkin removed a subscriber: Active contributors.