cli icon indicating copy to clipboard operation
cli copied to clipboard

An occasional Panic on one of our RHEL boxes

Open youngm opened this issue 12 years ago • 17 comments

We get an occasional panic on some of our linux boxes.

Googling turned up this Go Bug that may be related fixed in 1.3: https://code.google.com/p/go/issues/detail?id=7848

Thoughts?

Error dumping response
 write tcp 10.255.1.20:80: broken pipe


 Aww shucks.

 Something completely unexpected happened. This is a bug in cf.
 Please file this bug : https://github.com/cloudfoundry/cli/issues
 Tell us that you ran this command:

    cf push -f manifest-stage.yml

 this error occurred:

    runtime error: invalid memory address or nil pointer dereference

 and this stack trace:

    goroutine 1 [running]:
    main.displayCrashDialog(0xc210a89c30, 0x40)
        /home/ubuntu/go/src/github.com/cloudfoundry/cli/main/main.go:173 +0xe5
    main.handlePanics()
        /home/ubuntu/go/src/github.com/cloudfoundry/cli/main/main.go:136 +0x144
    runtime.panic(0x87e660, 0xfe42c8)
        /usr/local/go/src/pkg/runtime/panic.c:248 +0x106
    io/ioutil.func·001()
        /usr/local/go/src/pkg/io/ioutil/ioutil.go:29 +0xf0
    runtime.panic(0x87e660, 0xfe42c8)
        /usr/local/go/src/pkg/runtime/panic.c:248 +0x106
    bytes.(*Buffer).ReadFrom(0xc210c381c0, 0x0, 0x0, 0x0, 0x0, ...)
        /usr/local/go/src/pkg/bytes/buffer.go:169 +0x1f1
    io/ioutil.readAll(0x0, 0x0, 0x200, 0x0, 0x0, ...)
        /usr/local/go/src/pkg/io/ioutil/ioutil.go:32 +0x156
    io/ioutil.ReadAll(0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /usr/local/go/src/pkg/io/ioutil/ioutil.go:41 +0x3f
    github.com/cloudfoundry/cli/cf/net.Gateway.doRequestAndHandlerError(0x7f66284c4e88, 0xc2100aeb60, 0xa05cb8, 0x1, 0x12a05f200, ...)
        /home/ubuntu/go/src/github.com/cloudfoundry/cli/tmp/cli_gopath/src/github.com/cloudfoundry/cli/cf/net

youngm avatar Jul 09 '14 17:07 youngm

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/74715492.

cf-gitbot avatar Jul 09 '14 17:07 cf-gitbot

@youngm Thanks for the report.

What version of the cf cli are you running?

The stack trace listed above looks different than the one discussed in the go forums. Was there something in addition to the error message text that led you to think the two issues are related?

Thanks, @DanLavine and @dliebreich CF Community Pair

ghost avatar Jul 09 '14 18:07 ghost

Sorry, I didn't really look too closely at the issue I sent you. The issue google found for me was:

https://code.google.com/p/go/issues/detail?id=7527

It's panic is more like the one I provided. It issue was marked as a duplicate of the one I linked to above.

youngm avatar Jul 09 '14 19:07 youngm

@youngm Thanks for the clarification and the new link.

What version of the cf cli are you using?

We will let the CLI team know about this panic, so they can reassess the priority of moving to go 1.3. (/cc @lcddave )

Thanks, @DanLavine and @dliebreich CF Community Pair

ghost avatar Jul 09 '14 20:07 ghost

6.2.0-c9d4aaa

Thanks, Mike

youngm avatar Jul 09 '14 20:07 youngm

@youngm Thanks.

@lcddave Should we move this into the CLI tracker?

Thanks, @DanLavine and @dliebreich CF Community Pair

ghost avatar Jul 09 '14 20:07 ghost

Sure you can move it. We do have moving to golang 1.3 in tracker, but its a bit further down the line.

@youngm is this a frequent problem you're seeing? If so, I can raise the priority of this item.

lcddave avatar Jul 09 '14 21:07 lcddave

@lcddave It is not a major issue at this point in time. I'll update the issue if it becomes more of a problem.

youngm avatar Jul 09 '14 21:07 youngm

In my humble opinion, occasional panics are worth fixing even if it's just once a week, or one out of every thousand attempts. This is the exact sort of bug that we were hoping would be filed when we introduced the aww shucks message. So glad that you took the time out of your day to report it @youngm !

tjarratt avatar Jul 10 '14 21:07 tjarratt

Reverted 1.3.1 upgrade and halting upgrade effort until Google adds a PR that we contributed that fixes issue encountered with 1.3.1. Hopeing to see fix in 1.3.2

goehmen avatar Sep 23 '14 21:09 goehmen

I'm getting a consistent (three in a row) panic on an ubuntu docker container on a Cloud Foundry GoCD agent: https://www.gocd.cf-app.com/go/tab/build/detail/CFExampleAppRuby/61/deploy/3/deploy (need auth for this link).

camelpunch avatar Sep 29 '14 09:09 camelpunch

@camelpunch what version of the CLI are you using? The error you are getting looks to be unrelated to this one (not printing an 'aww shucks' panic, but exploding in a regular panic).

drich10 avatar Oct 14 '14 23:10 drich10

The script that I'm running downloads https://cli.run.pivotal.io/stable?release=debian64&source=github and uses that. The output from the build says it installed 6.6.1.

camelpunch avatar Oct 15 '14 09:10 camelpunch

@camelpunch We went ahead and confirmed that cf is broken inside of your docker image. We downloaded the stable release on our own from that url and confirmed it worked in a basic docker image:

# DOCKER-VERSION 1.2.0

# base
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -qy build-essential wget

# cf
ADD https://cli.run.pivotal.io/stable?release=debian64&source=github cf.deb
RUN     dpkg -i cf.deb

After bisecting the image we found the offending line to be USER web. We think this user does not have permission to write the configuration file (written by cf when running a command) to the HOME dir. Is it necessary for you to run this test as an unprivileged user?

drich10 avatar Oct 15 '14 17:10 drich10

Nice sleuth work. It's not necessary, but I'd prefer to. I'm sure I can grant the user permission to write the file. Perhaps this exception should be caught and reported to the user in a meaningful way?

camelpunch avatar Oct 15 '14 17:10 camelpunch

You could also change the value of CF_HOME to a directory where the user has permissions as a workaround. I created story in tracker here: https://www.pivotaltracker.com/story/show/80759488 to be prioritized. Glad we could help!

drich10 avatar Oct 15 '14 18:10 drich10

I haven't seen this issue for a log time and 6.12.3 upgraded to go 1.4.2 so I'm going to close this for now.

youngm avatar Sep 03 '15 17:09 youngm