English Amiga Board


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

 
 
Thread Tools
Old 18 March 2021, 19:06   #1
FrodeSolheim
FS-UAE Developer
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 40
Posts: 3,860
Fix for crash when using FS-UAE and QEMU-UAE on recent Linux distros

Note: there are issues with FS-UAE and QEMU-UAE on Linux with recent versions of Glib causing a crash! The crash is probably related to issues with threading and concurrency - both FS-UAE and QEMU-UAE might think they are the main process.

If you're not affected by the crash, you don't need to do anything and can stop reading if you like

In order to sidestep that issue, I've built a new QEMU-UAE plugin for Linux which contains a static copy of Glib. The latest build can be download from here for now:
https://www.dropbox.com/sh/93rc0ac1q...06pyHEBIa?dl=0

Unfortunately, dynamic linking on Linux is a bit peculiar, and what I didn't know is that even with QEMU-UAE having Glib statically linked in, the dynamic loader will still replace the symbols in QEMU-UAE with the Glib symbols already loaded in the FS-UAE process, thus defeating having a copy in QEMU-UAE.

So, I've fixed this in FS-UAE by loading plugins with the RTLD_DEEPBIND flag to dlopen:
Quote:
RTLD_DEEPBIND (since glibc 2.3.4)
Place the lookup scope of the symbols in this shared
object ahead of the global scope. This means that a self-
contained object will use its own symbols in preference to
global symbols with the same name contained in objects
that have already been loaded.
With this flag included, QEMU-UAE will be loaded while keeping its own symbols, and this, together with the new QEMU-UAE plugin fixes the crash.

A particularly nasty and difficult bug to track down... since I did not even know the dynamic loader could do this...

Updated FS-UAE builds can be downloaded from this Dropbox folder:
https://www.dropbox.com/sh/03y8l4uvu..._BeyaWTha?dl=0

There will of course be proper builds later, but right now, you can use the above builds which are now automatically built whenever I check in new code
FrodeSolheim 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
QEMU-UAE keeps tripping on my OSX PPC! Hypex support.FS-UAE 21 17 December 2015 13:27
linux qemu-uae kvm tlosm support.FS-UAE 11 15 February 2015 09:28
fs-uae-launcher and fs-uae-arcade (dev versions) linux problems [Solved] esc support.FS-UAE 2 18 November 2014 01:02
G-FS-UAE (GUI/Frontend for Linux FS-UAE) Speedvicio support.FS-UAE 12 05 November 2012 20:14
UAE (linux) and Jabberwocky crash BiL0 support.OtherUAE 4 10 June 2006 18:52

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 05:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.15434 seconds with 12 queries