title: How to analyze Go (golang) crash logs
body: <p>So my application crashed and I can't for the life of me figure out what the problem is only from the error messages. Because it ran for hours fine.</p>
  
  <p>this is the error</p>
  
  <pre><code>(err): net.(*pollDesc).WaitRead(0xc20802ac30, 0x0, 0x0)
  (err):     /usr/lib/go/src/pkg/net/fd_poll_runtime.go:89 +0x42
  (err): net.(*netFD).Read(0xc20802abd0, 0xc208083000, 0x1000, 0x1000, 0x0, 0x7fab4f8082b8, 0xb)
  (err):     /usr/lib/go/src/pkg/net/fd_unix.go:242 +0x34c
  (err): net.(*conn).Read(0xc208038090, 0xc208083000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
  (err):     /usr/lib/go/src/pkg/net/net.go:122 +0xe7
  (err): bufio.(*Reader).fill(0xc208004540)
  (err):     /usr/lib/go/src/pkg/bufio/bufio.go:97 +0x1b3
  (err): bufio.(*Reader).ReadSlice(0xc208004540, 0x7ffff8000000000a, 0x0, 0x0, 0x0, 0x0, 0x0)
  (err):     /usr/lib/go/src/pkg/bufio/bufio.go:298 +0x22c
  (err): bufio.(*Reader).ReadLine(0xc208004540, 0x0, 0x0, 0x0, 0x200, 0x0, 0x0)
  (err):     /usr/lib/go/src/pkg/bufio/bufio.go:326 +0x69
  (err): net/textproto.(*Reader).readLineSlice(0xc208022d50, 0x0, 0x0, 0x0, 0x0, 0x0)
  (err):     /usr/lib/go/src/pkg/net/textproto/reader.go:55 +0x9d
  (err): net/textproto.(*Reader).ReadLine(0xc208022d50, 0x0, 0x0, 0x0, 0x0)
  (err):     /usr/lib/go/src/pkg/net/textproto/reader.go:36 +0x4e
  (err): main.(*Bot).ListenToConnection(0xc208046460, 0x7fab4f809518, 0xc208038090)
  (err):     /home/gempir/gempbroker/main.go:73 +0xab
  (err): created by main.(*Bot).CreateConnection
  (err):     /home/gempir/gempbroker/main.go:106 +0x8a3
  </code></pre>
  
  <p>I found that main.go:73 which is a simple Readline reading from a TCP connection</p>
  
  <pre><code>reader := bufio.NewReader(conn)
      tp := textproto.NewReader(reader)
      for {
          line, err := tp.ReadLine()
          if err != nil {
              break // break loop on errors
          }
          // do stuff
      }
  </code></pre>
  
  <p>main.go:106 just creates a goroutine for listening to the connection</p>
  
  <pre><code>go listenToConnection(conn)
  </code></pre>
  
  <p>How do I find out what the error logs actually mean and find a solution to my problem?</p>