ArchiSteamFarm: Bus Error

Checklist

ASF version

Latest stable release

ASF variant

linux-arm

Bug description

I went to load ArchSteamFarm and when I opened it up it did the usual auto-update. It then updated from version 5.1.5.2 to 5.2.0.6. After showing 100% progress and it went to restart it now gives met he error “Bus error”.

Here is what the update process shows:

2021-11-24 15:03:44|ArchiSteamFarm-16115|INFO|ASF|Update() Downloading new version: 5.2.0.6 (21 MB)… While waiting, consider donating if you appreciate the work being done! 😃 2021-11-24 15:03:46|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 0%… 2021-11-24 15:03:48|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 10%… 2021-11-24 15:03:49|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 20%… 2021-11-24 15:03:51|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 30%… 2021-11-24 15:03:52|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 40%… 2021-11-24 15:03:53|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 50%… 2021-11-24 15:03:55|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 60%… 2021-11-24 15:03:56|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 70%… 2021-11-24 15:03:57|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 80%… 2021-11-24 15:03:59|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 90%… 2021-11-24 15:04:00|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 100%… 2021-11-24 15:04:01|ArchiSteamFarm-16115|INFO|ASF|Update() Update process finished! 2021-11-24 15:04:01|ArchiSteamFarm-16115|INFO|ASF|RestartOrExit() Restarting…

Expected behavior

Once the update restarted then ArchiSteamFarm resumes normal process and runs through update check again and then idles.

Actual behavior

Gives the error Bus error and then returns back to the prompt.

Steps to reproduce

Updated to newest version.

Possible reason/solution

No response

Can you help us with this bug report?

No, I don’t have time, skills or willings for any of that

Full log.txt recorded during reproducing the problem

2021-11-24 15:03:23|ArchiSteamFarm-16115|INFO|ASF|InitCore() ArchiSteamFarm V5.1.5.2 (linux-arm/69618d1d-bf14-435b-ae8b-faacb901e7fd | .NET 5.0.11; raspbian.10-arm; Linux 5.10.63-v8+ #1459 SMP PREEMPT Wed Oct 6 16:42:49 BST 2021)
2021-11-24 15:03:23|ArchiSteamFarm-16115|INFO|ASF|InitCore() Copyright © 2015-2021 JustArchiNET
2021-11-24 15:03:26|ArchiSteamFarm-16115|INFO|ASF|InitPlugins() Initializing Plugins...
2021-11-24 15:03:36|ArchiSteamFarm-16115|INFO|ASF|UpdateAndRestart() ASF will automatically check for new versions every 1 day.
2021-11-24 15:03:36|ArchiSteamFarm-16115|INFO|ASF|Update() Checking for new version...
2021-11-24 15:03:43|ArchiSteamFarm-16115|INFO|ASF|Update() Local version: 5.1.5.2 | Remote version: 5.2.0.6
2021-11-24 15:03:44|ArchiSteamFarm-16115|INFO|ASF|Update() Changes since V5.1.5.3:
[!] ASF V5.2 opens a new major milestone due to significant .NET 6.0 runtime upgrade. .NET runtime upgrade brings a lot of under-the-hood changes, compatibility enhancements, performance improvements, features and bugfixes (@JustArchi @A$
Breaking: renamed commands bl, ib and iq (with add and rm) to tb, fb and fq, accordingly. This further helps unifying the terms used across ASF (@JustArchi #2368).
Breaking: functions previously marked as obsolete exposed to third-party plugins have been removed from ASF as a part of B release cycle (@JustArchi).
Breaking: ASF will now refuse to run as root user by default. See wiki entry for more details (@JustArchi).
ASF will now validate build checksum against independent remote server prior to automatically updating from GitHub (@JustArchi #2452).
ASF's internal codebase has changed dramatically in regards to various .NET 6.0 improvements that we've implemented. While those changes should not cause regressions in regards to previous usage, the scope of them is huge enough to warra$
.NET 6.0 allows further performance tweaking, we've updated high-performance-setup on the wiki to reflect that (@JustArchi).
Added osx-arm64 variant of ASF for 64-bit ARM-based (Apple silicon) OS X OSes (@JustArchi).
It's now possible to use SOCKS proxies as a WebProxy setting in ASF. Simply use socks5:// (or likewise) protocol (NET 6.0 enhancement).
Latest ASF-ui with new features, improvements and bugfixes (@MrBurrBurr).
Updated localization provided by our community (@JustArchi-ArchiBot).
Usual amount of other core improvements, optimizations and bugfixes (@JustArchi).

2021-11-24 15:03:44|ArchiSteamFarm-16115|INFO|ASF|Update() Downloading new version: 5.2.0.6 (21 MB)... While waiting, consider donating if you appreciate the work being done! :)
2021-11-24 15:03:46|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 0%...
2021-11-24 15:03:48|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 10%...
2021-11-24 15:03:49|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 20%...
2021-11-24 15:03:51|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 30%...
2021-11-24 15:03:52|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 40%...
2021-11-24 15:03:53|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 50%...
2021-11-24 15:03:55|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 60%...
2021-11-24 15:03:56|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 70%...
2021-11-24 15:03:57|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 80%...
2021-11-24 15:03:59|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 90%...
2021-11-24 15:04:00|ArchiSteamFarm-16115|DEBUG|ASF|OnProgressChanged() 100%...
2021-11-24 15:04:01|ArchiSteamFarm-16115|INFO|ASF|Update() Update process finished!
2021-11-24 15:04:01|ArchiSteamFarm-16115|INFO|ASF|RestartOrExit() Restarting...


<username>@<hostname>:~/ArchiSteamFarm $ ./ArchiSteamFarm
Bus error

Global ASF.json config file

No response

BotName.json config of all affected bot instances

No response

Additional info

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 22 (14 by maintainers)

Most upvoted comments

Thanks to @janvorli and @VSadov help working on the upstream .NET issue, I have available workaround for people affected by this issue in ASF.

After evaluation, the issue seems to affect only arm32 machines with a very specific kernel CPU alignment setting.

You can verify if you’re affected with cat /proc/cpu/alignment. The definition for values is:

0 - Do nothing (default behavior)
1 - Warning in kernel-log with PC and Memory-Address printed.
2 - Fixup error
3 - Warn and Fixup
4 - Send a SIGBUS to the process
5 - Send SIGBUS and output Warning

Values of 4 and 5 will cause a SIGBUS crash mentioned in the original issue. Value of 2 should be a valid workaround until the issue is addressed at https://github.com/dotnet/runtime/issues/62273

Therefore, to enable a workaround, try:

echo 2 | sudo tee /proc/cpu/alignment

Or directly from root console without sudo:

echo 2 > /proc/cpu/alignment

Launching ASF after setting the value above should now succeed without any further issues.

As the fix is being worked upon in upstream issue, and considering I don’t have any possibility to somehow work it around directly in the ASF code, I’ll close this issue.

Thank you a lot @Lucetia for aiding me in debugging, especially for core dump that helped tackle this one down.

You shouldn’t install libc6-armhf-cross, your new error suggests that your new OS isn’t based on arm anymore but arm64, and ASF has a dedicated build for that.

Doesn’t change the fact that the bug with linux-arm is still here for you and I’m out of ideas what else to suggest. I’ve reported the issue at https://github.com/dotnet/runtime/issues/62273 and I’m waiting for feedback from people that know more about this than me. Lastly, I’d appreciate if you let me know @Lucetia which Raspberry Pi model you have, as that might aid in debugging, thanks.

Until the above issue is resolved, I suggest the following:

  • If uname -m says aarch64 or arm64, you should be using linux-arm64 build of ASF. Only if it results armv7l you should run linux-arm.
  • If running linux-arm is no longer possible, until the root cause is found, I recommend running generic variant of ASF.

Running generic variant of ASF involves installing .NET Core runtime through https://dot.net/v1/dotnet-install.sh script. Simply execute ./dotnet-install.sh -c 6.0 -i /usr/share/dotnet, then link dotnet binary to bin through ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet. Your dotnet --info should be operative now - launch generic variant of ASF through ArchiSteamFarm.sh script attached with generic variant of ASF.

The above is a workaround, linux-arm build should be operative, but due to the fact that I don’t know the root cause of the problem here, neither I have any other workaround at hand, I don’t have anything else to suggest. If more people report this issue I might decide to temporarily disable single-file publish for linux-arm, but for that I need more feedback - as much as I believe you, I don’t know whether the issue comes from something specific you’re running on your OS or if it’s general Raspberry OS problem - we couldn’t reproduce this (@Abrynos). If it’s the second, and more people confirm that, I’ll be more willing to temporarily modify the linux-arm build to account for that, now that we know at least a valid workaround.

In any case thanks a lot for your help @Lucetia, I’ll let you know if I’ll have any additional questions or stuff to test, I’d appreciate if you could keep the affected machine with the problem for at least a bit longer in case .NET guys would like additional debugging output. As of me I don’t have anything else to suggest, as I pretty much exhausted my options for now (maybe I’ll have something new when .NET guys suggest another workaround).

I’ll keep the issue open. If by any chance you’re a new visitor reading this issue and having the same problem, let us know.

Here’s the information it gave me in the host.txt file. I’ll run the three additional builds tomorrow as it is late here, but I wanted to post at least this. The file has the same as what I pasted, but just in case the file helps make it easier I added it.

I didn’t see anything that might be on my end, but it is possible? If there’s something I’m missing just let me know.

Tracing enabled @ Thu Dec  2 10:52:21 2021 GMT
--- Invoked apphost [version: static, commit hash: static] main = {
./ArchiSteamFarm
}
The managed DLL bound to this executable is: 'ArchiSteamFarm.dll'
Detected Single-File app bundle
Using internal fxr
Invoking fx resolver [/home/pi/ArchiS2/] hostfxr_main_bundle_startupinfo
Host path: [/home/pi/ArchiS2/ArchiSteamFarm]
Dotnet path: [/home/pi/ArchiS2/]
App path: [/home/pi/ArchiS2/ArchiSteamFarm.dll]
Bundle Header Offset: [18f0a400]
--- Invoked hostfxr_main_bundle_startupinfo [commit hash: static]
Mapped application bundle
Unmapped application bundle
Single-File bundle details:
DepsJson Offset:[1d938] Size[61fa2b8]
RuntimeConfigJson Offset:[2b0] Size[75b0f0]
.net core 3 compatibility mode: [No]
--- Executing in a native executable mode...
Using dotnet root path [/home/pi/ArchiS2/]
App runtimeconfig.json from [/home/pi/ArchiS2/ArchiSteamFarm.dll]
Runtime config is cfg=/home/pi/ArchiS2/ArchiSteamFarm.runtimeconfig.json dev=/home/pi/ArchiS2/ArchiSteamFarm.runtimeconfig.dev.json
Attempting to read runtime config: /home/pi/ArchiS2/ArchiSteamFarm.runtimeconfig.json
Attempting to read dev runtime config: /home/pi/ArchiS2/ArchiSteamFarm.runtimeconfig.dev.json
Mapped bundle for [/home/pi/ArchiS2/ArchiSteamFarm.runtimeconfig.json]
Unmapped application bundle
Runtime config [/home/pi/ArchiS2/ArchiSteamFarm.runtimeconfig.json] is valid=[1]
Executing as a self-contained app as per config file [/home/pi/ArchiS2/ArchiSteamFarm.runtimeconfig.json]
Using internal hostpolicy
Reading from host interface version: [0x16041101:124] to initialize policy version: [0x16041101:124]
Mapped application bundle

host.txt

As a sidenote, because that information is not included in the screenshot: I tried running all those combinations both as root and as a non-privileged user.