Ntpd update running 100% on Pi3

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Ntpd update running 100% on Pi3

Post by Fourdee »

gaffa wrote:Hi,

I just tried:

ntpq -pn
ntpq: read: Connection refused

Any help?

Garry
ntpd
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
gaffa
Posts: 18
Joined: Mon Jan 30, 2017 7:03 pm

Re: Ntpd update running 100% on Pi3

Post by gaffa »

Daniel,

I rebooted yesterday and it's been running fine since!!!!!

Garry

Spoke too soon, problem has returned!!!!!! After killing grep this is what htop says (See attachment)

Garry
Attachments
Screenshot 2017-03-23 at 5.49.45 PM.png
gaffa
Posts: 18
Joined: Mon Jan 30, 2017 7:03 pm

Re: Ntpd update running 100% on Pi3

Post by gaffa »

Hi,

any news on this?

Garry
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Ntpd update running 100% on Pi3

Post by Fourdee »

gaffa wrote:Hi,

any news on this?

Garry
Hi Garry,

Not sure yet, I've checked the source code and the only thing that would cause a hang is:

Code: Select all

cat /DietPi/dietpi.txt | grep -m1 '^ntpd_update_mode=' | sed 's/.*=//'
df -P | awk '{print $6}' | tail -n +2
grep -ci -m1 'dietpi_check_for_updates=1' /DietPi/dietpi.txt
sed -n 5p /DietPi/dietpi/.dietpi-sync_settings
All the other commands are launched as threads, leaving the script to continue and exit.

When the 100% CPU occurs, can you try running those commands locally, see if they also hang?


Also, lets check the contents of /etc/cron.daily/dietpi, just to make sure

Code: Select all

cat /etc/cron.daily/dietpi
Edit: Hunch it might be df -P if expected drive not attached at that time and systemd-automount is used, will hang command. We can check this. I'll need to see your /etc/fstab

Code: Select all

cat /etc/fstab
Either way, i'll remove that code from v148, no longer used.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
gaffa
Posts: 18
Joined: Mon Jan 30, 2017 7:03 pm

Re: Ntpd update running 100% on Pi3

Post by gaffa »

Hi Daniel,

This morning, see attachments
I'll try the commands manually later. Fstab is also attached.

Garry
Screenshot 2017-03-28 at 9.47.03 AM.png
Screenshot 2017-03-27 at 10.16.51 PM.png
gaffa
Posts: 18
Joined: Mon Jan 30, 2017 7:03 pm

Re: Ntpd update running 100% on Pi3

Post by gaffa »

sed -n 5p /DietPi/dietpi/.dietpi-sync_settings
Screenshot 2017-03-28 at 9.03.04 PM.png
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Ntpd update running 100% on Pi3

Post by Fourdee »

gaffa wrote:Hi Daniel,

This morning, see attachments
I'll try the commands manually later. Fstab is also attached.

Garry
Screenshot 2017-03-28 at 9.47.03 AM.png
Thanks Garry,

Pretty sure this is the failing command, did running this cause the 100% in the attached image?:

Code: Select all

grep -ci -m1 'dietpi_check_for_updates=1' /DietPi/dietpi.txt
Lets clean up your /etc/fstab /mnt/usb_x entries, they wont be helping system. Before we do that, I'll need to see the following:

Code: Select all

blkid
mount
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
gaffa
Posts: 18
Joined: Mon Jan 30, 2017 7:03 pm

Re: Ntpd update running 100% on Pi3

Post by gaffa »

Daniel,

running the command manually works!!!!
No hang.

root@Pi3:~# blkid
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="1623-A8B8" TYPE="vfat" PARTUUID="ee614650-01"
/dev/mmcblk0p2: UUID="c352383b-22f5-437e-a30a-74198bd98a55" TYPE="ext4" PARTUUID="ee614650-02"
/dev/sda1: UUID="ea8fe470-f3e6-4a1f-a79c-9559f5297169" TYPE="ext4" PARTLABEL="primary" PARTUUID="d71d3a0e-d82e-49e4-8d9f-2e0e8870c0c0"
/dev/mmcblk0: PTUUID="ee614650" PTTYPE="dos"
root@Pi3:~#

oot@Pi3:~# mount
/dev/sda1 on / type ext4 (rw,noatime,discard,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=437048k,nr_inodes=109262,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /mnt/usb_1 type autofs (rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /mnt/c352383b-22f5-437e-a30a-74198bd98a55 type autofs (rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /DietPi type tmpfs (rw,nosuid,nodev,noatime,size=10240k)
tmpfs on /var/log type tmpfs (rw,nosuid,nodev,noatime,size=20480k)
/dev/mmcblk0p2 on /mnt/c352383b-22f5-437e-a30a-74198bd98a55 type ext4 (rw,noatime,data=ordered)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mmcblk0p1 on /boot type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro,discard)
/dev/sda1 on /mnt/usb_1 type ext4 (rw,noatime,discard,data=ordered)
root@Pi3:~#



Fourdee wrote:
gaffa wrote:Hi Daniel,

This morning, see attachments
I'll try the commands manually later. Fstab is also attached.

Garry
Screenshot 2017-03-28 at 9.47.03 AM.png
Thanks Garry,

Pretty sure this is the failing command, did running this cause the 100% in the attached image?:

Code: Select all

grep -ci -m1 'dietpi_check_for_updates=1' /DietPi/dietpi.txt
Lets clean up your /etc/fstab /mnt/usb_x entries, they wont be helping system. Before we do that, I'll need to see the following:

Code: Select all

blkid
mount
gaffa
Posts: 18
Joined: Mon Jan 30, 2017 7:03 pm

Re: Ntpd update running 100% on Pi3

Post by gaffa »

Hi Daniel,

just now:
Screenshot 2017-03-31 at 11.29.10 AM.png
CPU is running at 75 degrees!

:cry: Garry
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Ntpd update running 100% on Pi3

Post by Fourdee »

gaffa wrote:running the command manually works!!!!
No hang.
Hi Garry,

Could indicate an issue with hardware (PSU/SD), or, other software causing system instability.
I have an official Pi3 PSU and am running off a USB stick from Sandisk.
Is RootFS transferred to USB disk? Or, running off SD card? Which brand SD card?
/dev/sda1: UUID="ea8fe470-f3e6-4a1f-a79c-9559f5297169" TYPE="ext4" PARTLABEL="primary" PARTUUID="d71d3a0e-d82e-49e4-8d9f-2e0e8870c0c0"
Ok, you can disable all /dev/sdX entries in /etc/fstab with a #, excluding /dev/sda1 (as its currently being used)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply