codeclimate / test-reporter

Code Climate Test Reporter
MIT License
156 stars 76 forks source link

Segfaults #369

Open mainameiz opened 6 years ago

mainameiz commented 6 years ago

Sometimes cc-test-reporter fails with segfaults.

How can I help you to investigate this issue?

mainameiz commented 6 years ago

I can send you core dump or rebuild cc-test-reporter with some debug flags...

wfleming commented 6 years ago

I can send you core dump or rebuild cc-test-reporter with some debug flags...

Both would be useful @mainameiz, thanks.

Can you also please confirm what URL you're installing the test reporter binary from? And provide some details about the environment you're running this in? (OS version, what CI system, etc.). Thanks.

mainameiz commented 6 years ago

I download fresh version of cc-test-reporter for each build from https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64.

Which ldflags should I use?

wfleming commented 6 years ago

Let's hold off on having you compile with custom ldflags until we've eliminated a few other possibilities, I'm not sure offhand what extra ldflags would be useful.

What are the details of the environment you're running the test-reporter in? E.g. OS version, CI system, what hardware it's running on if you know. Output of uname -a might be helpful.

If you don't want to post the coredump here, you can email it to me: will [at] codeclimate.com.

mainameiz commented 6 years ago

We use

We also used https://ci.vexor.io some time ago, and had the same problems. It was Ubuntu (probably 16.04).

I will send you coredump on email next time it will crash.

mainameiz commented 6 years ago

About hardware. It reproduces on virtual machine, on bare metal instance and in another CI (as I wrote above about https://ci.vexor.io)

mainameiz commented 5 years ago

Sent you a coredump at email.

mainameiz commented 5 years ago

Today we faced a huge amount of segfaults. Every CI build fails. We also compile cc-test-reporter with debug flags (https://gist.github.com/dmexe/f3309c470b30df0f85695675559ffde7) and it seems it works without segfaults.

wfleming commented 5 years ago

Thanks @mainameiz.

Unfortunately I haven't been able to extract anything useful from the coredump using dlv. I should have thought of this before, but with a release binary there won't be any debug symbols, and there are known limitations using delve with release binaries AFAICT.

The fact that a binary you've compiled yourself is working fine is instructive. I have suspected that there is probably something unusual with your CI environment causing an incompatibility with our release binaries, and so recompiling your own binary in a similar environment is likely to fix it. I suspect it would still work for you if you compiled your own binary even without debug flags, but it's probably a good idea to keep them on for so that if this new binary eventually segfaults the coredumps will be more readable. Hopefully the custom binary is stable for you, but if it isn't please share those details with us.

mainameiz commented 5 years ago

@wfleming Thanks for a quick feedback.

there is probably something unusual with your CI environment

I wish to draw attention that this problem occurred in different environments. In our case it is reproducable in Jenkins+CentOS and vexor.io (they have some sort of Ubuntu)

We will continue to use our own build of cc-test-reporter and I will write if the problem appears again.

mainameiz commented 5 years ago

Hello, Will.

Our version of cc-test-reporter also segfaults. Just yesterday. It was the first time after the moment we start to use our own version. It segfaults on before-build command. Before that moment rerun of tests of the same commit resolves the issue, but now it reproduces on the same commit again and again. Coredump now contains debug symbols (https://gist.github.com/dmexe/f3309c470b30df0f85695675559ffde7), hope this weill help you to investigate the problem. I send coredump and cc-test-reporter binary to your email.

mainameiz commented 5 years ago

Is there any news?