Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wego crashes with segmentation fault #6

Closed
ArtemZ opened this issue May 12, 2015 · 13 comments
Closed

Wego crashes with segmentation fault #6

ArtemZ opened this issue May 12, 2015 · 13 comments
Labels

Comments

@ArtemZ
Copy link

ArtemZ commented May 12, 2015

Hello,

I'm trying to launch wego under ubuntu 14.04 x64, but it fails each time I try to launch it with the following error:

$ ~/.gocode/bin/wego 
unexpected fault address 0x7f5000000011
fatal error: fault
[signal 0xb code=0x1 addr=0x7f5000000011]

goroutine 3 [running]:

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

    :0

goroutine 1 [select]:
main.main
    /home/artemz/.gocode/src/github.com/schachmat/wego/we.go:441
@schachmat
Copy link
Owner

Heyho Artem,

unfortunately I cannot reproduce this. What is the golang version you're using? Which commit of wego are you using? On master line 441 would be res, err := http.Get(uri + strings.Join(params, "&")).

--schachmat

@ArtemZ
Copy link
Author

ArtemZ commented May 13, 2015

I'm using go version xgcc (Ubuntu 4.9.1-0ubuntu1) 4.9.1 linux/amd64, commit is 4004fd5

@schachmat
Copy link
Owner

I cannot find a package named xgcc in the ubuntu repositories. The relevant package name would be golang-go

@mikegioia
Copy link

I got this same error on Ubuntu 14.04. All I see is "core dumped", however. I'm not familiar with generating go stack traces, but I'd be willing to debug this for you if you have something I can run/test.

@schachmat
Copy link
Owner

As the mentioned line of failure mainly contains the http.Get function, please make sure you are not using an old version of golang. I am using v1.4.2 and cannot reproduce this issue. As far as I can see, Ubuntu 14.04 still uses v1.2.1. Make sure this version is up to date with sudo apt-get update && sudo apt-get upgrade. Any further hints on this issue are welcome.

@schachmat schachmat added the bug label May 14, 2015
@mikegioia
Copy link

I just re-installed v1.2.1 and now I just see: 2015/05/14 12:55:54 Malformed response.

Is there an easy way I can debug this, or is it just a requirement to have 1.4.2 of go? If so, oy vey. This is the LTS Ubuntu :(

@schachmat
Copy link
Owner

See the setup section in the README. Until you have an API key setup, this error message is to be expected.

@ArtemZ does reinstalling golang-go also solve the problem for you?

@mikegioia
Copy link

Very odd, I removed the package gccgo-go and installed the package golang which produced the "Malformed response" output.

I grabbed an API key, set it in the ~/.wegorc, and then ran "wego" again from the CLI and I get the weather visual. I run a second time, and I get the core dump!

screenshot from 2015-05-14 13 12 07

It appears as if it only runs correctly once every few minutes.

@schachmat
Copy link
Owner

Do you have a special network connection (vpn, tor, some corporate firewall, …)? Does it fail consistently or randomly? Can someone with Ubuntu 14.04 confirm, that it is working consistently?

@mikegioia
Copy link

Completely randomly. I just ran it 3 times in 3 seconds, then the 4th time it failed. No special network config either.

@schachmat
Copy link
Owner

Can you uncomment the two debug output lines in main() and paste the output if any of a failed run?

@mikegioia
Copy link

Okay I think I know what's going on. When I compile this app with gccgo-go (4.9.1) I get the segfaults. When I compile it with the package golang (1.2.1) the app runs perfectly. I'm assuming this has something to do with gccgo-go. Which is sad because that's the suggested package that Ubuntu gives you when you type "go get ..." and you don't have the go compiler installed.

Either way, this runs fine on golang1.2.1 on Ubuntu 14.04 with no issues. I could run the segfault tests using gccgo-go for you if you want, but I'd have to do that tonight.

I think this is the same as ArtemZ since he was using 4.9.1 (of package gccgo-go).

@schachmat
Copy link
Owner

Thanks @mikegioia for helping resolve this issue. You don't have to run the segfault tests. They will probably also indicate a failure in the http.Get line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants