Skip to content

data race between UntilInterrupted() and other threads #45

@ldemailly

Description

@ldemailly

In fortio proxy for instance (when having the TLS server thread):

==================
WARNING: DATA RACE
Read at 0x00010108d5a4 by goroutine 8:
  fortio.org/log.colorGID()
      /Users/dl/go/pkg/mod/fortio.org/log@v1.17.1/console_logging.go:154 +0x40
  fortio.org/log.logUnconditionalf()
      /Users/dl/go/pkg/mod/fortio.org/log@v1.17.1/logger.go:469 +0x144
  fortio.org/log.logPrintf()
      /Users/dl/go/pkg/mod/fortio.org/log@v1.17.1/logger.go:436 +0x1c4
  fortio.org/log.Infof()
      /Users/dl/go/pkg/mod/fortio.org/log@v1.17.1/logger.go:532 +0x878
  main.startTLSProxy()
      /Users/dl/dev/fortio.org/proxy/proxy_main.go:135 +0x728
  main.main.gowrap1()
      /Users/dl/dev/fortio.org/proxy/proxy_main.go:110 +0x34

Previous write at 0x00010108d5a4 by main goroutine:
  fortio.org/cli.UntilInterrupted()
      /Users/dl/go/pkg/mod/fortio.org/cli@v1.9.2/cli.go:266 +0x40
  fortio.org/scli.UntilInterrupted()
      /Users/dl/go/pkg/mod/fortio.org/scli@v1.15.3/scli.go:132 +0xe44
  main.main()
      /Users/dl/dev/fortio.org/proxy/proxy_main.go:112 +0xe40

Goroutine 8 (running) created at:
  main.main()
      /Users/dl/dev/fortio.org/proxy/proxy_main.go:110 +0xe14
==================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions