English Amiga Board


Go Back   English Amiga Board > Support > support.FS-UAE

 
 
Thread Tools
Old 09 March 2019, 13:21   #1
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 9
Exclamation Segfault in QEMU-UAE SLIRP code (plus Gentoo news!)

Hello. I'm not sure how I got this far in life without registering here but here I am. First off, the good news...

On the Amiga on Linux front, I became a Gentoo Linux developer a few years ago and I'm finally getting around to adding FS-UAE and its related packages to the official repository. Sorry it took so long.

On the Linux on Amiga front, I've cross-compiled a brand new Gentoo Linux system and successfully run it on my A1200. This was primarily to show off for a talk at my company's annual engineering conference but sadly it didn't get enough votes (philistines!). The local Edinburgh office really want to see it though so I may still do that. We write a lot of Rust and I had hoped to run some but that effort simply isn't ready yet. I've tried some other fun things though. Since Xfbdev only gives me a white screen and would be impossibly slow anyway, I have stuck to the AGA framebuffer but pixel formats mean that SDL doesn't work either. It does under a TigerVNC server though! Running DosBox and then WFW 3.11 was... interesting. There hasn't been an m68k Gentoo stage tarball (used for installation) built for years so I'm planning to make one. Cross-compiling those isn't really an option though, which brings me onto a problem.

Obviously I can't build natively on my A1200. I was thrilled to see that FS-UAE can now boot Linux as I recall that previously wasn't possible. I have been booting my Linux system over NFS, primarily for convenience, and that would be handy for building these Gentoo stages. I learnt about QEMU-UAE and I was already familiar with SLIRP, having used QEMU before. I enabled A2065 support in my kernel and it all looks like it's about to work but as soon as it starts booting, the whole thing segfaults on me.

I've tried the 3.8.2qemu2.2.0 binary download and I've also tried building it from source myself but both give the same result. I can provide a stacktrace and/or core dump but is there likely to be any further development here? Obviously QEMU 2.2 is a bit ancient now and I gather 2.4 didn't work too well. I can see that the area where it crashes has been rewritten since then so perhaps 3.1 would work better.

I could probably get away without using NFS but it would be easier and somewhat cooler if this worked. I could also try ARAnyM instead but that old 90s Atari rivalry is deeply ingrained and I'm not sure I could face it. There's QEMU's user mode too and that does work for some basic tasks but I've had problems running Gentoo's package manager.

Anyhow, it's good to be here.
Chewi is offline  
Old 09 March 2019, 20:44   #2
Locutus
Registered User

 
Join Date: Jul 2014
Location: Finland
Posts: 928
Aranym is faster as a GNU/Linux host, its been used for Debian m68k crossbuilds.
Locutus is offline  
Old 09 March 2019, 21:14   #3
k0x
Registered User

 
Join Date: Jan 2018
Location: Ostrava
Posts: 65
Gentoo on A1200?! Impressive!
k0x is offline  
Old 09 March 2019, 21:42   #4
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 9
Quote:
Originally Posted by Locutus View Post
Aranym is faster as a GNU/Linux host, its been used for Debian m68k crossbuilds.
I'm not planning on doing this often but maybe I should indeed use the right tool for the job.

Quote:
Originally Posted by k0x View Post
Gentoo on A1200?! Impressive!
It has a little help from a DKB Cobra with a 33MHz 68030 and 128MB RAM but yeah, it's still quite something. I first did this about 13 years ago, it was my first adventure into cross-compiling and I've been doing it ever since. Gentoo supports cross-compiling better as a result.
Chewi is offline  
Old 10 March 2019, 09:02   #5
k0x
Registered User

 
Join Date: Jan 2018
Location: Ostrava
Posts: 65
Definitely am interested in further info how to get Gentoo on m68k.
k0x is offline  
Old 10 March 2019, 11:18   #6
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 9
Quote:
Originally Posted by k0x View Post
Definitely am interested in further info how to get Gentoo on m68k.
I'll let you know when it's ready.
Chewi is offline  
Old 10 March 2019, 12:56   #7
Locutus
Registered User

 
Join Date: Jul 2014
Location: Finland
Posts: 928
Yeah, please post when you have a release candidate tarball, i want to run this if only so i can poke at my gentoo user colleague (--funroll-all-loops jokes get old after a while after all).
Locutus is offline  
Old 10 March 2019, 14:16   #8
vulture
Registered User
 
Join Date: Oct 2007
Location: Athens , Greece
Posts: 877
very interesting!
vulture is offline  
Old 19 March 2019, 00:18   #9
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 9
Just a quick note to say that I've had a stab at forward porting the plugin to QEMU 3.1.0 and I've got it to successfully build. It doesn't work yet but hey, I might be lucky.
Chewi is offline  
Old 19 March 2019, 14:59   #10
Romanujan
Registered User
 
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 331
Quote:
Originally Posted by Chewi View Post
I became a Gentoo Linux developer a few years ago and I'm finally getting around to adding FS-UAE and its related packages to the official repository.
Just please keep in mind, that there are stability problems with latest FS-UAE releases: http://eab.abime.net/showpost.php?p=...postcount=1167
Romanujan is offline  
Old 19 March 2019, 23:54   #11
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 9
I managed to fix all the implicit declarations, which caused the plugin to load but it now segfaults straight away.

Code:
fs-uae: migration/migration.c:169: migrate_get_current: Assertion `current_migration' failed.
I am out of my depth here so I would appreciate someone (Frode!) picking up what I've got so far. It's the PPC code that's causing all the trouble but i'm only interested in SLIRP. I don't know if it's possible to remove the PPC parts?
Chewi is offline  
Old 20 March 2019, 07:34   #12
Romanujan
Registered User
 
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 331
Missing 'migration_object_init()' call? See 'int main(int argc, char **argv, char **envp)' in 'vl.c' - probably it has changed since the QEMU plugin was developed, the way to initialize the plugin certainly needs to be synchronized.
Romanujan is offline  
Old 21 March 2019, 00:10   #13
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 9
Quote:
Originally Posted by Romanujan View Post
Missing 'migration_object_init()' call? See 'int main(int argc, char **argv, char **envp)' in 'vl.c' - probably it has changed since the QEMU plugin was developed, the way to initialize the plugin certainly needs to be synchronized.
Thanks for that! I had a feeling it was something like that and I was looking in vl.c but it's a big file and it was getting late. Always pays to keep others posted on progress.

I've jumped a few more hurdles with other things missing from the initialisation and it's getting further than before. Now it's segfaulting in qemu_uae_mutex_lock(), specifically on qemu_cpu_kick_thread(first_cpu). I've run this through gdb but I'm not sure what's up yet.

I also tried skipping all the PPC stuff to just do SLIRP. It crashed out because it needs the main loop setup for the timers. I think I'm much more likely to get this working so I may focus on this direction.
Chewi is offline  
Old 21 March 2019, 08:18   #14
Romanujan
Registered User
 
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 331
Where exactly does it crash? Which QEMU version are you using?
Romanujan is offline  
Old 27 March 2019, 23:18   #15
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 9
Quote:
Originally Posted by Romanujan View Post
Where exactly does it crash? Which QEMU version are you using?
Still 3.1.0. I hadn't tried very hard to do SLIRP only at that point so I wasn't asking for help yet. I carried on and eventually got it to stop crashing. I can even see a few packets pass through tcpdump as well as network activity in the log but it doesn't really work yet. I can ping the host on the gateway IP but that's all.

I found a library implementation of SLIRP that was ripped out of QEMU some time ago but it doesn't seem to be maintained. In the announcement discussion, WinUAE was actually mentioned as a possible user. Switching to this doesn't seem trivial though and I'm not sure how much more time I want to spend on this.

I can post up my work on GitHub if anyone is interested.
Chewi is offline  
Old 29 March 2019, 14:15   #16
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 9
Turns out that just hours before I posted the above message, someone from Red Hat revealed that the QEMU team had decided to split out the code into their own libslirp project! Funny timing. I feel a little more motivated to work on this now.
Chewi is offline  
Old 29 March 2019, 14:27   #17
Locutus
Registered User

 
Join Date: Jul 2014
Location: Finland
Posts: 928
hows the gentoo release tarball doing? >
Locutus is offline  
Old 25 April 2019, 20:03   #18
k0x
Registered User

 
Join Date: Jan 2018
Location: Ostrava
Posts: 65
Eager to see gentoo@amiga
k0x is offline  
Old 02 May 2019, 22:59   #19
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 9
Sorry for the silence. I don't plan to further the Gentoo release until I get the SLIRP stuff sorted out and it hasn't been a priority lately.

On the plus side, I have now got app-emulation/fs-uae and app-emulation/fs-uae-launcher officially in Gentoo after the bug report being open for many years.
Chewi is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
E-uae-ppc-jit - Segfault on P96 as of late Threader support.OtherUAE 0 04 February 2018 14:49
FS-UAE Launcher Linux Gentoo problem dylanmc support.FS-UAE 11 25 December 2017 13:02
Issue with fs-uae-launcher on Gentoo Linux philr5150 support.FS-UAE 1 19 September 2017 13:50
Using Dolphin's PPC Code instead of QEmu's? Xeon3D support.FS-UAE 5 14 June 2016 10:30
GLX-related compilation problem with FS-UAE on Gentoo / GCC 4.8 yoshi314 support.FS-UAE 9 17 December 2013 19:49

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:23.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.08936 seconds with 15 queries