Skip to content

Conversation

@masaori335
Copy link
Contributor

While tracking #4726, we found a SCOPED_MUTEX_LOCK which doesn't make sense.
This might introduce other crash, but it will give us some clues of root cause.

@masaori335 masaori335 added this to the 9.0.0 milestone Jan 7, 2019
@masaori335 masaori335 self-assigned this Jan 7, 2019
@masaori335 masaori335 requested review from oknet and scw00 January 7, 2019 03:37
@oknet
Copy link
Member

oknet commented Jan 7, 2019

@masaori335

The mutex of NetAccept::action_->continuation is optional when the EVENT_ERROR event is called back.

diff --git a/iocore/net/UnixNetAccept.cc b/iocore/net/UnixNetAccept.cc
index 21f39c4ac..9c3e40fb7 100644
--- a/iocore/net/UnixNetAccept.cc
+++ b/iocore/net/UnixNetAccept.cc
@@ -322,7 +322,7 @@ NetAccept::do_blocking_accept(EThread *t)
         return 0;
       }
       if (!action_->cancelled) {
-        SCOPED_MUTEX_LOCK(lock, action_->mutex, t);
+        SCOPED_MUTEX_LOCK(lock, action_->mutex ? action_->mutex : t->mutex, t);
         action_->continuation->handleEvent(EVENT_ERROR, (void *)(intptr_t)res);
         Warning("accept thread received fatal error: errno = %d", errno);
       }

@masaori335
Copy link
Contributor Author

Duplicated with #4755.

@masaori335 masaori335 closed this Jan 7, 2019
@zwoop zwoop removed this from the 9.0.0 milestone Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants