Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SocketNotifier not thread-safe #2345

Closed
aleks-f opened this issue May 23, 2018 · 1 comment
Closed

SocketNotifier not thread-safe #2345

aleks-f opened this issue May 23, 2018 · 1 comment
Assignees

Comments

@aleks-f
Copy link
Member

aleks-f commented May 23, 2018

getting race reports from reactor tests with thread sanitizer build

WARNING: ThreadSanitizer: data race (pid=27893)
  Write of size 8 at 0x7d0c00009ba8 by thread T2:
    #0 operator delete(void*) <null> (libtsan.so.0+0x000000025d19)
    #1 Poco::Net::StreamSocketImpl::~StreamSocketImpl() <null> (libPocoNet.so.80+0x0000000cce29)
    #2 Poco::Net::Socket::~Socket() <null> (libPocoNet.so.80+0x00000008c005)

looks like the impl pointer should be atomic (or access protected by mutex)?

@aleks-f aleks-f changed the title Socket not thread-safe SocketReactor not thread-safe May 31, 2018
@aleks-f aleks-f changed the title SocketReactor not thread-safe SocketNotifier not thread-safe May 31, 2018
@aleks-f aleks-f added this to the Release 1.9.1 milestone May 31, 2018
aleks-f added a commit that referenced this issue May 31, 2018
aleks-f added a commit that referenced this issue May 31, 2018
@aleks-f
Copy link
Member Author

aleks-f commented May 31, 2018

turned out to be a combination of SocketNotifier and EchoService test class thread unsafe code.

aleks-f added a commit that referenced this issue Jun 2, 2018
* add PMTU discovery #2329

* add socket gather/scatter capabilities #2330 (win, udp)

* enable WSAPoll

* add FastMemoryPool

* add receiveFrom() with native args

* allow copying of StringTokenizer

* add AtomicFlag and SpinlockMutex

* update .gitignore

* UDPServer and client #2343 (windows)

* fix warnings

* fix warnings

* regenerate Net VS solutions

* regenerate CppUnit projects/solutions

* clang fixes

* gcc fixes

* try to fix travis

* more travis fixes

* more travis fixes

* handle UDPClient exception

* fix makefiles and init order warnings

* add UNIX gather/scatter sendto/recvfrom implementations and tests

* run travis tests as sudo

* try to run tests as sudo, 2nd attempt

* fix warning

* use mutex in reactor

* lock-order-inversion in SocketReactor #2346

* add PMTU discovery #2329 (linux)

* ICMPSocket does not check reply address #1921

* remove some ignored tests

* add PMTU discovery #2329 (reconcile logic with #1921)

* fix native receiveFrome()

* reinstate ignoring of proxy errors

* add testMTU to ignore list

* add include atomic

* NTPClient not checking reply address #2348

* some ICMP/MTU fixes

* UDPSocketReader cleanup

* resolve some socket inheritance warnings

* add NTP time sync to ignored tests

* SocketNotifier not thread-safe #2345

* prevent x64 samples build attempt for win32

* build TestApp and Library

* fix ICMP tests

* regen VS projects

* regen VS projects and add missing 2012 files

* remove debug prints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants