Re: Build warning with meson and dtrace on Fedora 43

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Build warning with meson and dtrace on Fedora 43
Date: 2026-07-24 06:43:04
Message-ID: amMGcZpo25vqjoCg@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2026-Jul-24, Laurenz Albe wrote:

> When I build with meson/ninja with pretty much everything enabled
> and dtrace, I get the following warning:
>
> [40/2412] Generating src/include/utils/probes.h.tmp with a custom command
> Warning: /usr/bin/dtrace:.dtrace-temp.cf7b554c.d:68: syntax error near:
> probe smgr__md__read__start
>
> Warning: Proceeding as if --no-pyparsing was given.
>
> I don't get the warning when I build with configure/make.
>
> "git bisect" identifies the following commit as culprit:
>
> ca326e903d "Clean up read() return type" by Peter E.
>
> I don't know enough about dtrace to track this down, but I think it
> should be fixed.

That's weird. The only change that seems near enough in that commit was

diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 718c1cfc0f9..79febf12de3 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -863,7 +863,7 @@ mdreadv(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
struct iovec iov[PG_IOV_MAX];
int iovcnt;
pgoff_t seekpos;
- int nbytes;
+ ssize_t nbytes;
MdfdVec *v;
BlockNumber nblocks_this_segment;
size_t transferred_this_segment;

But then, variable 'nbytes' is not used by the probe mentioned in the
error message. It is used by the probe two lines below:

src/backend/storage/smgr/md.c:
TRACE_POSTGRESQL_SMGR_MD_READ_START(forknum, blocknum,
reln->smgr_rlocator.locator.spcOid,
reln->smgr_rlocator.locator.dbOid,
reln->smgr_rlocator.locator.relNumber,
reln->smgr_rlocator.backend);
nbytes = FileReadV(v->mdfd_vfd, iov, iovcnt, seekpos,
WAIT_EVENT_DATA_FILE_READ);
TRACE_POSTGRESQL_SMGR_MD_READ_DONE(forknum, blocknum,
reln->smgr_rlocator.locator.spcOid,
reln->smgr_rlocator.locator.dbOid,
reln->smgr_rlocator.locator.relNumber,
reln->smgr_rlocator.backend,
nbytes,
size_this_segment - transferred_this_segment);

I wonder if changing the first 'long long int' to ssize_t in
src/backend/utils/probes.d for smgr__md__read__done would fix it:

probe smgr__md__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int);
- probe smgr__md__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, long long int, long long int);
+ probe smgr__md__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, ssize_t, long long int);

(Making that one nbytes back to int from ssize_t in md.c and seeing if
that silences the warning would also be a way to be more certain that
this is the code that the warning is about.)

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2026-07-24 06:44:19 Re: DOCS: Describe some missing parameters on CREATE/ALTER PUBLICATION pages
Previous Message vignesh C 2026-07-24 06:37:20 Re: Fix publisher-side sequence permission reporting