Re: Corrupted ports.tar file?

2022-04-12 Thread Joshua Root

Bill Cole wrote:


Theory: it's a problem related to running the reclaim from the prompt at the 
tail end of a selfupdate. Incomplete 'portindex' run perhaps?


Good theory. It's likely that when the periodic reclaim run at exit was 
added, it wasn't considered that it might be running after code that 
made it unsafe to do anything but continue to exit.


- Josh



Re: Corrupted ports.tar file?

2022-04-12 Thread Bill Cole
On 2022-04-13 at 00:34:02 UTC-0400 (Tue, 12 Apr 2022 23:34:02 -0500)
Ryan Schmidt 
is rumored to have said:

> On Apr 11, 2022, at 17:02, Dave Horsfall wrote:
>
>> On Mon, 11 Apr 2022, Ryan Schmidt wrote:
>>
>>> Run "sudo port selfupdate" to get the most recent ports.tar. Do you
>>> still see the problem then?
>>
>> I did run that first; apologies for not mentioning it (there were no
>> issues).
>
> I think you did mention it. I was suggesting you run it again, in case 
> somehow the server files were in a weird state the last time you selfupdated. 
> There was some intermittent network problem affecting the server that 
> generates the ports.tar file a few days ago, and again today; although I 
> thought our rsync updates happened pretty much atomically, maybe it was 
> possible for a set of files to be published briefly that was not correct.

I just now (0600 UTC 2022-04-13) had a similar experience. Ran a selfupdate 
which suggested I do a reclaim at the end. I said 'y' and it did the leaf trim 
and the inactive purge, but while "Building list of distfiles still in use" it 
kicked out a lot of errors about a corrupted PortIndex as Dave reported.

I also got a handful of messages like these, interspersed with the others:

Warning: Failed to open port libpaper : can't read "portinfo(porturl)": no such 
element in array
Warning: Failed to open port p5.28-http-message : can't read 
"portinfo(porturl)": no such element in array

Running 'port info' for the supposedly "not found" ports gave the normal output.

Running 'port reclaim' again (without another update) did NOT trigger the flood 
of errors.

Theory: it's a problem related to running the reclaim from the prompt at the 
tail end of a selfupdate. Incomplete 'portindex' run perhaps?


-- 
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire


Re: Corrupted ports.tar file?

2022-04-12 Thread Dave Horsfall
On Tue, 12 Apr 2022, Ryan Schmidt wrote:

> > I did run that first; apologies for not mentioning it (there were no 
> > issues).
> 
> I think you did mention it. I was suggesting you run it again, in case 
> somehow the server files were in a weird state the last time you 
> selfupdated. There was some intermittent network problem affecting the 
> server that generates the ports.tar file a few days ago, and again 
> today; although I thought our rsync updates happened pretty much 
> atomically, maybe it was possible for a set of files to be published 
> briefly that was not correct.

Sorry; my mistake.  I ran it again, and no problems; boy, do I hate these 
heisenbugs :-(

Many thanks.

-- Dave


Re: Corrupted ports.tar file?

2022-04-12 Thread Ryan Schmidt
On Apr 11, 2022, at 17:02, Dave Horsfall wrote:

> On Mon, 11 Apr 2022, Ryan Schmidt wrote:
> 
>> Run "sudo port selfupdate" to get the most recent ports.tar. Do you 
>> still see the problem then?
> 
> I did run that first; apologies for not mentioning it (there were no 
> issues).

I think you did mention it. I was suggesting you run it again, in case somehow 
the server files were in a weird state the last time you selfupdated. There was 
some intermittent network problem affecting the server that generates the 
ports.tar file a few days ago, and again today; although I thought our rsync 
updates happened pretty much atomically, maybe it was possible for a set of 
files to be published briefly that was not correct.




Re: Corrupted ports.tar file?

2022-04-11 Thread Dave Horsfall
On Mon, 11 Apr 2022, Ryan Schmidt wrote:

> Run "sudo port selfupdate" to get the most recent ports.tar. Do you 
> still see the problem then?

I did run that first; apologies for not mentioning it (there were no 
issues).

In fact, my schedule is:

Sunday: "port -u uninstall" to clean out ports that were squirrelled away.
Monday: "port selfupdate; port upgrade outdated" (under "script").

Note that "port selfupdate" offers to run "port reclaim" every fortnight, 
where this problem was observed.

> This message could occur if you run "sudo port selfupdate" (or "sudo 
> port sync") in one terminal window while another MacPorts process is 
> still running in another terminal window. So it's best not to do that. 
> If you weren't doing that, I can't explain it.

Not a chance that I'd do anything as silly as that (I've been a sysadmin 
for nearly 50 years)...  All my updates are run in the one window (with 
scrollback).

I'll see if this heisenbug happens again next week (I can't spend any time 
on debugging it right now).

-- Dave


Re: Corrupted ports.tar file?

2022-04-11 Thread Ryan Schmidt
On Apr 10, 2022, at 16:31, Dave Horsfall wrote:

> Early MacBook Pro, High Sierra 10.13.6, MacPorts 2.7.2.
> 
> When doing my weekly MacPorts maintenance (doesn't everyone?), I saw this 
> during a "port reclaim" (automatically requested):
> 
>Found no inactive ports.
>--->  Building list of distfiles still in use
>Warning: It looks like your PortIndex file for 
> rsync://rsync.macports.org/macports/release/tarballs/ports.tar may be corrupt.
>Warning: Port bzip2 not found: 
>Warning: It looks like your PortIndex file for 
> rsync://rsync.macports.org/macports/release/tarballs/ports.tar may be corrupt.
>Warning: Port db48 not found: 
>Warning: It looks like your PortIndex file for 
> rsync://rsync.macports.org/macports/release/tarballs/ports.tar may be corrupt.
> 
> Etc; I do have "bzip2" and so on.
> 
> Haven't seen that before; what's going on?  A following "port upgrade 
> outdated" saw no problems...

Run "sudo port selfupdate" to get the most recent ports.tar. Do you still see 
the problem then?

This message could occur if you run "sudo port selfupdate" (or "sudo port 
sync") in one terminal window while another MacPorts process is still running 
in another terminal window. So it's best not to do that. If you weren't doing 
that, I can't explain it.




Corrupted ports.tar file?

2022-04-10 Thread Dave Horsfall
Early MacBook Pro, High Sierra 10.13.6, MacPorts 2.7.2.

When doing my weekly MacPorts maintenance (doesn't everyone?), I saw this 
during a "port reclaim" (automatically requested):

Found no inactive ports.
--->  Building list of distfiles still in use
Warning: It looks like your PortIndex file for 
rsync://rsync.macports.org/macports/release/tarballs/ports.tar may be corrupt.
Warning: Port bzip2 not found: 
Warning: It looks like your PortIndex file for 
rsync://rsync.macports.org/macports/release/tarballs/ports.tar may be corrupt.
Warning: Port db48 not found: 
Warning: It looks like your PortIndex file for 
rsync://rsync.macports.org/macports/release/tarballs/ports.tar may be corrupt.

Etc; I do have "bzip2" and so on.

Haven't seen that before; what's going on?  A following "port upgrade 
outdated" saw no problems...

-- Dave