| From: | Alexander Lakhin <exclusion(at)gmail(dot)com> |
|---|---|
| To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [PATCH] Two remaining shmem attachment issues in single-user mode |
| Date: | 2026-10-11 07:00:01 |
| Message-ID: | e87c8fef-e254-441e-b889-bbcbd5afea7f@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello Heikki,
30.09.2026 14:43, Heikki Linnakangas wrote:
> Ok, I picked a mix of these test changes that I liked the best, and committed :-). Thank you both!
>
Please look at a failure of 001_late_shmem_alloc.pl, produced recently by
mamba [1]:
# +++ tap check in src/test/modules/test_shmem +++
# die: ack Broken pipe: write( 13, '
# -- allocate
# SELECT test_shmem_register('test_shmem after startup', 25, 1);
# -- attach
# SELECT test_shmem_register('test_shmem after startup', 25, 2);
# -- attach with SHMEM_ATTACH_UNKNOWN_SIZE
# SELECT test_shmem_register('test_shmem after startup', -1, 3);
# ' ) at /usr/pkg/lib/perl5/vendor_perl/5.42.0/IPC/Run/IO.pm line 550.
# Looks like your test exited with 32 just after 12.
[05:53:14] t/001_late_shmem_alloc.pl ..
Dubious, test returned 32 (wstat 8192, 0x2000)
All 12 subtests passed
(less 2 skipped subtests: 10 okay)
[05:53:14]
It looks like postmaster that is doomed to fail ("Cannot use
SHMEM_ATTACH_UNKNOWN_SIZE with a segment that doesn't exist") can exit
before it processes stdin from TAP test. I've managed to reproduce it with
slow_write.c attached as below:
LD_PRELOAD=.../slow_write.so PROVE_TESTS='t/001*' make -s check -C src/test/modules/test_shmem
# +++ tap check in src/test/modules/test_shmem +++
t/001_late_shmem_alloc.pl .. 11/? # die: ack Broken pipe: write( 13, '
...
# Looks like your test exited with 32 just after 12.
t/001_late_shmem_alloc.pl .. Dubious, test returned 32 (wstat 8192, 0x2000)
All 12 subtests passed
Without this test,
LD_PRELOAD=.../slow_write.so make -s check-world
passes for me.
Note that mamba has
# IPC::Run::VERSION: 20250809.0
This issue is not reproduced with 20260402.0.
[1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mamba&dt=2026-10-01%2006%3A10%3A51
Best regards,
Alexander
| Attachment | Content-Type | Size |
|---|---|---|
| slow_write.c | text/x-csrc | 863 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rahul | 2026-10-11 07:46:44 | Re: Wrong LSN in WAL decoding error messages |
| Previous Message | Ayush Tiwari | 2026-10-11 06:35:55 | Re: Buffer pin leak in hash index bucket splits |