-
Notifications
You must be signed in to change notification settings - Fork 41
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
MacOS: Failed to launch GDB: Remote replied unexpectedly to 'vMustReplyEmpty' #193
Comments
Hi, I don't think that's really a GDB problem, but more of a Mac issue with FS-UAE. It seems FS-UAE quits due to problems with OpenGL? @grahambates |
FS-UAE is definitely quitting. The I agree that running the emulator without debugging features is a good idea. You'll need to set the env var for the shared library location though: cd ~/.vscode/extensions/bartmanabyss.amiga-debug-1.6.8/bin/darwin/fs-uae
DYLD_FALLBACK_LIBRARY_PATH=. ./fs-uae |
Small update;
I have a feeling is has to do with GDB/communication with GDB? |
Yeah it runs fine on my system: This is the log output I see:
Comparing it to yours, I'd say the line that looks dodgy is:
It looks like a partial message. |
Having the same problem on Apple M1 |
Do you still see the problem if you downgrade to 1.6.7? |
@grahambates I am trying. Installed 1.6.7 but having some issues since FS-UAE is not static linked there is a bunch of libs that require x86 architecture. I started to uninstall my arm libs and installed the x86 versions but came to a stop with libharfbuzz that has a missing symbol required by FS-UAE:
I installed the latest harfbuzz 5.3.1 - maybe not the version needed? I am also trying to reproduce the the GDB problem on my older x86 based MacBook Pro (running MacOS Catalina) but I am getting similar issues with dynamic linked libs and required missing symbols:
|
Ah yeah, I addressed that in the current build. It needs x86 versions of the dylibs because the FS-UAE binary is x86. You should be able to grab them from 1.6.8 where they are now bundled. |
I was wondering if the issue is related to the new gdb version. FS-UAE hasn't really changed. |
I got it running on 1.6.7 - same issue with GDB (GNU gdb (GDB) 13.0.50.20220509-git)
|
Ok thanks for checking. It rules out the gdb change. Looks like I need an M1 Mac for testing! I might actually be able to borrow one from work. |
@grahambates Please let me know if I can help out in any way; testing, debugging.. |
I am also available to help if needed |
If it is any help, regarding:
I have the same experience on my old 2013 MBP (Big Sur). It turns out that after 16 mins the sample demo is actually started and runs. Here's what the logs says:
But, it runs very slowly, and there is no communication to VS-Code so I still have to force quit FS-UAE. |
@BangKarlsen I get the same timeout after 1000 seconds. Then the demo sample runs normal and at full speed. I can mouse click out to AmigaDos and quit FS-UAE as normal.
So I can confirm the two different behaviours for AROS and KS1.3. Without having a clue to what it means or if it's relevant at all. |
Thanks for all the additional info. I've been trying to stay away from computers over the Xmas period but should be able to spend some time looking into this now! I'm starting to suspect some kind of race condition. I've also seen the situation where the debugger doesn't connect and you need to force-quit, which only happens occasionally on my machine. I'll do some more poking around and see what I find. |
Ok I've figured out what's going on here. GDB retries the The best way to address this would be be set the remote timeout arg to something higher than the default 2 secs when starting GDB. I'll open a PR with this fix. |
This avoids filling up the network buffer by retrying commands multiple times as the remote program is starting. Refs BartmanAbyss#193
@grahambates Great news! Anyway I can test it out or have to wait for new release? |
Yeah you can checkout the latest master, |
@grahambates I finally had time to test this.
This message comes after the 10 sec timeout. Output from extension after failed run:
|
@mfamfa Thanks for this. I should be able to spend some time looking into this now. Just a few of questions:
I get occasional failures where FS-UAE fails to bind to the port and then hangs. It doesn't follow the same consistent pattern but I'm wondering if it could be related. |
@grahambates
I tried to wait a few minutes between each run and it works fine every time then. Port not freed properly? |
Yeah it does look like One more thing to try, does it make any difference whether you quit FS-UAE directly or by pressing the 'stop debugging' button in VS Code on the previous run? |
If I use the "stop debugging" in VS code then I cannot reproduce the hang (!). I can start and stop as quickly as possible without any issue. |
I'm seeing the same thing. I've never been able to reproduce it when closing the emulator that way. I suspect that this is because the connection is closed before killing the process so the port isn't held open. Now we know what the problem is I should be able to do something on either the extension or the FS-UAE side to address this. |
refs: BartmanAbyss/vscode-amiga-debug#193 Socket option `SO_REUSEADDR` needs to be set before calling `bind()` in order to allow binding to a port which is in the `TIME_WAIT` state.
I've updated #197 to include a fix for this. @mfamfa if you could test that branch that would be great. @BartmanAbyss you might want to look at whether this fix is needed for WinUAE too. Basically we were already setting the |
I think this is safe to close now. Tested with latest release. |
I have some issues running the sample app on MacOS 12.6.2 (M1 MacBook Pro).
1. Aros config: Mostly I get the following message:
Relevant (?) output from the fs-uae.log.txt:
Please note that during my testing the sample app actually ran 2 times (out of maybe 20 tries). When it was running I was able to break the code, single step, profile etc.
2. A500 with kickstart 1.3 config: If I try this config then FS-UAE just freezes a little while after the AmigaDos screen shows. I have to 'Force Quit' FS-UAE.
The log file is cut off at random:
3. Lastly; How can I create a non-debug configuration that will run without attaching GDB? I assume somewhere data is written to default.fs-uae but I don't see where?
Please let me know if I can help out in any way.
The text was updated successfully, but these errors were encountered: