valgrind complaints in pgstat_write_statsfile

Lists: pgsql-hackers
From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: valgrind complaints in pgstat_write_statsfile
Date: 2004-11-24 09:42:21
Message-ID: 41A4577D.4010105@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Seen in passing when running valgrind against a CVS HEAD build:

> ==28598== Syscall param write(buf) contains uninitialised or unaddressable byte(s)
> ==28598== at 0x1BABC558: write (in /lib/libc-2.3.4.so)
> ==28598== by 0x1BA7165D: (within /lib/libc-2.3.4.so)
> ==28598== by 0x1BA715FE: _IO_do_write (in /lib/libc-2.3.4.so)
> ==28598== by 0x1BA70E61: _IO_file_close_it (in /lib/libc-2.3.4.so)
> ==28598== by 0x1BA67B07: _IO_fclose (in /lib/libc-2.3.4.so)
> ==28598== by 0x819369B: pgstat_write_statsfile (pgstat.c:2275)
> ==28598== by 0x8192A44: PgstatCollectorMain (pgstat.c:1576)
> ==28598== by 0x8192368: PgstatBufferMain (pgstat.c:1398)
> ==28598== by 0x8191656: pgstat_start (pgstat.c:617)
> ==28598== by 0x818EB81: reaper (postmaster.c:2096)
> ==28598== by 0x52BFEFFF: ???
> ==28598== by 0x818CDAA: PostmasterMain (postmaster.c:917)
> ==28598== by 0x81570E4: main (main.c:268)

Anything to be concerned about? I guess that the uninitialized bytes
were actually provided in an earlier write but it's only on close that
they get written out and noticed.

-O


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: valgrind complaints in pgstat_write_statsfile
Date: 2004-11-24 16:25:47
Message-ID: 9953.1101313547@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Oliver Jowett <oliver(at)opencloud(dot)com> writes:
> Seen in passing when running valgrind against a CVS HEAD build:
>> ==28598== Syscall param write(buf) contains uninitialised or unaddressable byte(s)

> Anything to be concerned about?

AFAIK this represents valgrind complaining because we have written out
structs containing unused/uninitialized pad bytes.

regards, tom lane