Re: pltcl tests fail with FreeBSD 13.2

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: pltcl tests fail with FreeBSD 13.2
Дата
Msg-id 20230731230741.iy3zvc4wgpz5zxkj@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: pltcl tests fail with FreeBSD 13.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pltcl tests fail with FreeBSD 13.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2023-07-31 18:33:37 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > I saw that CI image builds for freebsd were failing, because 13.1, used until
> > now, is EOL. Update to 13.2, no problem, I thought. Ran a CI run against 13.2
> > - unfortunately that failed. In pltcl of all places.
> 
> I tried to replicate this in a freshly-installed 13.2 VM, and could
> not, which is unsurprising because the FreeBSD installation process
> does not let you skip selecting a timezone --- which creates
> /etc/localtime AFAICT.  So I'm unconvinced that we ought to worry
> about the case where that's not there.  How is it that the CI image
> lacks that file?

I don't know why it lacks the file - the CI image is based on the google cloud
image freebsd maintains / publishes ([1][2]). Which doesn't have /etc/localtime.

I've now added a "tzsetup UTC" to the image generation, which fixes the test
failure.


> (And could it be that we had one in the predecessor 13.1 image?)

No, I checked, and it's not in there either... It looks like the difference is
that 13.1 reads the UTC zoneinfo in that case, whereas 13.2 doesn't.

Upstream 13.1 image:

truss date 2>&1|grep -E 'open|stat'
...
open("/etc/localtime",O_RDONLY,0101401200)     ERR#2 'No such file or directory'
open("/usr/share/zoneinfo/UTC",O_RDONLY,00)     = 3 (0x3)
fstat(3,{ mode=-r--r--r-- ,inode=351417,size=118,blksize=32768 }) = 0 (0x0)
open("/usr/share/zoneinfo/posixrules",O_RDONLY,014330460400) = 3 (0x3)
fstat(3,{ mode=-r--r--r-- ,inode=356621,size=3535,blksize=32768 }) = 0 (0x0)
fstat(1,{ mode=p--------- ,inode=696,size=0,blksize=4096 }) = 0 (0x0)

Upstream 13.2 image:
open("/etc/localtime",O_RDONLY,01745)         ERR#2 'No such file or directory'
fstat(1,{ mode=p--------- ,inode=658,size=0,blksize=4096 }) = 0 (0x0)


Why not reading the UTC zone leads to timestamps being out of range, I do not
know...

Greetings,

Andres Freund

[1] https://wiki.freebsd.org/GoogleCloudPlatform
[2] https://cloud.google.com/compute/docs/images#freebsd



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pltcl tests fail with FreeBSD 13.2
Следующее
От: Ranier Vilela
Дата:
Сообщение: Re: Avoid possible memory leak (src/common/rmtree.c)