Solved portupgrade and pkgdb "MOVED file format error"

portupgrade and pkgdb suddenly stopped working on my file server here. This is what happens:

Code:
root@storezilla2:/ # portupgrade -ai
/usr/local/lib/ruby/site_ruby/2.4/pkgtools/portsdb.rb:118:in `block (2 levels) in fill': MOVED file format error (PortsDB::MOVEDError)
        from /usr/local/lib/ruby/site_ruby/2.4/pkgtools/portsdb.rb:112:in `each'
        from /usr/local/lib/ruby/site_ruby/2.4/pkgtools/portsdb.rb:112:in `block in fill'
        from /usr/local/lib/ruby/site_ruby/2.4/pkgtools/portsdb.rb:111:in `open'
        from /usr/local/lib/ruby/site_ruby/2.4/pkgtools/portsdb.rb:111:in `fill'
        from /usr/local/lib/ruby/site_ruby/2.4/pkgtools/portsdb.rb:106:in `initialize'
        from /usr/local/lib/ruby/site_ruby/2.4/pkgtools/portsdb.rb:181:in `new'
        from /usr/local/lib/ruby/site_ruby/2.4/pkgtools/portsdb.rb:181:in `setup'
        from /usr/local/lib/ruby/site_ruby/2.4/pkgtools/pkgtools.rb:242:in `init_pkgtools_global'
        from /usr/local/sbin/portupgrade:531:in `block in main'
        from /usr/local/lib/ruby/2.4/optparse.rb:1062:in `initialize'
        from /usr/local/sbin/portupgrade:238:in `new'
        from /usr/local/sbin/portupgrade:238:in `main'
        from /usr/local/sbin/portupgrade:2380:in `<main>'
root@storezilla2:/ # pkgdb -F
MOVED file format error

I checked the portsdb.rb file against an older snapshot, but the file is unchanged. FILE]portsdb.rb[/FILE] is a script file, I only see where it fails (line numbers) but I don't understand what if fails on and why. As I do not know much about ruby, this is were I am stucḱ.

What did not help:
  • reinstalling portupgrade, ruby or dependencies
  • Fetching a fresh ports tree
  • No information in log files or dmesg
My system is FreeBSD 11.2-STABLE r344710 amd64, there is ample free disk space and free memory.

Please note that portmaster works.

I would highly appreciate any ideas, hints, tips, questions etc
 
Exact same thing now happens after the last batch of portsupgrades on a second, completely different machine (FreeBSD 12.0-STABLE amd64).
 
The issue repaired itself today on both systems, with nothing changed but performing another portsnap fetch update - it looks like there was a bad copy of the ports tree at least on my mirror for a little while. What is a bit concerning is that this was not detected and corrupted the local copy.

Anyhow, it works again.
 
Back
Top