Bug 2219061 - [abrt] ntpsec: say(): ntpq:1893:<module>:BrokenPipeError: [Errno 32] Broken pipe
Summary: [abrt] ntpsec: say(): ntpq:1893:<module>:BrokenPipeError: [Errno 32] Broken pipe
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: ntpsec
Version: 38
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:b381f87ced145ceeba5e7a4db64...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-01 15:35 UTC by João Carlos Mendes Luís
Modified: 2023-07-18 19:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
File: open_fds (400 bytes, text/plain)
2023-07-01 15:35 UTC, João Carlos Mendes Luís
no flags Details
File: cpuinfo (2.51 KB, text/plain)
2023-07-01 15:35 UTC, João Carlos Mendes Luís
no flags Details
File: os_info (667 bytes, text/plain)
2023-07-01 15:35 UTC, João Carlos Mendes Luís
no flags Details
File: namespaces (171 bytes, text/plain)
2023-07-01 15:35 UTC, João Carlos Mendes Luís
no flags Details
File: environ (7.67 KB, text/plain)
2023-07-01 15:35 UTC, João Carlos Mendes Luís
no flags Details
File: mountinfo (10.68 KB, text/plain)
2023-07-01 15:35 UTC, João Carlos Mendes Luís
no flags Details
File: backtrace (3.89 KB, text/plain)
2023-07-01 15:35 UTC, João Carlos Mendes Luís
no flags Details

Description João Carlos Mendes Luís 2023-07-01 15:35:43 UTC
Version-Release number of selected component:
ntpsec-1.2.2-2.fc38

Additional info:
reporter:       libreport-2.17.10
cmdline:        /usr/bin/python3 -sP /sbin/ntpq -p 146.164.78.10
type:           Python3
exception_type: BrokenPipeError
cgroup:         0::/user.slice/user-40024.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-7a15451b-a842-48cf-99c2-75426900758d.scope
uid:            40024
package:        ntpsec-1.2.2-2.fc38
kernel:         6.3.6-200.fc38.x86_64
runlevel:       N 5
executable:     /sbin/ntpq
crash_function: say
interpreter:    python3-3.11.3-2.fc38.x86_64
reason:         ntpq:1893:<module>:BrokenPipeError: [Errno 32] Broken pipe

Truncated backtrace:
ntpq:1893:<module>:BrokenPipeError: [Errno 32] Broken pipe

Traceback (most recent call last):
  File "/sbin/ntpq", line 1884, in <module>
    interpreter.onecmd(interpreter.precmd(command))
  File "/usr/lib64/python3.11/cmd.py", line 217, in onecmd
    return func(arg)
           ^^^^^^^^^
  File "/sbin/ntpq", line 1200, in do_peers
    self.__dopeers(showall=True, mode="peers")
  File "/sbin/ntpq", line 263, in __dopeers
    self.say(report.summary(self.session.rstatus,
  File "/sbin/ntpq", line 161, in say
    sys.stdout.flush()    # In case we're piping the output
    ^^^^^^^^^^^^^^^^^^
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/sbin/ntpq", line 1893, in <module>
    sys.stderr.write("Bailing out...\n")
BrokenPipeError: [Errno 32] Broken pipe

Local variables in innermost frame:
__name__: '__main__'
__doc__: None
__package__: None
__loader__: <_frozen_importlib_external.SourceFileLoader object at 0x7fed08a17450>
__spec__: None
__annotations__: {}
__builtins__: <module 'builtins' (built-in)>
__file__: '/sbin/ntpq'
__cached__: None
print_function: _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 1048576)
division: _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 131072)
cmd: <module 'cmd' from '/usr/lib64/python3.11/cmd.py'>
getopt: <module 'getopt' from '/usr/lib64/python3.11/getopt.py'>
os: <module 'os' (frozen)>
re: <module 're' from '/usr/lib64/python3.11/re/__init__.py'>
resource: <module 'resource' from '/usr/lib64/python3.11/lib-dynload/resource.cpython-311-x86_64-linux-gnu.so'>
socket: <module 'socket' from '/usr/lib64/python3.11/socket.py'>
sys: <module 'sys' (built-in)>
time: <module 'time' (built-in)>
ntp: <module 'ntp' from '/usr/lib64/python3.11/site-packages/ntp/__init__.py'>
version: 'ntpsec-1.2.2'
OPT: 128
NO: 0
NTP_STR: 1
NTP_UINT: 2
NTP_INT: 3
NTP_ADD: 4
IP_VERSION: 5
NTP_ADP: 6
NTP_LFP: 7
NTP_MODE: 8
NTP_2BIT: 9
NTP_FLOAT: 10
NTP_UPTIME: 11
NTP_PACKETS: 12
Ntpq: <class '__main__.Ntpq'>
DEFHOST: 'localhost'
usage: "\nUSAGE: ntpq [-46dphinOV] [-c str] [-D lvl] [host ...]\n  Flg Arg Option-Name    Description\n   -4 no  ipv4            Force IPv4 DNS name resolution\n                                - prohibits the option 'ipv6'\n   -6 no  ipv6            Force IPv6 DNS name resolution\n                                - prohibits the option 'ipv4'\n   -a Num authentication  Enable authentication with the numbered key\n   -c Str command         Run a command and exit\n                                - may appear multiple times\n   -d no  debug-level     Increase output debug message level\n                                - may appear multiple times\n   -l Str logfile         Logs debug messages to the provided filename\n   -D Int set-debug-level Set the output debug message level\n                                - may appear multiple times\n   -h no  help            Print a usage message.\n   -p no  peers           Print a list of the peers\n   -n no  numeric         Numeric host addresses\n   -k Str keyfile         Specify a keyfile. ntpq will look in this file\n                          for the key specified with -a\n   -V opt version         Output version information and exit\n   -w no  wide            Enable wide display of addresses / hosts\n                          on a separate line\n   -W Num width           Force output width to this value instead of\n                          querying the terminal size\n   -u no  units           Display time with units.\n"
bin_ver: 'ntpsec-1.2.2'
options: [('-p', '')]
arguments: ['146.164.78.10']
progname: 'ntpq'
session: <ntp.packet.ControlSession object at 0x7fed08767c50>
interpreter: <__main__.Ntpq object at 0x7fed08767910>
keyid: None
keyfile: None
logfp: <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>
switch: '-p'
val: ''
token: '146.164.78.10'
ihost: ('146.164.78.10', <AddressFamily.AF_UNSPEC: 0>)
command: 'peers'

Comment 1 João Carlos Mendes Luís 2023-07-01 15:35:47 UTC
Created attachment 1973625 [details]
File: open_fds

Comment 2 João Carlos Mendes Luís 2023-07-01 15:35:48 UTC
Created attachment 1973626 [details]
File: cpuinfo

Comment 3 João Carlos Mendes Luís 2023-07-01 15:35:50 UTC
Created attachment 1973627 [details]
File: os_info

Comment 4 João Carlos Mendes Luís 2023-07-01 15:35:51 UTC
Created attachment 1973628 [details]
File: namespaces

Comment 5 João Carlos Mendes Luís 2023-07-01 15:35:53 UTC
Created attachment 1973629 [details]
File: environ

Comment 6 João Carlos Mendes Luís 2023-07-01 15:35:55 UTC
Created attachment 1973630 [details]
File: mountinfo

Comment 7 João Carlos Mendes Luís 2023-07-01 15:35:56 UTC
Created attachment 1973631 [details]
File: backtrace

Comment 8 Miroslav Lichvar 2023-07-12 12:34:34 UTC
Can you reproduce this crash? If I run "ntpq -p 146.164.78.10" in terminal, it cleanly exits with message "***Request timed out".

Comment 9 João Carlos Mendes Luís 2023-07-18 19:31:50 UTC
Hi,

  No, I cannot repeat.  And I do not get a timeout (anymore).  Probably a firewall limiting requests from Brasil.

  Indeed it's very suspect to get an error in stdout.flush, unless that was from a broken terminal output or some strange timeout.

  At that week I was trying many different setups and repeated queries just to discover lately that one of my internet providers (I have two for redundancy) had just blocked NTP and the other decided to tamper with NTP content (and with wrong time!).  Which one is most stupid, I don't know.  :-(

  The quick solution was to NTP from a VPN. And after some time the provider who blocked apparently had many user complaints and rolled back.  :-)

  Anyway, if there is no more useful info, please close the bug.

  Thanks for your attention!


Note You need to log in before you can comment on or make changes to this bug.