Code Monkey home page Code Monkey logo

Comments (13)

branderati avatar branderati commented on July 19, 2024

This does not happen consistently. As in, I've had GAP running for a few days and then it dies with this. Then I'll try starting it up, get this immediately. Repeat two more times and it stays up for a day. Today I wasn't able to keep it alive and the first occurrence of this POST request (happens often in Jenkins) killed it.

from oauth2_proxy.

jehiah avatar jehiah commented on July 19, 2024

@branderati I haven't had any good ideas on this as the stack trace you shared doesn't point to any GAP code. Do you still get this issue regularly on the current version?

from oauth2_proxy.

ploxiln avatar ploxiln commented on July 19, 2024

It might also be good to mention which version of go you're using and on which OS.

from oauth2_proxy.

branderati avatar branderati commented on July 19, 2024

I'm giving the latest release a try. I'm running: version go1.2.2 linux/amd64

from oauth2_proxy.

branderati avatar branderati commented on July 19, 2024

Ran into this issue again with the latest build (from 3 hours ago).

x.x.x.x - [email protected] [09/Apr/2015:18:55:14 +0000] jenkins.example.com POST 127.0.0.1:8080 "/jenkins/updateCenter/byId/default/postBack" HTTP/1.0 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36" 403 6543 0.004
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x530260]

goroutine 1178 [running]:
runtime.panic(0x6d39c0, 0xa8a4c8)
        /usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
bufio.(*Reader).Read(0xc2101c3f00, 0xc210340000, 0x1000, 0x1000, 0x1000, ...)
        /usr/local/go/src/pkg/bufio/bufio.go:152 +0x100
io.(*LimitedReader).Read(0xc2102f0880, 0xc210340000, 0x1000, 0x1000, 0x1000, ...)
        /usr/local/go/src/pkg/io/io.go:398 +0xbb
net/http.(*body).Read(0xc2102fcbd0, 0xc210340000, 0x1000, 0x1000, 0xc210340000, ...)
        /usr/local/go/src/pkg/net/http/transfer.go:534 +0x96
io.(*LimitedReader).Read(0xc2102f0c60, 0xc210340000, 0x1000, 0x1000, 0x8, ...)
        /usr/local/go/src/pkg/io/io.go:398 +0xbb
bufio.(*Writer).ReadFrom(0xc2103051c0, 0x7f92eb6c2a70, 0xc2102f0c60, 0x72ca4, 0x0, ...)
        /usr/local/go/src/pkg/bufio/bufio.go:622 +0x15a
io.Copy(0x7f92eb6cc9a8, 0xc2103051c0, 0x7f92eb6c2a70, 0xc2102f0c60, 0x0, ...)
        /usr/local/go/src/pkg/io/io.go:348 +0x124
net/http.(*transferWriter).WriteBody(0xc210137150, 0x7f92eb6cc9a8, 0xc2103051c0, 0x0, 0x0)
        /usr/local/go/src/pkg/net/http/transfer.go:196 +0x57c
net/http.(*Request).write(0xc2100460d0, 0x7f92eb6cc9a8, 0xc2103051c0, 0x0, 0x0, ...)
        /usr/local/go/src/pkg/net/http/request.go:400 +0x7e4
net/http.(*persistConn).writeLoop(0xc2102eb200)
        /usr/local/go/src/pkg/net/http/transport.go:797 +0x185
created by net/http.(*Transport).dialConn
        /usr/local/go/src/pkg/net/http/transport.go:529 +0x61e

goroutine 1 [IO wait]:
net.runtime_pollWait(0x7f92eb6c28c8, 0x72, 0x0)
        /usr/local/go/src/pkg/runtime/netpoll.goc:116 +0x6a
net.(*pollDesc).Wait(0xc21004c920, 0x72, 0x7f92eb6c1110, 0xb)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:81 +0x34
net.(*pollDesc).WaitRead(0xc21004c920, 0xb, 0x7f92eb6c1110)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:86 +0x30
net.(*netFD).accept(0xc21004c8c0, 0x7d9820, 0x0, 0x7f92eb6c1110, 0xb)
        /usr/local/go/src/pkg/net/fd_unix.go:382 +0x2c2
net.(*TCPListener).AcceptTCP(0xc2100005a8, 0x46690b, 0x7f92eb521b20, 0x46690b)
        /usr/local/go/src/pkg/net/tcpsock_posix.go:233 +0x47
net.(*TCPListener).Accept(0xc2100005a8, 0x7f92eb6c29c0, 0xc210303000, 0xc2102eb700, 0x0)
        /usr/local/go/src/pkg/net/tcpsock_posix.go:243 +0x27
net/http.(*Server).Serve(0xc21001feb0, 0x7f92eb6c1900, 0xc2100005a8, 0x0, 0x0)
        /usr/local/go/src/pkg/net/http/server.go:1622 +0x91
main.main()
        /mnt1/ops/goapps/src/github.com/bitly/google_auth_proxy/main.go:126 +0x1c3d

goroutine 9 [syscall]:
runtime.goexit()
        /usr/local/go/src/pkg/runtime/proc.c:1394

goroutine 1177 [IO wait]:
net.runtime_pollWait(0x7f92eb6c2040, 0x72, 0x0)
        /usr/local/go/src/pkg/runtime/netpoll.goc:116 +0x6a
net.(*pollDesc).Wait(0xc2103f6760, 0x72, 0x7f92eb6c1110, 0xb)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:81 +0x34
net.(*pollDesc).WaitRead(0xc2103f6760, 0xb, 0x7f92eb6c1110)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:86 +0x30
net.(*netFD).Read(0xc2103f6700, 0xc2101ba000, 0x1000, 0x1000, 0x0, ...)
        /usr/local/go/src/pkg/net/fd_unix.go:204 +0x2a0
net.(*conn).Read(0xc210369eb0, 0xc2101ba000, 0x1000, 0x1000, 0x30, ...)
        /usr/local/go/src/pkg/net/net.go:122 +0xc5
bufio.(*Reader).fill(0xc2103d2960)
        /usr/local/go/src/pkg/bufio/bufio.go:91 +0x110
bufio.(*Reader).Peek(0xc2103d2960, 0x1, 0x0, 0x0, 0x0, ...)
        /usr/local/go/src/pkg/bufio/bufio.go:119 +0xcb
net/http.(*persistConn).readLoop(0xc2102eb200)
        /usr/local/go/src/pkg/net/http/transport.go:687 +0xb7
created by net/http.(*Transport).dialConn
        /usr/local/go/src/pkg/net/http/transport.go:528 +0x607

goroutine 1173 [IO wait]:
net.runtime_pollWait(0x7f92eb6c2820, 0x72, 0x0)
        /usr/local/go/src/pkg/runtime/netpoll.goc:116 +0x6a
net.(*pollDesc).Wait(0xc210328610, 0x72, 0x7f92eb6c1110, 0xb)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:81 +0x34
net.(*pollDesc).WaitRead(0xc210328610, 0xb, 0x7f92eb6c1110)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:86 +0x30
net.(*netFD).Read(0xc2103285b0, 0xc21009f000, 0x1000, 0x1000, 0x0, ...)
        /usr/local/go/src/pkg/net/fd_unix.go:204 +0x2a0
net.(*conn).Read(0xc210369130, 0xc21009f000, 0x1000, 0x1000, 0x103d2480, ...)
        /usr/local/go/src/pkg/net/net.go:122 +0xc5
crypto/tls.(*block).readFromUntil(0xc2102d7db0, 0x7f92eb6c2a20, 0xc210369130, 0x5, 0xc210369130, ...)
        /usr/local/go/src/pkg/crypto/tls/conn.go:459 +0xb6
crypto/tls.(*Conn).readRecord(0xc21022b280, 0x17, 0x0, 0x8)
        /usr/local/go/src/pkg/crypto/tls/conn.go:539 +0x107
crypto/tls.(*Conn).Read(0xc21022b280, 0xc2102c2000, 0x1000, 0x1000, 0x0, ...)
        /usr/local/go/src/pkg/crypto/tls/conn.go:897 +0x135
bufio.(*Reader).fill(0xc2103d2480)
        /usr/local/go/src/pkg/bufio/bufio.go:91 +0x110
bufio.(*Reader).Peek(0xc2103d2480, 0x1, 0x0, 0x0, 0x0, ...)
        /usr/local/go/src/pkg/bufio/bufio.go:119 +0xcb
net/http.(*persistConn).readLoop(0xc210342500)
        /usr/local/go/src/pkg/net/http/transport.go:687 +0xb7
created by net/http.(*Transport).dialConn
        /usr/local/go/src/pkg/net/http/transport.go:528 +0x607

goroutine 1174 [select]:
net/http.(*persistConn).writeLoop(0xc210342500)
        /usr/local/go/src/pkg/net/http/transport.go:791 +0x271
created by net/http.(*Transport).dialConn
        /usr/local/go/src/pkg/net/http/transport.go:529 +0x61e

from oauth2_proxy.

jehiah avatar jehiah commented on July 19, 2024

This is still a bit of a mystery, but feels like an http issue w/ closed connections.

Can you try with the release built against go 1.4.2? (you should be able to use the binary from) https://github.com/bitly/google_auth_proxy/releases/tag/v1.1.1

from oauth2_proxy.

branderati avatar branderati commented on July 19, 2024

Ok I'll give it a shot

from oauth2_proxy.

sprGeoffrey avatar sprGeoffrey commented on July 19, 2024

Hi (branderati user here). This v1.1.1 version seems to be working well. Haven't had an issue in over a week. I think it worked. Thanks for the help.

from oauth2_proxy.

jehiah avatar jehiah commented on July 19, 2024

awesome news. Thanks for the update!

from oauth2_proxy.

sprGeoffrey avatar sprGeoffrey commented on July 19, 2024

Hello again. Unfortunately ran into this issue again. Still using:

] go version
go version go1.2.2 linux/amd64

src/github.com/bitly/google_auth_proxy] git log -1
commit fd74eae9c3893f13499dd30c498ec6c409fa3c30
Author: Jehiah Czebotar <[email protected]>
Date:   Mon Mar 23 09:19:24 2015 -0400

    tag 1.1.1

And here's the error log:

206.252.214.186 - [email protected] [21/Apr/2015:18:26:25 +0000] jenkins.example.com POST 127.0.0.1:8080 "/jenkins/updateCenter/byId/default/postBack" HTTP/1.0 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:37.0) Gecko/20100101 Firefox/37.0" 403 6543
 0.005
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x52f240]

goroutine 15 [running]:
runtime.panic(0x6cfd20, 0xa814c8)
        /usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
bufio.(*Reader).Read(0xc21033f780, 0xc21032c000, 0x1000, 0x1000, 0x1000, ...)
        /usr/local/go/src/pkg/bufio/bufio.go:152 +0x100
io.(*LimitedReader).Read(0xc2103245a0, 0xc21032c000, 0x1000, 0x1000, 0x1000, ...)
        /usr/local/go/src/pkg/io/io.go:398 +0xbb
net/http.(*body).Read(0xc21036ca20, 0xc21032c000, 0x1000, 0x1000, 0xc21032c000, ...)
        /usr/local/go/src/pkg/net/http/transfer.go:534 +0x96
io.(*LimitedReader).Read(0xc210324920, 0xc21032c000, 0x1000, 0x1000, 0x8, ...)
        /usr/local/go/src/pkg/io/io.go:398 +0xbb
bufio.(*Writer).ReadFrom(0xc2103086c0, 0x7fae2261fa40, 0xc210324920, 0x72ab0, 0x0, ...)
        /usr/local/go/src/pkg/bufio/bufio.go:622 +0x15a
io.Copy(0x7fae226299d0, 0xc2103086c0, 0x7fae2261fa40, 0xc210324920, 0x0, ...)
        /usr/local/go/src/pkg/io/io.go:348 +0x124
net/http.(*transferWriter).WriteBody(0xc210112af0, 0x7fae226299d0, 0xc2103086c0, 0x0, 0x0)
        /usr/local/go/src/pkg/net/http/transfer.go:196 +0x57c
net/http.(*Request).write(0xc2101138f0, 0x7fae226299d0, 0xc2103086c0, 0x0, 0x0, ...)
        /usr/local/go/src/pkg/net/http/request.go:400 +0x7e4
net/http.(*persistConn).writeLoop(0xc2102ead80)
        /usr/local/go/src/pkg/net/http/transport.go:797 +0x185
created by net/http.(*Transport).dialConn
        /usr/local/go/src/pkg/net/http/transport.go:529 +0x61e

goroutine 1 [IO wait]:
net.runtime_pollWait(0x7fae2261f898, 0x72, 0x0)
        /usr/local/go/src/pkg/runtime/netpoll.goc:116 +0x6a
net.(*pollDesc).Wait(0xc210051760, 0x72, 0x7fae2261e0c0, 0xb)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:81 +0x34
net.(*pollDesc).WaitRead(0xc210051760, 0xb, 0x7fae2261e0c0)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:86 +0x30
net.(*netFD).accept(0xc210051700, 0x7d4310, 0x0, 0x7fae2261e0c0, 0xb)
        /usr/local/go/src/pkg/net/fd_unix.go:382 +0x2c2
net.(*TCPListener).AcceptTCP(0xc210000518, 0x45d48b, 0x7fae2247eb38, 0x45d48b)
        /usr/local/go/src/pkg/net/tcpsock_posix.go:233 +0x47
net.(*TCPListener).Accept(0xc210000518, 0x7fae2261f990, 0xc210290418, 0xc210343180, 0x0)
        /usr/local/go/src/pkg/net/tcpsock_posix.go:243 +0x27
net/http.(*Server).Serve(0xc21001fe60, 0x7fae2261e8d0, 0xc210000518, 0x0, 0x0)
        /usr/local/go/src/pkg/net/http/server.go:1622 +0x91
main.main()
        /mnt1/ops/goapps/src/github.com/bitly/google_auth_proxy/main.go:119 +0x1992

goroutine 9 [syscall]:
runtime.goexit()
        /usr/local/go/src/pkg/runtime/proc.c:1394

goroutine 10 [IO wait]:
net.runtime_pollWait(0x7fae2261f748, 0x72, 0x0)
        /usr/local/go/src/pkg/runtime/netpoll.goc:116 +0x6a
net.(*pollDesc).Wait(0xc2100afa70, 0x72, 0x7fae2261e0c0, 0xb)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:81 +0x34
net.(*pollDesc).WaitRead(0xc2100afa70, 0xb, 0x7fae2261e0c0)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:86 +0x30
net.(*netFD).Read(0xc2100afa10, 0xc21009d000, 0x1000, 0x1000, 0x0, ...)
        /usr/local/go/src/pkg/net/fd_unix.go:204 +0x2a0
net.(*conn).Read(0xc210000998, 0xc21009d000, 0x1000, 0x1000, 0x0, ...)
        /usr/local/go/src/pkg/net/net.go:122 +0xc5
crypto/tls.(*block).readFromUntil(0xc2100b3570, 0x7fae2261f9f0, 0xc210000998, 0x5, 0xc210000998, ...)
        /usr/local/go/src/pkg/crypto/tls/conn.go:459 +0xb6
crypto/tls.(*Conn).readRecord(0xc210053780, 0x17, 0x0, 0x8)
        /usr/local/go/src/pkg/crypto/tls/conn.go:539 +0x107
crypto/tls.(*Conn).Read(0xc210053780, 0xc21031e000, 0x1000, 0x1000, 0x0, ...)
        /usr/local/go/src/pkg/crypto/tls/conn.go:897 +0x135
bufio.(*Reader).fill(0xc2102fb600)
        /usr/local/go/src/pkg/bufio/bufio.go:91 +0x110
bufio.(*Reader).Peek(0xc2102fb600, 0x1, 0x0, 0x0, 0x0, ...)
        /usr/local/go/src/pkg/bufio/bufio.go:119 +0xcb
net/http.(*persistConn).readLoop(0xc21005a900)
        /usr/local/go/src/pkg/net/http/transport.go:687 +0xb7
created by net/http.(*Transport).dialConn
        /usr/local/go/src/pkg/net/http/transport.go:528 +0x607

goroutine 11 [select]:
net/http.(*persistConn).writeLoop(0xc21005a900)
        /usr/local/go/src/pkg/net/http/transport.go:791 +0x271
created by net/http.(*Transport).dialConn
        /usr/local/go/src/pkg/net/http/transport.go:529 +0x61e

goroutine 14 [IO wait]:
net.runtime_pollWait(0x7fae2261f6a0, 0x72, 0x0)
        /usr/local/go/src/pkg/runtime/netpoll.goc:116 +0x6a
net.(*pollDesc).Wait(0xc2103264c0, 0x72, 0x7fae2261e0c0, 0xb)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:81 +0x34
net.(*pollDesc).WaitRead(0xc2103264c0, 0xb, 0x7fae2261e0c0)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:86 +0x30
net.(*netFD).Read(0xc210326460, 0xc21032b000, 0x1000, 0x1000, 0x0, ...)
        /usr/local/go/src/pkg/net/fd_unix.go:204 +0x2a0
net.(*conn).Read(0xc210304b48, 0xc21032b000, 0x1000, 0x1000, 0x30, ...)
        /usr/local/go/src/pkg/net/net.go:122 +0xc5
bufio.(*Reader).fill(0xc2102fbba0)
        /usr/local/go/src/pkg/bufio/bufio.go:91 +0x110
bufio.(*Reader).Peek(0xc2102fbba0, 0x1, 0x0, 0x0, 0x0, ...)
        /usr/local/go/src/pkg/bufio/bufio.go:119 +0xcb
net/http.(*persistConn).readLoop(0xc2102ead80)
        /usr/local/go/src/pkg/net/http/transport.go:687 +0xb7
created by net/http.(*Transport).dialConn
        /usr/local/go/src/pkg/net/http/transport.go:528 +0x607

goroutine 88 [select]:
net/http.(*persistConn).writeLoop(0xc210249e80)
        /usr/local/go/src/pkg/net/http/transport.go:791 +0x271
created by net/http.(*Transport).dialConn
        /usr/local/go/src/pkg/net/http/transport.go:529 +0x61e

goroutine 87 [IO wait]:
net.runtime_pollWait(0x7fae2261f010, 0x72, 0x0)
        /usr/local/go/src/pkg/runtime/netpoll.goc:116 +0x6a
net.(*pollDesc).Wait(0xc210112d80, 0x72, 0x7fae2261e0c0, 0xb)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:81 +0x34
net.(*pollDesc).WaitRead(0xc210112d80, 0xb, 0x7fae2261e0c0)
        /usr/local/go/src/pkg/net/fd_poll_runtime.go:86 +0x30
net.(*netFD).Read(0xc210112d20, 0xc210118000, 0x1000, 0x1000, 0x0, ...)
        /usr/local/go/src/pkg/net/fd_unix.go:204 +0x2a0
net.(*conn).Read(0xc210304c28, 0xc210118000, 0x1000, 0x1000, 0x30, ...)
        /usr/local/go/src/pkg/net/net.go:122 +0xc5
bufio.(*Reader).fill(0xc210116240)
        /usr/local/go/src/pkg/bufio/bufio.go:91 +0x110
bufio.(*Reader).Peek(0xc210116240, 0x1, 0x0, 0x0, 0x0, ...)
        /usr/local/go/src/pkg/bufio/bufio.go:119 +0xcb
net/http.(*persistConn).readLoop(0xc210249e80)
        /usr/local/go/src/pkg/net/http/transport.go:687 +0xb7
created by net/http.(*Transport).dialConn
        /usr/local/go/src/pkg/net/http/transport.go:528 +0x607

Looks like the stack trace is longer than last time?

from oauth2_proxy.

jehiah avatar jehiah commented on July 19, 2024

@branderati @sprGeoffrey thanks for the update. It looks like you are using version 1.1.1 of this project compiled with go 1.2.2. Can you try with the release builds (linked above on the github release page) built with go1.4.2?

This still appears to be a bug in net/http (I believe it's golang/go#7848) which was fixed in a subsequent Go version as there is no GAP code referenced in your stack traces.

from oauth2_proxy.

sprGeoffrey avatar sprGeoffrey commented on July 19, 2024

Ok. I'll give that a shot next.

from oauth2_proxy.

sprGeoffrey avatar sprGeoffrey commented on July 19, 2024

The newer version of go seems to be working. Haven't had an issue on our newer boxes. Thanks!

from oauth2_proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.