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

Data race in Poco::Net::HTTPServerConnection::onServerStopped #2634

Closed
jbulow opened this issue Mar 8, 2019 · 2 comments
Closed

Data race in Poco::Net::HTTPServerConnection::onServerStopped #2634

jbulow opened this issue Mar 8, 2019 · 2 comments
Assignees
Labels

Comments

@jbulow
Copy link

jbulow commented Mar 8, 2019

Expected behavior

No data race.

Actual behavior

Data race

Steps to reproduce the problem

Stop Poco HTTP server

POCO version

1.9.0

Compiler and version

clang-7

Operating system and version

ubuntu 18.04

Other relevant information

WARNING: ThreadSanitizer: data race (pid=17123)
Write of size 1 at 0x7b180006a950 by main thread (mutexes: write M164471):
#0 Poco::Net::HTTPServerConnection::onServerStopped(bool const&) /artifacts/external/poco/source/poco-1.9.0-all/Net/src/HTTPServerConnection.cpp:143:11 (libPocoNetd.so.60+0x13f3d5)
#1 Poco::Delegate<Poco::Net::HTTPServerConnection, bool const, false>::notify(void const*, bool const&) /artifacts/external/poco/source/poco-1.9.0-all/Foundation/include/Poco/Delegate.h:140:4 (libPocoNetd.so.60+0x1412e5)
#2 Poco::DefaultStrategy<bool const, Poco::AbstractDelegate >::notify(void const*, bool const&) /artifacts/external/poco/source/poco-1.9.0-all/Foundation/include/Poco/DefaultStrategy.h:61:11 (libPocoNetd.so.60+0x117
5e9)
#3 Poco::AbstractEvent<bool const, Poco::DefaultStrategy<bool const, Poco::AbstractDelegate >, Poco::AbstractDelegate, Poco::FastMutex>::notify(void const*, bool const&) /artifacts/external/poco/source/p
oco-1.9.0-all/Foundation/include/Poco/AbstractEvent.h:244:12 (libPocoNetd.so.60+0x11725f)
#4 Poco::AbstractEvent<bool const, Poco::DefaultStrategy<bool const, Poco::AbstractDelegate >, Poco::AbstractDelegate, Poco::FastMutex>::operator()(void const*, bool const&) /artifacts/external/poco/sour
ce/poco-1.9.0-all/Foundation/include/Poco/AbstractEvent.h:215:3 (libPocoNetd.so.60+0x116bb8)
#5 Poco::Net::HTTPServer::stopAll(bool) /artifacts/external/poco/source/poco-1.9.0-all/Net/src/HTTPServer.cpp:52:2 (libPocoNetd.so.60+0x116504)
.....
#13 Poco::Util::Application::run() /artifacts/external/poco/source/poco-1.9.0-all/Util/src/Application.cpp:334:8 (libPocoUtild.so.60+0x9b355)
#14 Poco::Util::ServerApplication::run() /artifacts/external/poco/source/poco-1.9.0-all/Util/src/ServerApplication.cpp:96:22 (libPocoUtild.so.60+0xccbc8)
#15 Poco::Util::ServerApplication::run(int, char**) /artifacts/external/poco/source/poco-1.9.0-all/Util/src/ServerApplication.cpp:611:9 (libPocoUtild.so.60+0xcceb4)
...

Previous read of size 1 at 0x7b180006a950 by thread T2:
#0 Poco::Net::HTTPServerConnection::run() /artifacts/external/poco/source/poco-1.9.0-all/Net/src/HTTPServerConnection.cpp:61:10 (libPocoNetd.so.60+0x13f860)
#1 Poco::Net::TCPServerConnection::start() /artifacts/external/poco/source/poco-1.9.0-all/Net/src/TCPServerConnection.cpp:43:3 (libPocoNetd.so.60+0x180054)
#2 Poco::Net::TCPServerDispatcher::run() /artifacts/external/poco/source/poco-1.9.0-all/Net/src/TCPServerDispatcher.cpp:118:18 (libPocoNetd.so.60+0x1aa797)
#3 Poco::PooledThread::run() /artifacts/external/poco/source/poco-1.9.0-all/Foundation/src/ThreadPool.cpp:199:14 (libPocoFoundationd.so.60+0x2d9c2a)
#4 Poco::(anonymous namespace)::RunnableHolder::run() /artifacts/external/poco/source/poco-1.9.0-all/Foundation/src/Thread.cpp:55:11 (libPocoFoundationd.so.60+0x2d4cea)
#5 Poco::ThreadImpl::runnableEntry(void*) /artifacts/external/poco/source/poco-1.9.0-all/Foundation/src/Thread_POSIX.cpp:345:27 (libPocoFoundationd.so.60+0x2d2ef0)

@obiltschnig obiltschnig self-assigned this Mar 8, 2019
@obiltschnig obiltschnig added this to the Release 1.9.1 milestone Mar 8, 2019
@github-actions
Copy link

This issue is stale because it has been open for 365 days with no activity.

@github-actions github-actions bot added the stale label Mar 15, 2022
@aleks-f
Copy link
Member

aleks-f commented May 29, 2022

I have cleaned up Net completely from tsan warnings. I'll leave this open for the next release, but it's likely fixed

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

No branches or pull requests

3 participants