maidsafe-archive / MaidSafe-RUDP

Implementation of Reliable UDP
Other
95 stars 51 forks source link

Should fix data race inside ConnectionManager::Connect #38

Closed inetic closed 9 years ago

inetic commented 9 years ago

As reported by TSan: http://dash.maidsafe.net/testDetails.php?test=2619577&build=71515

ned14 commented 9 years ago

Wasn't that mutex lock you are restoring there originally?

inetic commented 9 years ago

I don't think there was, the original code (e.g. https://github.com/inetic/MaidSafe-RUDP/blob/1f2f1a343d7013a212f0577a649126da3e8a4fb7/src/maidsafe/rudp/connection_manager.cc) did not directly access members of the ConnectionManager class so locking the function's body wasn't necessary. The commits https://github.com/maidsafe/MaidSafe-RUDP/commit/4a8871f6cdef8fad7bd3e8ce1ae08f9c128b9886 and https://github.com/maidsafe/MaidSafe-RUDP/commit/7c6c81ab49729c6b694c1f1532763b27e1d129ed introduced new class member container called beingconnected which is now accessed inside that function.

ned14 commented 9 years ago

Ah, okay. I hope your new mutex lock doesn't deadlock something! One way to find out ...