-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
binaries crash after moving to $GOROOT_FINAL #1280
Labels
Comments
I cannot reproduce this. ebnflint should simply run w/o any output if it is successful. It does some basic consistency checks of the EBNF grammar in the language spec. Can you please try a fresh build from the tip of the tree and try again? If you get a crash with ebnflint, it would be useful to have a bit more information (e.g. stack dump). Owner changed to g...@golang.org. Status changed to WaitingForReply. |
Comment 2 by armando.dicianno: I have gdb 7.0.1, so debugging Go from gdb should work, from what I understand? 1) Build, and test crashes -------- If I run ./all.bash to build and test, the terminal actually exits when this error happens, so I run each step manually: $ . ./make.bash $ . ./env.bash $ ./run.bash --no-rebuild ... ... ... --- cd cmd/ebnflint ebnflint -start="SourceFile" "/home/fafhrd/Projects/go/repos/go"/doc/go_spec.html make: *** [test] Segmentation fault 2) If I run the command manually, it crashes -------- $ cd cmd/ebnflint $ ebnflint -start="SourceFile" "/home/fafhrd/Projects/go/repos/go"/doc/go_spec.html Segmentation fault $ ebnflint -start="SourceFile" "/home/fafhrd/Projects/go/repos/go"/doc/go_spec.html Segmentation fault $ ebnflint -start="SourceFile" "/home/fafhrd/Projects/go/repos/go"/doc/go_spec.html Segmentation fault 3) If I run it through gdb, it works -------- $ cd cmd/ebnflint $ gdb ebnflint GNU gdb (Gentoo 7.0.1 p1) 7.0.1 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>; This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>;... Reading symbols from /home/fafhrd/Projects/go/repos/go/src/cmd/ebnflint/ebnflint... warning: Loadable segment ".interp" outside of ELF segments Dwarf Error: Could not find abbrev number 110 [in module /home/fafhrd/Projects/go/repos/go/src/cmd/ebnflint/ebnflint] (gdb) run -start="SourceFile" "/home/fafhrd/Projects/go/repos/go"/doc/go_spec.html Starting program: /home/fafhrd/Projects/go/repos/go/src/cmd/ebnflint/ebnflint -start="SourceFile" "/home/fafhrd/Projects/go/repos/go"/doc/go_spec.html Program exited normally. -------- So, this smells like a "safe malloc" type issue, where memory under gdb must be getting initialized before use, possibly? Please let me know any other techniques for debugging. |
It should work just fine, starting with a clear environment, to do cd ..../go/src GOROOT_FINAL=/wherever ./make.bash # or all.bash to run tests ./clean.bash --nopkg cp -R ../* /wherever It is expected that you copy all of $GOROOT to $GOROOT_FINAL. It may work to copy less, but we have not defined or committed to that continuing to work. I just ran your example and cannot reproduce the problem. $ cd /tmp $ hg clone https://go.googlecode.com/hg go1 requesting all changes adding changesets adding manifests adding file changes added 7199 changesets with 28151 changes to 4027 files updating to branch default 2450 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd go1/src $ GOROOT_FINAL=/tmp/go2 ./make.bash ... The binaries expect /tmp/go1 to be copied or moved to /tmp/go2. $ mkdir /tmp/go2 $ cp -R ../* /tmp/go2 $ cd /tmp $ rm -rf go1 $ go2/bin/ebnflint -start="SourceFile" go2/doc/go_spec.html $ echo $? 0 $ If you can still reproduce the problem in the most recent release please upload a broken ebnflint binary for us to look at. Thanks. Owner changed to r...@golang.org. Status changed to WaitingForReply. |
Comment 6 by renich@woralelandia.com: guys, we're having similar problems: https://bugzilla.redhat.com/show_bug.cgi?id=652987 |
Comment 8 by renich@woralelandia.com: warning: Loadable segment ".interp" outside of ELF segments I'm no expert but this line happens to me all the time while trying to build it in Fedora. I think it is related not in ebnflint crashing but it's debug-info related problems. Debug info is not being generated correctly and, that, might be causing armando's problems and ours... The packages build fine while disabling debug-info. Please, if possible, try this spec file. Attachments:
|
How are you moving the binaries to $GOROOT_FINAL? Are you running strip on them during the move? If so, perhaps this is a duplicate of issue #1242? |
Comment 10 by renich@woralelandia.com: well, this issue has been overcome by not stripping exactly: http://renich.fedorapeople.org/SPECS/go.spec (first 5 lines) I will appreciate any comments and or directions on this. |
Comment 12 by renich@woralelandia.com: nah, that's it for the moment ;) Thanks for the issue link on this. I'll subscribe to know what happens to it. Anyway, please, invest some time on that if possible. ;) |
We do intend to make the binaries work with strip. They did once. Marking this as a duplicate of 1242. Status changed to Duplicate. Merged into issue #1242. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by armando.dicianno:
The text was updated successfully, but these errors were encountered: