[lttng-dev] Odd behaviour of lttng 2.0 kernel event listing
Thibault, Daniel
Daniel.Thibault at drdc-rddc.gc.ca
Tue Jan 24 09:37:06 EST 2012
-----Message d'origine-----
De : David Goulet [mailto:david.goulet at polymtl.ca]
Envoyé : 23 janvier 2012 17:43
> That's very interesting.
>
> Quick fix, let see if it works:
>
> diff --git a/src/common/sessiond-comm/sessiond-comm.c b/src/common/sessiond-comm/sessiond-comm.c
> index 03e8931..106041f 100644
> - --- a/src/common/sessiond-comm/sessiond-comm.c
> +++ b/src/common/sessiond-comm/sessiond-comm.c
> @@ -257,7 +257,7 @@ ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len)
> msg.msg_iovlen = 1;
>
> -- ret = recvmsg(sock, &msg, 0);
> + ret = recvmsg(sock, &msg, MSG_WAITALL);
> if (ret < 0) {
Yup, that fixed it. The bytes expected and received now match. I presume it is OK to make sessiond-comm.lttcomm_recv_unix_sock() blocking in this way?
Daniel U. Thibault
R & D pour la défense Canada - Valcartier (RDDC Valcartier) / Defence R&D Canada - Valcartier (DRDC Valcartier)
Système de systèmes (SdS) / System of Systems (SoS)
Solutions informatiques et expérimentations (SIE) / Computing Solutions and Experimentations (CSE)
2459 Boul. Pie XI Nord
Québec, QC G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC: 918V QSDJ
Gouvernement du Canada / Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>
More information about the lttng-dev
mailing list