-
Notifications
You must be signed in to change notification settings - Fork 1
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
loading goenable crashes bash #1
Comments
Thanks for the issue! I can reproduce reproduce with Bash 4.3 on macOS, but not on 4.4. My theory is this could be an issue with the version of Bash goenable was compiled against. Can you test if this happens with Bash 4.4 or Bash 5? I'll try recompiling against a few other versions to see if that fixes it. |
After some digging, I think the problem is in the Bash 4.3 / 4.4 boundary. It seems the Bash loadable's name is assumed to be non-NULL in Bash 4.3 and earlier, and |
@jakewarren Can you please try this prerelease and let me know if it solves your issue? https://github.com/JohnStarich/goenable/releases/tag/untagged-82eebf0d61329d0eca4a I've tested lightly on macOS with Bash 3.2, 4.0-4.4, and 5.0 plus ubuntu with Bash 4.3 and 4.4. |
@JohnStarich thanks for looking into it! I tested the prelease and it definitely made progress. I'm able to successfully load goenable and get help output. However when I try to load the It spit out what looked a Go panic stack trace but it exited so quickly that I couldn't copy it. Even running it while redirecting the output with Sorry I can help out more, don't mean to create more work for ya. :/ Stack traceStacktrace:
#0 0x00007ff234ab6144 in runtime.raise () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#1 0x00007ff234a9d1cb in runtime.dieFromSignal () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#2 0x00007ffd00000006 in ?? ()
No symbol table info available.
#3 0x0000000000000000 in ?? ()
No symbol table info available.
StacktraceTop:
runtime.raise () from /tmp/goenable-Linux-x86_64.so
runtime.dieFromSignal () from /tmp/goenable-Linux-x86_64.so
?? ()
?? ()
ThreadStacktrace:
.
Thread 7 (Thread 0x7ff230532700 (LWP 5622)):
#0 0x00007ff234ab6693 in runtime.futex () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#1 0x00007ff234a86a8b in runtime.futexsleep () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#2 0x000000c000076140 in ?? ()
No symbol table info available.
#3 0x0000000000000080 in ?? ()
No symbol table info available.
#4 0x0000000000000000 in ?? ()
No symbol table info available.
.
Thread 6 (Thread 0x7ff231534700 (LWP 5619)):
#0 0x00007ff234ab6693 in runtime.futex () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#1 0x00007ff234a86a8b in runtime.futexsleep () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#2 0x000000c00004a840 in ?? ()
No symbol table info available.
#3 0x0000000000000080 in ?? ()
No symbol table info available.
#4 0x0000000000000000 in ?? ()
No symbol table info available.
.
Thread 5 (Thread 0x7ff22fd31700 (LWP 5621)):
#0 0x00007ff234ab6693 in runtime.futex () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#1 0x00007ff234a86a8b in runtime.futexsleep () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#2 0x00007ff234e5aaf8 in runtime.newmHandoff () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#3 0x0000000000000080 in ?? ()
No symbol table info available.
#4 0x0000000000000000 in ?? ()
No symbol table info available.
.
Thread 4 (Thread 0x7ff230d33700 (LWP 5620)):
#0 0x00007ff234ab6693 in runtime.futex () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#1 0x00007ff234a86a8b in runtime.futexsleep () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#2 0x000000c00004abc0 in ?? ()
No symbol table info available.
#3 0x0000000000000080 in ?? ()
No symbol table info available.
#4 0x0000000000000000 in ?? ()
No symbol table info available.
.
Thread 3 (Thread 0x7ff234746700 (LWP 5616)):
#0 0x00007ff234ab6693 in runtime.futex () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#1 0x00007ff234a86a8b in runtime.futexsleep () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#2 0x00007ff234e3f020 in runtime.m0 () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#3 0x0000000000000080 in ?? ()
No symbol table info available.
#4 0x0000000000000000 in ?? ()
No symbol table info available.
.
Thread 2 (Thread 0x7ff231d35700 (LWP 5618)):
#0 0x00007ff234ab6693 in runtime.futex () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#1 0x00007ff234a86b00 in runtime.futexsleep () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#2 0x00007ff234e3e910 in runtime.sched () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#3 0x0000000000000080 in ?? ()
No symbol table info available.
#4 0x00007ff231d34db0 in ?? ()
No symbol table info available.
#5 0x0000000000000000 in ?? ()
No symbol table info available.
.
Thread 1 (Thread 0x7ff236360700 (LWP 3699)):
#0 0x00007ff234ab6144 in runtime.raise () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#1 0x00007ff234a9d1cb in runtime.dieFromSignal () from /tmp/goenable-Linux-x86_64.so
No symbol table info available.
#2 0x00007ffd00000006 in ?? ()
No symbol table info available.
#3 0x0000000000000000 in ?? ()
No symbol table info available.
Title: bash crashed with SIGABRT in runtime.raise() |
Nice! 😄 Glad we got past that bit. I'll cut a release for that fix then! You could try running bash as a subprocess, that way the output doesn't disappear when the subprocess exits. Can you run the following example and grab the output? (copy-paste may be required for this one, rather than file redirection with ~ $ echo "I'm logged in!"
~ $ bash
bash-4.3 $ echo "Now I'm in the bash subshell"
bash-4.3 $ enable -f ./goenable.so goenable && make plugins && goenable load ./out/hello output Perhaps the below trace looks similar to the Go stack trace you saw? This could be an issue I discovered which affects Linux systems but not macOS. I'm tracking this golang issue, which may help us figure out what went wrong: golang/go#18123 (comment) No worries, I really appreciate the feedback! 👍 Go trace
|
Yup looks like we get the same go trace. Go trace
|
Dang, ok. I'll keep pinging this issue over on golang to get this issue looked at. Right now it's on the 1.11 milestone, but it's already been delayed a few times so this could be a while. In the meantime, I'm sure you're anxious to get this working, so you could fork Once a fix for Linux arrives, I'll ping back here and let you know! |
@jakewarren According to the maintainers, Go plugins are no longer being worked on.. so I guess this project needs to pivot somehow if it's going to be used on Linux. 😕 |
It should be easy enough to dynamically load an .so by using the usual C tools, question is whether this will wreak havoc with one or multiple Go runtimes. 🤔 |
When I run
enable -f ./goenable.so goenable
it crashes the bash process. I have no idea how to troubleshoot it further. Let me know if I can collect any logs or info that would be helpful.Bash version
❯ bash --version | head -1 GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
OS info
The text was updated successfully, but these errors were encountered: