[gnutls-devel] GnuTLS | fixed operation under multiple threads (!935)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Mon Feb 25 12:43:33 CET 2019


Thanks a lot for the quick fix!

This seems to fix the observable issue from #713, however the race is still present, as the accesses to `session->internals.recv_state` are not atomic

```
WARNING: ThreadSanitizer: data race (pid=19622)
  Read of size 4 at 0x7b8c00012014 by thread T11:
    #0 gnutls_record_send2 /home/chouquette/dev/vlc/contrib/native/gnutls/lib/record.c:1982 (libgnutls_plugin.so+0x20c52)
    #1 gnutls_record_send /home/chouquette/dev/vlc/contrib/native/gnutls/lib/record.c:1943 (libgnutls_plugin.so+0x2111f)
    #2 gnutls_Send ../../modules/misc/gnutls.c:175 (libgnutls_plugin.so+0x197f3)
    #3 vlc_https_send ../../modules/access/http/h2output.c:204 (libhttps_plugin.so+0xfddd)
    #4 vlc_h2_frame_send ../../modules/access/http/h2output.c:250 (libhttps_plugin.so+0xffdc)
    #5 vlc_h2_output_thread ../../modules/access/http/h2output.c:265 (libhttps_plugin.so+0x1006d)
    #6 vlc_h2_client_output_thread ../../modules/access/http/h2output.c:299 (libhttps_plugin.so+0x101fb)
    #7 <null> <null> (libtsan.so.0+0x29b4d)

  Previous write of size 4 at 0x7b8c00012014 by thread T12:
    #0 check_session_status /home/chouquette/dev/vlc/contrib/native/gnutls/lib/record.c:1689 (libgnutls_plugin.so+0x20204)
    #1 _gnutls_recv_int /home/chouquette/dev/vlc/contrib/native/gnutls/lib/record.c:1752 (libgnutls_plugin.so+0x2055c)
    #2 gnutls_record_recv /home/chouquette/dev/vlc/contrib/native/gnutls/lib/record.c:2262 (libgnutls_plugin.so+0x215d4)
    #3 gnutls_Recv ../../modules/misc/gnutls.c:146 (libgnutls_plugin.so+0x196d0)
    #4 vlc_https_recv ../../modules/access/http/h2conn.c:563 (libhttps_plugin.so+0x122c4)
    #5 vlc_h2_frame_recv ../../modules/access/http/h2conn.c:606 (libhttps_plugin.so+0x12453)
    #6 vlc_h2_recv_thread ../../modules/access/http/h2conn.c:656 (libhttps_plugin.so+0x1270d)
    #7 <null> <null> (libtsan.so.0+0x29b4d)
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/935#note_144608641
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20190225/15f738d5/attachment.html>


More information about the Gnutls-devel mailing list