Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1366

listening for SIGPIPE will exit on network errors

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.13
    • Affects Version/s: 3.3.11
    • Component/s: mongostat
    • None
    • Platforms 2016-08-26

      We currently listen for SIGPIPE throughout the tools. However, SIGPIPE may also be received if we write on a closed network connection. Such errors shouldn't cause the program to exit immediately or necessarily trigger cleanup behavior. If we stop explicitly listening for SIGPIPE, Go will still cause an exit if an EPIPE is received when writing to stdout or stderr. Go's behavior surrounding SIGPIPE is documents on https://golang.org/pkg/os/signal/ in the "SIGPIPE" section.

      This issue is manifesting itself as an intermittent failure in the stat_discover_shard test. That test starts and stops servers while mongostat is still running and looks at how the output changes. Because we stop one of the servers it is monitoring, it received a SIGPIPE and exits.

            Assignee:
            zach.snow Zach Snow
            Reporter:
            zach.snow Zach Snow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: