Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    cuau0 occasional stale lock on boot

    Scheduled Pinned Locked Moved Hardware
    3 Posts 3 Posters 456 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tedquade
      last edited by

      I have a serial GPS on cuau0 for NTP time keeping. Around 1 in 10 boots, I get no active peers on NTP status. In the past I would reboot the firewall and in the majority of cases the GPS would come up functioning. This has gone on for over two years of using pfSense on the same appliance.

      Today instead of rebooting, I ran cu from the command line (cu -l cuau0 -s 4800) and got a response that there was a stale lock on the port and got no data from the GPS.

      Seems to be a bit of a possible race condition where a lock is not removed in a timely manner during shutdown or the reboot process.

      Your thoughts on this matter.

      Ted Quade

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        That's possible though I would expect a reboot to clear it.

        I also wouldn't expect to be able to access the port if it's configured in ntp. When I have done this I had to disable the ntp gps setup to be able to access it with cu and check the output.

        Steve

        1 Reply Last reply Reply Quote 0
        • Dobby_D
          Dobby_
          last edited by

          I have a serial GPS on cuau0 for NTP time keeping.

          What device? cuau0, cuau1... is serial and cuaU0, cuaU1,... is USB, where it is connected to? What chip set (ublox,...)

          Around 1 in 10 boots, I get no active peers on
          NTP status.
          Sometimes I have ~12 satellites in waiting chain and
          5 till 8 in usage, but sometimes there is no connection.
          It is owed to the circumstance that the antenna (active)
          must be also good positioned to get a flavour connection and being able to reach many satellites.

          In the past I would reboot the firewall and in the
          majority of cases the GPS would come up functioning.

          You may be able to high up the delay time at the boot time too!

          This has gone on for over two years of using pfSense
          on the same appliance.

          Which hardware you are using?

          Today instead of rebooting, I ran cu from the command > line (cu -l cuau0 -s 4800) and got a response that there > was a stale lock on the port and got no data from the
          GPS.

          You may be able to use the console on two ways:

          • console ntpq > enter > PE > enter
          • cu -s 9600 -l /dev/cuaU1 or cu -s 9600 -l /dev/gps0

          to see the output.

          Seems to be a bit of a possible race condition where
          a lock is not removed in a timely manner during
          shutdown or the reboot process.

          The delay time might be tzhe right answer in your case.

          #~. @Dobby

          Turris Omnia - 4 Ports - 2 GB RAM / TurrisOS 7 Release (Btrfs)
          PC Engines APU4D4 - 4 Ports - 4 GB RAM / pfSense CE 2.7.2 Release (ZFS)
          PC Engines APU6B4 - 4 Ports - 4 GB RAM / pfSense+ (Plus) 24.03_1 Release (ZFS)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.