You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/09/27 19:00:46 UTC

[GitHub] [trafficserver] bneradt opened a new pull request #8358: Locking around SSLSecret::secret_map access

bneradt opened a new pull request #8358:
URL: https://github.com/apache/trafficserver/pull/8358


   This fixes an infrequent crash that would happen in getOrLoadSecret.
   Looking at the core, the iterators for SSLSecret::secret_map in
   SSLSecret::getOrLoadSecret were corrupted. This patch serializes access
   to the structure so that multiple threads don't stomp on each other.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] bneradt commented on a change in pull request #8358: Locking around SSLSecret::secret_map access

Posted by GitBox <gi...@apache.org>.
bneradt commented on a change in pull request #8358:
URL: https://github.com/apache/trafficserver/pull/8358#discussion_r717105952



##########
File path: iocore/net/SSLSecret.cc
##########
@@ -72,6 +72,7 @@ SSLSecret::loadFile(const std::string &name, std::string &data_item)
 bool
 SSLSecret::setSecret(const std::string &name, const char *data, int data_len)
 {
+  std::scoped_lock _(secret_map_mutex);

Review comment:
       sure.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] zwoop commented on pull request #8358: Locking around SSLSecret::secret_map access

Posted by GitBox <gi...@apache.org>.
zwoop commented on pull request #8358:
URL: https://github.com/apache/trafficserver/pull/8358#issuecomment-930603637


   Cherry-picked to v9.2.x branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] zwoop commented on pull request #8358: Locking around SSLSecret::secret_map access

Posted by GitBox <gi...@apache.org>.
zwoop commented on pull request #8358:
URL: https://github.com/apache/trafficserver/pull/8358#issuecomment-930603637


   Cherry-picked to v9.2.x branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] bryancall commented on a change in pull request #8358: Locking around SSLSecret::secret_map access

Posted by GitBox <gi...@apache.org>.
bryancall commented on a change in pull request #8358:
URL: https://github.com/apache/trafficserver/pull/8358#discussion_r717104065



##########
File path: iocore/net/SSLSecret.cc
##########
@@ -72,6 +72,7 @@ SSLSecret::loadFile(const std::string &name, std::string &data_item)
 bool
 SSLSecret::setSecret(const std::string &name, const char *data, int data_len)
 {
+  std::scoped_lock _(secret_map_mutex);

Review comment:
       Could we please rename this to lock?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] bryancall commented on a change in pull request #8358: Locking around SSLSecret::secret_map access

Posted by GitBox <gi...@apache.org>.
bryancall commented on a change in pull request #8358:
URL: https://github.com/apache/trafficserver/pull/8358#discussion_r717104065



##########
File path: iocore/net/SSLSecret.cc
##########
@@ -72,6 +72,7 @@ SSLSecret::loadFile(const std::string &name, std::string &data_item)
 bool
 SSLSecret::setSecret(const std::string &name, const char *data, int data_len)
 {
+  std::scoped_lock _(secret_map_mutex);

Review comment:
       Could we please rename this to lock?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] bneradt merged pull request #8358: Locking around SSLSecret::secret_map access

Posted by GitBox <gi...@apache.org>.
bneradt merged pull request #8358:
URL: https://github.com/apache/trafficserver/pull/8358


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] bneradt merged pull request #8358: Locking around SSLSecret::secret_map access

Posted by GitBox <gi...@apache.org>.
bneradt merged pull request #8358:
URL: https://github.com/apache/trafficserver/pull/8358


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] bneradt commented on a change in pull request #8358: Locking around SSLSecret::secret_map access

Posted by GitBox <gi...@apache.org>.
bneradt commented on a change in pull request #8358:
URL: https://github.com/apache/trafficserver/pull/8358#discussion_r717105952



##########
File path: iocore/net/SSLSecret.cc
##########
@@ -72,6 +72,7 @@ SSLSecret::loadFile(const std::string &name, std::string &data_item)
 bool
 SSLSecret::setSecret(const std::string &name, const char *data, int data_len)
 {
+  std::scoped_lock _(secret_map_mutex);

Review comment:
       sure.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org