Skip to content

thread concurrency problem Probe.get_request_headers function #301

Description

@justb4

Describe the bug
Probe.get_request_headers() member uses and returns Probe.REQUEST_HEADERS class var. In some cases this causes concurrency issue leading to RuntimeError, dictionary changed size during iteration within GHC Runner app mainly with authenticated Resources.

To Reproduce
Steps to reproduce the behavior, e.g.:

  1. Create multiple Auth Resources in GHC
  2. Let Runner run some time
  3. Now and then Auth 401 error or RuntimeError, dictionary changed size during iteration
  4. very hard to reproduce but code is clear

Expected Behavior
No errors.

Screenshots or Logfiles
Mainly this pattern, with 401 errors:
image

Context (please complete the following information):

  • OS: all
  • Browser N.A.
  • Browser Version N.A.
  • Python Version N.A.
  • GeoHealthCheck Version latest master on 27.10.2019.

If running with Docker: N.A.

Additional context
See
https://github.com/geopython/GeoHealthCheck/blob/master/GeoHealthCheck/probe.py#L231
Need to do deepcopy here!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions