-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
runtime: TestGdbPythonCgo fails on MIPS32 #18784
Comments
I run the gdb command in runtime/runtime-gdb_test.go manually, the failure actually happens much rarer, once per 10-20 runs. Here is the output on failure (I added an "echo START" before "run"):
On a success run:
It seems the problem might be gdb loading libthread_db? |
I added "-ex" "set debug libthread-db 1" in gdb command. It seems indeed related to libthread:
On success:
|
Perhaps it just needs |
It actually has pthread:
The mystery part is why it fails sometimes, with the same binary... |
Would it make sense just to turn off libthread_db, if it will fix the test flakiness? Doesn't help with the underlying problem, though. I'll send an experimental CL. |
CL https://golang.org/cl/35734 mentions this issue. |
By
So, I suspect that #18745 didn't get fixed for MIPS. It should be easy to confirm if that's the case. @cherrymui, since you have access to a MIPS machine, can you run |
I don't think the MIPS problem can be related to the fix for #18745, because the MIPS problem is sporadic, and the fix for #18745 is deterministic. If the MIPS problem were directly related to that, it would always fail. Since it mostly succeeds, I think the problem must be something else. But I don't know what. If we don't figure it out in a couple of hours, we should skip the test on MIPS. |
@thanm disabling auto-loading libthread_db doesn't seem to help. I still see occasional failure running the gdb command manually. @Dhananjay92 |
Maybe libthread is not the problem?
I think this is the problem, but I don't know if it is related to libthread. |
Which version of glibc? And what does that line in rtld.c do? (I assume
it's some kind of assert indicating that our binary is somehow wrong.)
Is ASLR effective on the builder? Try disable that and try again?
|
As far as I know, an assertion failure in the dynamic linker does not normally present itself as a |
|
What's the gdb version? Perhaps you can try building the latest gdb?
|
Running just this command:
from runtime-gdb_test.go prints:
once in every dozen times (on average). hello-c-world is a plain C exe. Running the same gdb command in a loop (outside of runtime-gdb_test.go) failed once in about 10,000 runs. The board is mips64be (but with mips32be rootfs), libc: 2.13-38+deb7u8, gdb 7.9. |
CL https://golang.org/cl/36250 mentions this issue. |
It seems the problem is on gdb and the dynamic linker. Skip the test for now until we figure out what's going on with the system. Updates #18784. Change-Id: Ic9320ffd463f6c231b2c4192652263b1cf7f4231 Reviewed-on: https://go-review.googlesource.com/36250 Run-TryBot: Cherry Zhang <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Is gdb itself just flaky on MIPS? It's not obvious to me that there's anything we can do about this on the Go side. |
Probably some bad interaction between gdb and the dynamic loader. I still don't understand what is happening. As @vstefanovic can reproduce it with a C program, it is probably not much related to Go. |
Thanks. Okay with closing the issue? @vstefanovic, would you mind filing an issue with GDB with your test from #18784 (comment)? |
I'm ok with closing. We can reopen if we find anything related to Go. |
They were failing when run on 32bit RFS, with 32bit gdb. (mips64 builder now has 64bit RFS, with gdb 7.9.) Leaving TestGdbPythonCgo disabled, it behaves as described in #18784. Fixes #18173 Change-Id: I3c438cd5850b7bfd118ac6396f40c1208bac8c2d Reviewed-on: https://go-review.googlesource.com/45874 Reviewed-by: Cherry Zhang <[email protected]> Run-TryBot: Cherry Zhang <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Even
raises
quite often, as long as the machine is doing some other work at the same time (running gdb's configure was sufficient in my case). @aclemens, I will, probably, but I'd like to have a look at it myself first. |
@vstefanovic, thanks! |
Looking at the build dashboard, this test fails with a large chance, but not always. It happens on both BE and LE. For example,
https://build.golang.org/log/1b824c580a7c5767ef45a34e29dd6c5c8c49e792
https://build.golang.org/log/5f62e2e14098562cbfcd839333a2a22a4c373c4a
I will take a look.
cc @ianlancetaylor @vstefanovic
The text was updated successfully, but these errors were encountered: