pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14902: valgrind - problem in PQconnectdb - pqSaveParameterStatus reported
2+ messages / 2 participants
[nested] [flat]
* BUG #14902: valgrind - problem in PQconnectdb - pqSaveParameterStatus reported
@ 2017-11-13 11:27 pavel.bazika@kocovnici.cz
2017-11-13 15:23 ` Re: [BUGS] BUG #14902: valgrind - problem in PQconnectdb - pqSaveParameterStatus reported Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: pavel.bazika@kocovnici.cz @ 2017-11-13 11:27 UTC (permalink / raw)
To: pgsql-bugs; +Cc: pavel.bazika@kocovnici.cz
The following bug has been logged on the website:
Bug reference: 14902
Logged by: Pavel Bazika
Email address: pavel.bazika@kocovnici.cz
PostgreSQL version: 10.1
Operating system: Arch Linux
Description:
Hi,
I'm testing my application with helgrind threading error detection tool
(part of valgrind) and it reports a problem in libpq, when I'm calling
PQconnectdb from two threads:
==25830== Possible data race during write of size 4 at 0x7D600CC by thread
#1
==25830== Locks held: none
==25830== at 0x7B2CFE4: pqSaveParameterStatus (fe-exec.c:1022)
==25830== by 0x7B35A01: getParameterStatus (fe-protocol3.c:1378)
==25830== by 0x7B36E77: pqParseInput3 (fe-protocol3.c:265)
==25830== by 0x7B2DD7D: PQisBusy (fe-exec.c:1738)
==25830== by 0x7B274D6: PQconnectPoll (fe-connect.c:2909)
==25830== by 0x7B2829D: connectDBComplete.part.9 (fe-connect.c:1931)
==25830== by 0x7B2B31F: connectDBComplete (fe-connect.c:589)
==25830==
==25830== This conflicts with a previous write of size 4 by thread #4
==25830== Locks held: none
==25830== at 0x7B2CFE4: pqSaveParameterStatus (fe-exec.c:1022)
==25830== by 0x7B35A01: getParameterStatus (fe-protocol3.c:1378)
==25830== by 0x7B36E77: pqParseInput3 (fe-protocol3.c:265)
==25830== by 0x7B2DD7D: PQisBusy (fe-exec.c:1738)
==25830== by 0x7B274D6: PQconnectPoll (fe-connect.c:2909)
==25830== by 0x7B2829D: connectDBComplete.part.9 (fe-connect.c:1931)
==25830== by 0x7B2B31F: connectDBComplete (fe-connect.c:589)
==25830== by 0x7B2B31F: PQconnectdb (fe-connect.c:590)
and
==25830== Possible data race during write of size 1 at 0x7D600C8 by thread
#1
==25830== Locks held: none
==25830== at 0x7B2CFC3: pqSaveParameterStatus (fe-exec.c:1027)
==25830== by 0x7B35A01: getParameterStatus (fe-protocol3.c:1378)
==25830== by 0x7B36E77: pqParseInput3 (fe-protocol3.c:265)
==25830== by 0x7B2DD7D: PQisBusy (fe-exec.c:1738)
==25830== by 0x7B274D6: PQconnectPoll (fe-connect.c:2909)
==25830== by 0x7B2829D: connectDBComplete.part.9 (fe-connect.c:1931)
==25830== by 0x7B2B31F: connectDBComplete (fe-connect.c:589)
==25830== by 0x7B2B31F: PQconnectdb (fe-connect.c:590)
==25830==
==25830== This conflicts with a previous write of size 1 by thread #4
==25830== Locks held: none
==25830== at 0x7B2CFC3: pqSaveParameterStatus (fe-exec.c:1027)
==25830== by 0x7B35A01: getParameterStatus (fe-protocol3.c:1378)
==25830== by 0x7B36E77: pqParseInput3 (fe-protocol3.c:265)
==25830== by 0x7B2DD7D: PQisBusy (fe-exec.c:1738)
==25830== by 0x7B274D6: PQconnectPoll (fe-connect.c:2909)
==25830== by 0x7B2829D: connectDBComplete.part.9 (fe-connect.c:1931)
==25830== by 0x7B2B31F: connectDBComplete (fe-connect.c:589)
==25830== by 0x7B2B31F: PQconnectdb (fe-connect.c:590)
Is this false positive, bug or am I doing something wrong? The problem
occurrs when those static variables are written in fe-exex.c.
Thanks
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [BUGS] BUG #14902: valgrind - problem in PQconnectdb - pqSaveParameterStatus reported
2017-11-13 11:27 BUG #14902: valgrind - problem in PQconnectdb - pqSaveParameterStatus reported pavel.bazika@kocovnici.cz
@ 2017-11-13 15:23 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2017-11-13 15:23 UTC (permalink / raw)
To: pavel.bazika@kocovnici.cz; +Cc: pgsql-bugs
pavel.bazika@kocovnici.cz writes:
> I'm testing my application with helgrind threading error detection tool
> (part of valgrind) and it reports a problem in libpq, when I'm calling
> PQconnectdb from two threads:
It seems to be complaining about the assignments to static_client_encoding
and static_std_strings. I wouldn't worry --- in the first place, those
assignments should be atomic writes (at least on most platforms) and
in the second place, the functionality involved is not guaranteed to
work in any program with more than one PGconn anyway.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-11-13 15:23 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 11:27 BUG #14902: valgrind - problem in PQconnectdb - pqSaveParameterStatus reported pavel.bazika@kocovnici.cz
2017-11-13 15:23 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox