What we could do is calculate the number of expected records, then
decrement as each one is processed. If the counter is non-zero after
exiting the loop then the memory must be corrupt.

In theory this should work, but I'll have to think through if it could
generate false positives.

-tk

On Sun, Aug 2, 2026 at 8:28 PM John Smith <[email protected]> wrote:

> This comes up so often and I never can figure out what you're looking at
>
>
> There is usually some common things like the pages thing Tom pointed out
> and I think it mostly happens when there is an issue with power to the
> console, or at least that's when it happened to me a few years ago, after
> that I put my console on a UPS and it hasn't re-occurred.
>
> Is it possible (or reasonable) to log something showing it walking through
>> the pages ?
>
>
> +1 and as an added bonus it may reduce emails to the list if it people
> could follow a link for self help, instead of cryptic exceptions that are
> meaningless to non-programmers
>
> On Mon, 3 Aug 2026 at 09:19, Vince Skahan <[email protected]> wrote:
>
>> Tom can you describe what does a 'normal' not-corrupted setup look like ?
>>   This comes up so often and I never can figure out what you're looking at
>> and how to quantify abnormal vs. normal.
>>
>> Is it possible (or reasonable) to log something showing it walking
>> through the pages ?
>>
>> On Sunday, August 2, 2026 at 3:40:49 PM UTC-7 Tom Keffer wrote:
>>
>>> These are classical symptoms of corrupt memory in the logger. The
>>> giveaway is the log entry that says there are 9 pages to be retrieved, but
>>> the first page already shows descending timestamps.
>>>
>>> To fix, see the section *Corrupt memory
>>> <https://github.com/weewx/weewx/wiki/Troubleshooting-the-Davis-Vantage-station#corrupt-station-memory>*
>>>  in
>>> the wiki.
>>>
>>> On Sun, Aug 2, 2026 at 1:21 PM 'Andy Thompson' via weewx-user <
>>> [email protected]> wrote:
>>>
>>>> I am currently getting a vantage driver error in Weewx that is stopping
>>>> the show. I have a Vantage Pro 2, running a rasberri pi 3. Brand new
>>>> install of Weewx.
>>>> andyt1424@ThompsonFarms:~ $ cd /etc/weewx
>>>> andyt1424@ThompsonFarms:/etc/weewx $ sudo nano weewx.conf
>>>> andyt1424@ThompsonFarms:/etc/weewx $ sudo systemctl stop weewx
>>>> andyt1424@ThompsonFarms:/etc/weewx $ sudo journalctl -u weewx -f
>>>> Aug 02 14:51:20 ThompsonFarms weewxd[663]: INFO weewx.manager: Daily
>>>> summaries up to date
>>>> Aug 02 14:51:22 ThompsonFarms weewxd[663]: INFO weewx.engine: Starting
>>>> main packet loop.
>>>> Aug 02 14:51:34 ThompsonFarms weewxd[663]: ERROR weewx.drivers.vantage:
>>>> LOOP batch try #1; error: Expected to read 99 chars; got 0 instead
>>>> Aug 02 14:58:54 ThompsonFarms systemd[1]: Stopping weewx.service -
>>>> WeeWX...
>>>> Aug 02 14:58:54 ThompsonFarms weewxd[663]: INFO __main__: Received
>>>> signal TERM (15).
>>>> Aug 02 14:58:54 ThompsonFarms weewxd[663]: INFO weewx.engine: Main loop
>>>> exiting. Shutting engine down.
>>>> Aug 02 14:58:55 ThompsonFarms weewxd[663]: INFO __main__: Terminating
>>>> weewx version 5.4.0
>>>> Aug 02 14:58:55 ThompsonFarms systemd[1]: weewx.service: Deactivated
>>>> successfully.
>>>> Aug 02 14:58:55 ThompsonFarms systemd[1]: Stopped weewx.service - WeeWX.
>>>> Aug 02 14:58:55 ThompsonFarms systemd[1]: weewx.service: Consumed
>>>> 4.827s CPU time.
>>>> Aug 02 15:01:40 ThompsonFarms systemd[1]: Started weewx.service - WeeWX.
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: Initializing
>>>> weewxd version 5.4.0
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: Command
>>>> line: /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: Using
>>>> Python: 3.11.2 (main, May 12 2026, 05:17:27) [GCC 12.2.0]
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: Located at:
>>>>   /usr/bin/python3
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: Platform:
>>>>   Linux-6.12.96+rpt-rpi-v7-armv7l-with-glibc2.36
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: Locale:
>>>>   'en_US'
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: Entry path:
>>>>   /usr/share/weewx/weewxd.py
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: WEEWX_ROOT:
>>>>   /etc/weewx
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: Config file:
>>>>  /etc/weewx/weewx.conf
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: User module:
>>>>  /etc/weewx/bin/user
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: Debug:
>>>>  1
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: User:
>>>>   weewx
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: Group:
>>>>  weewx
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO __main__: Groups:
>>>>   dialout weewx
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG __main__:
>>>> loop_on_init: False
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG __main__:
>>>> Initializing engine
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO weewx.engine: Loading
>>>> station type Vantage (weewx.drivers.vantage)
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Driver version is 3.6.3
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Option loop_request=1
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Opened up serial port /dev/ttyUSB0; baud 19200;
>>>> timeout 4.00
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Successfully woke up Vantage console
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Hardware type is 16
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: ISS ID is 1
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Hardware name: Vantage Pro2
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.engine.StdTimeSynch
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.engine.StdTimeSynch
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.engine.StdConvert
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO weewx.engine:
>>>> StdConvert target unit is 0x1
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.engine.StdConvert
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.engine.StdCalibrate
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.engine.StdCalibrate
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.engine.StdQC
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.engine.StdQC
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.wxservices.StdWXCalculate
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO weewx.wxservices:
>>>> StdWXCalculate will use data binding wx_binding
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.manager: Daily
>>>> summary version is 4.0
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.wxservices.StdWXCalculate
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.wxxtypes.StdWXXTypes
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.wxxtypes.StdWXXTypes
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.wxxtypes.StdPressureCooker
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.wxxtypes.StdPressureCooker
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.wxxtypes.StdRainRater
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.wxxtypes.StdRainRater
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.wxxtypes.StdDelta
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.wxxtypes.StdDelta
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.engine.StdArchive
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO weewx.engine: Archive
>>>> will use data binding wx_binding
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO weewx.engine: Record
>>>> generation will be attempted in 'hardware'
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO weewx.engine: The
>>>> archive interval in the configuration file (300) does not match the station
>>>> hardware interval (1800).
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: INFO weewx.engine: Using
>>>> archive interval of 1800 seconds (specified by hardware)
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Use
>>>> LOOP data in hi/low calculations: 1
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.engine.StdArchive
>>>> Aug 02 15:01:41 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.restx.StdStationRegistry
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: INFO weewx.restx:
>>>> StationRegistry: Registration not requested.
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.restx.StdStationRegistry
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.restx.StdWunderground
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.restx: WU
>>>> essentials: {}
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: INFO weewx.restx:
>>>> Wunderground-PWS: Data for station KMNHANSK2 will be posted
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.restx.StdWunderground
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.restx.StdPWSweather
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: INFO weewx.restx:
>>>> PWSWeather: Data for station KMNHANSK2 will be posted
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.restx.StdPWSweather
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.restx.StdCWOP
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: INFO weewx.restx: CWOP:
>>>> Data for station DW7572 will be posted
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.restx.StdCWOP
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.restx.StdWOW
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: INFO weewx.restx: WOW:
>>>> Posting not enabled.
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.restx.StdWOW
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.restx.StdWOWBE
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: INFO weewx.restx: WOW-BE:
>>>> Posting not enabled.
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.restx.StdWOWBE
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.restx.StdAWEKAS
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: INFO weewx.restx: AWEKAS:
>>>> Posting not enabled.
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.restx.StdAWEKAS
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.engine.StdPrint
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.engine.StdPrint
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine: Loading
>>>> service weewx.engine.StdReport
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: INFO weewx.engine:
>>>> 'pyephem' detected, extended almanac data is available
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.engine:
>>>> Finished loading service weewx.engine.StdReport
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: INFO __main__: Starting up
>>>> weewx version 5.4.0
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.manager: Daily
>>>> summary version is 4.0
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.manager: Daily
>>>> summary version is 4.0
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG weewx.manager: Daily
>>>> summary version is 4.0
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Successfully woke up Vantage console
>>>> Aug 02 15:01:42 ThompsonFarms weewxd[1952]: INFO weewx.engine: Clock
>>>> error is -10.74 seconds (positive is fast)
>>>> Aug 02 15:01:43 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Successfully woke up Vantage console
>>>> Aug 02 15:01:43 ThompsonFarms weewxd[1952]: INFO weewx.drivers.vantage:
>>>> Clock set to 2026-08-02 15:01:44 CDT (1785700904)
>>>> Aug 02 15:01:43 ThompsonFarms weewxd[1952]: INFO weewx.engine: Using
>>>> binding 'wx_binding' to database 'weewx.sdb'
>>>> Aug 02 15:01:43 ThompsonFarms weewxd[1952]: INFO weewx.manager:
>>>> Starting backfill of daily summaries
>>>> Aug 02 15:01:43 ThompsonFarms weewxd[1952]: INFO weewx.manager: Daily
>>>> summaries up to date
>>>> Aug 02 15:01:43 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Getting archive packets since 2026-08-01 18:30:00
>>>> CDT (1785627000)
>>>> Aug 02 15:01:44 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Successfully woke up Vantage console
>>>> Aug 02 15:01:44 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Retrieving 9 page(s); starting index= 3
>>>> Aug 02 15:01:44 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: DMPAFT complete: page timestamp 2024-09-29 18:30:00
>>>> CDT (1727652600) less than final timestamp 2026-08-01 18:30:00 CDT
>>>> (1785627000)
>>>> Aug 02 15:01:44 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Catch up complete.
>>>> Aug 02 15:01:44 ThompsonFarms weewxd[1952]: INFO weewx.engine: Starting
>>>> main packet loop.
>>>> Aug 02 15:01:45 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Successfully woke up Vantage console
>>>> Aug 02 15:01:45 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Requesting 200 LOOP packets.
>>>> Aug 02 15:01:45 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Successfully woke up Vantage console
>>>> Aug 02 15:01:49 ThompsonFarms weewxd[1952]: ERROR
>>>> weewx.drivers.vantage: LOOP batch try #1; error: Expected to read 99 chars;
>>>> got 0 instead
>>>> Aug 02 15:01:50 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Successfully woke up Vantage console
>>>> Aug 02 15:08:28 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Requesting 200 LOOP packets.
>>>> Aug 02 15:08:28 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Successfully woke up Vantage console
>>>> Aug 02 15:15:06 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Requesting 200 LOOP packets.
>>>> Aug 02 15:15:06 ThompsonFarms weewxd[1952]: DEBUG
>>>> weewx.drivers.vantage: Successfully woke up Vantage console
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "weewx-user" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion visit
>>>> https://groups.google.com/d/msgid/weewx-user/c52a9142-11ca-4b56-8c27-2c3ade448481n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/weewx-user/c52a9142-11ca-4b56-8c27-2c3ade448481n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion visit
>> https://groups.google.com/d/msgid/weewx-user/c9a29318-e96e-4ecf-a1f9-ad269ca39ddfn%40googlegroups.com
>> <https://groups.google.com/d/msgid/weewx-user/c9a29318-e96e-4ecf-a1f9-ad269ca39ddfn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion visit
> https://groups.google.com/d/msgid/weewx-user/CAGTinV4oUWLX_HHMMX5BtLGrgU7TwHNaZgpxZV92ncFVF5nbdQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/weewx-user/CAGTinV4oUWLX_HHMMX5BtLGrgU7TwHNaZgpxZV92ncFVF5nbdQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zECT%3D4mE8Xa8seyhsG2t2_bkEK2UXkrCvSjkxdrLGUn1TA%40mail.gmail.com.

Reply via email to