Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1033102: ntpsec: ntpq -c sysinfo fails with TypeError: 'int' object is not subscriptable

15 views
Skip to first unread message

Kevin Woldt

unread,
Mar 17, 2023, 7:30:04 AM3/17/23
to
Package: ntpsec
Version: 1.2.0+dfsg1-4
Severity: normal

To reproduce use a clean debian and install ntpsec. Run the daemon with
the default conf file. Afterwards run the command
$ ntpq -c sysinfo

Return code is 1 and the output is

associd=0 status=c016 leap_alarm, sync_unspec, 1 event, restart,
Traceback (most recent call last):
File "/usr/bin/ntpq", line 1774, in <module>
interpreter.onecmd(interpreter.precmd(command))
File "/usr/lib/python3.9/cmd.py", line 217, in onecmd
return func(arg)
File "/usr/bin/ntpq", line 1412, in do_sysinfo
self.collect_display(associd=0, variables=sysinfo, decodestatus=True)
File "/usr/bin/ntpq", line 444, in collect_display
if self.showhostnames[0]:
TypeError: 'int' object is not subscriptable



-- System Information:
Debian Release: 11.6
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-6-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages ntpsec depends on:
ii adduser 3.118
ii init-system-helpers 1.60
ii libbsd0 0.11.3-1
ii libc6 2.31-13+deb11u5
ii libcap2 1:2.44-1
ii libssl1.1 1.1.1n-0+deb11u4
ii lsb-base 11.1.0
ii netbase 6.3
ii python3 3.9.2-3
ii python3-ntp 1.2.0+dfsg1-4
ii tzdata 2021a-1+deb11u8

Versions of packages ntpsec recommends:
ii systemd 247.3-7+deb11u1

Versions of packages ntpsec suggests:
pn apparmor <none>
pn certbot <none>
pn ntpsec-doc <none>
pn ntpsec-ntpviz <none>

-- no debconf information

Kevin Woldt

unread,
Mar 17, 2023, 12:30:04 PM3/17/23
to
Ok, sorry for opening this bug. It is fixed upstream in version 1.2.1
(see commit
https://github.com/ntpsec/ntpsec/commit/2c771b33af3625f11af8a4f4b995b22d9eb15515)


Thank you,
Kevin Woldt

On Fr, 2023-03-17 at 11:21 +0000, Debian Bug Tracking System wrote:
> Thank you for filing a new Bug report with Debian.
>
> You can follow progress on this Bug here: 1033102:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033102.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due
> course.
>
> Your message has been sent to the package maintainer(s):
>  Richard Laager <rla...@debian.org>
>
> If you wish to submit further information on this problem, please
> send it to 103...@bugs.debian.org.
>
> Please do not send mail to ow...@bugs.debian.org unless you wish
> to report a problem with the Bug-tracking system.
>

Alex

unread,
Mar 26, 2023, 7:10:04 AM3/26/23
to
Package: ntpsec
Version: 1.2.0+dfsg1-4
Followup-For: Bug #1033102

I fixed the ntpq -c sysinfo fails with TypeError: 'int' object is not subscriptable problem my system.

Here comes the fix:

444c444
< if self.showhostnames[0]:
---
> if self.showhostnames:

Cheers
/alex

-- System Information:
Debian Release: 11.6
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-21-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ntpsec depends on:
ii adduser 3.118
ii init-system-helpers 1.60
ii libbsd0 0.11.3-1
ii libc6 2.31-13+deb11u5
ii libcap2 1:2.44-1
ii libssl1.1 1.1.1n-0+deb11u4
ii lsb-base 11.1.0
ii netbase 6.3
ii python3 3.9.2-3
ii python3-ntp 1.2.0+dfsg1-4
ii tzdata 2021a-1+deb11u9

Versions of packages ntpsec recommends:
ii cron [cron-daemon] 3.0pl1-137
ii systemd 247.3-7+deb11u1

Versions of packages ntpsec suggests:
ii apparmor 2.13.6-10
pn certbot <none>
pn ntpsec-doc <none>
pn ntpsec-ntpviz <none>

-- Configuration Files:
/etc/ntpsec/ntp.conf changed [not included]

-- no debconf information
0 new messages