Git/master Valgrind + Qt Creator XML/socket logging crash
Thomas Wollenzin <[email protected]> Wed, 17 Sep 2025 08:33:45 +0000
| Newsgroups | gmane.comp.debugging.valgrind |
|---|---|
| Message-ID | <WA2P291MB0258A18DC08536A96B59E7558917A@WA2P291MB0258.POLP291.PROD.OUTLOOK.COM> |
--===============1953668733177195285==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_WA2P291MB0258A18DC08536A96B59E7558917AWA2P291MB0258POLP_"
--_000_WA2P291MB0258A18DC08536A96B59E7558917AWA2P291MB0258POLP_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hello,
I am currently using a Git/master build of Valgrind (3.26.0.GIT) on Ubuntu,=
and it works perfectly when run from the terminal using standard command-l=
ine options, e.g.:
valgrind --tool=3Dmemcheck ./MyApp
However, when I try to run the same executable via Qt Creator=92s Valgrind =
integration, which launches Valgrind with the following options:
--child-silent-after-fork=3Dyes
--xml-socket=3D127.0.0.1:<port>
--log-socket=3D127.0.0.1:<port>
--xml=3Dyes
--smc-check=3Dstack
--tool=3Dmemcheck
--gen-suppressions=3Dall
--track-origins=3Dyes
--leak-check=3Dsummary
--num-callers=3D25
Valgrind crashes immediately with:
valgrind: ../../coregrind/m_libcprint.c:402 (prepare_sink_socket): Assertio=
n 'sink->fd =3D=3D 2' failed.
Segmentation fault (core dumped)
From my observations:
*
The crash appears only when XML/socket logging is used.
*
The runtime binaries (e.g., memcheck-amd64-linux and vgpreload_*.so) are pr=
esent in the build directory, not in the lib/valgrind folder, but Valgrind =
works fine when called directly from the terminal.
*
Using the Ubuntu system Valgrind package avoids the crash with Qt Creator.
My questions are:
1.
Is this behavior a known issue with Git/master builds of Valgrind?
2.
Are there plans to support Qt Creator=92s XML/socket logging fully in futur=
e releases?
3.
Are there recommended workarounds for using Git/master Valgrind with IDEs t=
hat rely on socket-based logging?
Thank you for any insights or guidance.
Best regards,
Thomas
--_000_WA2P291MB0258A18DC08536A96B59E7558917AWA2P291MB0258POLP_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
252">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Hello,</div>
<div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;=
font-family: "Calibri", "Helvetica", sans-serif; font-=
size: 12pt; color: rgb(0, 0, 0);">
I am currently using a Git/master build of Valgrind (3.26.0.GIT) on Ubuntu,=
and it works perfectly when run from the terminal using standard command-l=
ine options, e.g.:</div>
<pre class=3D"elementToProof"><div style=3D"font-family: "Calibri"=
;, "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);=
" class=3D"elementToProof"><code>valgrind --tool=3Dmemcheck ./MyApp=0A=
</code></div></pre>
<div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;=
font-family: "Calibri", "Helvetica", sans-serif; font-=
size: 12pt; color: rgb(0, 0, 0);">
However, when I try to run the same executable via <b>Qt Creator=92s Valgri=
nd integration</b>, which launches Valgrind with the following options:</di=
v>
<pre class=3D"elementToProof"><div style=3D"font-family: "Calibri"=
;, "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);=
" class=3D"elementToProof"><code>--child-silent-after-fork=3Dyes=0A=
--xml-socket=3D127.0.0.1:<port>=0A=
--log-socket=3D127.0.0.1:<port>=0A=
--xml=3Dyes=0A=
--smc-check=3Dstack=0A=
--tool=3Dmemcheck=0A=
--gen-suppressions=3Dall=0A=
--track-origins=3Dyes=0A=
--leak-check=3Dsummary=0A=
--num-callers=3D25=0A=
</code></div></pre>
<div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;=
font-family: "Calibri", "Helvetica", sans-serif; font-=
size: 12pt; color: rgb(0, 0, 0);">
Valgrind crashes immediately with:</div>
<pre class=3D"elementToProof"><div style=3D"font-family: "Calibri"=
;, "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);=
" class=3D"elementToProof"><code>valgrind: ../../coregrind/m_libcprint.c:40=
2 (prepare_sink_socket): Assertion 'sink->fd =3D=3D 2' failed.=0A=
Segmentation fault (core dumped)=0A=
</code></div></pre>
<div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;=
font-family: "Calibri", "Helvetica", sans-serif; font-=
size: 12pt; color: rgb(0, 0, 0);">
From my observations:</div>
<ul>
<li style=3D"font-family: "Calibri", "Helvetica", sans-=
serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div role=3D"presentation" style=3D"margin-top: 1em; margin-bottom: 1em;">T=
he crash appears only when
<b>XML/socket logging</b> is used.</div>
</li><li style=3D"font-family: "Calibri", "Helvetica", =
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div role=3D"presentation" style=3D"margin-top: 1em; margin-bottom: 1em;">T=
he runtime binaries (e.g.,
<code>memcheck-amd64-linux</code> and <code>vgpreload_*.so</code>) are=
present in the build directory, not in the
<code>lib/valgrind</code> folder, but Valgrind works fine when called =
directly from the terminal.</div>
</li><li style=3D"font-family: "Calibri", "Helvetica", =
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div role=3D"presentation" style=3D"margin-top: 1em; margin-bottom: 1em;">U=
sing the Ubuntu system Valgrind package avoids the crash with Qt Creator.</=
div>
</li></ul>
<div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;=
font-family: "Calibri", "Helvetica", sans-serif; font-=
size: 12pt; color: rgb(0, 0, 0);">
My questions are:</div>
<ol start=3D"1">
<li style=3D"font-family: "Calibri", "Helvetica", sans-=
serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div role=3D"presentation" style=3D"margin-top: 1em; margin-bottom: 1em;">I=
s this behavior a known issue with Git/master builds of Valgrind?</div>
</li><li style=3D"font-family: "Calibri", "Helvetica", =
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div role=3D"presentation" style=3D"margin-top: 1em; margin-bottom: 1em;">A=
re there plans to support Qt Creator=92s XML/socket logging fully in future=
releases?</div>
</li><li style=3D"font-family: "Calibri", "Helvetica", =
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div role=3D"presentation" style=3D"margin-top: 1em; margin-bottom: 1em;">A=
re there recommended workarounds for using Git/master Valgrind with IDEs th=
at rely on socket-based logging?</div>
</li></ol>
<div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;=
font-family: "Calibri", "Helvetica", sans-serif; font-=
size: 12pt; color: rgb(0, 0, 0);">
Thank you for any insights or guidance.</div>
<div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;=
font-family: "Calibri", "Helvetica", sans-serif; font-=
size: 12pt; color: rgb(0, 0, 0);">
Best regards,<br>
Thomas</div>
<div style=3D"font-family: "Calibri", "Helvetica", sans=
-serif; font-size: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
</body>
</html>
--_000_WA2P291MB0258A18DC08536A96B59E7558917AWA2P291MB0258POLP_--
--===============1953668733177195285==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============1953668733177195285==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
--===============1953668733177195285==--