Skip to content
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

mcs crash - Macbook M1 #21423

Open
nelsoncc opened this issue Feb 3, 2022 · 6 comments
Open

mcs crash - Macbook M1 #21423

nelsoncc opened this issue Feb 3, 2022 · 6 comments

Comments

@nelsoncc
Copy link

nelsoncc commented Feb 3, 2022

Steps to Reproduce

  1. Create a docker container with debian:bullseye image in Macbook M1 processor (use platform: linux/amd64)
  2. Install the libs libmono-2.0-dev, mono-mcs
  3. Execute mcs

Current Behavior

mcs crashes when executed

Expected Behavior

mcs doesn't crash when executed (if I execute the same process but in a macbook i5 processor, it works correctly)

On which platforms did you notice this

[x] macOS
[ ] Linux
[ ] Windows

Version Used:
libmono-2.0-dev/stable,now 6.8.0.105+dfsg-3.2 amd64 [installed]
libmono-corlib4.5-cil/stable,now 6.8.0.105+dfsg-3.2 all [installed,automatic]
libmono-corlib4.5-dll/stable,now 6.8.0.105+dfsg-3.2 all [installed,automatic]
libmono-microsoft-csharp4.0-cil/stable,now 6.8.0.105+dfsg-3.2 all [installed,automatic]
libmono-security4.0-cil/stable,now 6.8.0.105+dfsg-3.2 all [installed,automatic]
libmono-system-configuration4.0-cil/stable,now 6.8.0.105+dfsg-3.2 all [installed,automatic]
libmono-system-core4.0-cil/stable,now 6.8.0.105+dfsg-3.2 all [installed,automatic]
libmono-system-numerics4.0-cil/stable,now 6.8.0.105+dfsg-3.2 all [installed,automatic]
libmono-system-security4.0-cil/stable,now 6.8.0.105+dfsg-3.2 all [installed,automatic]
libmono-system-xml4.0-cil/stable,now 6.8.0.105+dfsg-3.2 all [installed,automatic]
libmono-system4.0-cil/stable,now 6.8.0.105+dfsg-3.2 all [installed,automatic]
mono-4.0-gac/stable,now 6.8.0.105+dfsg-3.2 all [installed,automatic]
mono-gac/stable,now 6.8.0.105+dfsg-3.2 all [installed,automatic]
mono-mcs/stable,now 6.8.0.105+dfsg-3.2 all [installed]
mono-runtime-common/stable,now 6.8.0.105+dfsg-3.2 amd64 [installed,automatic]
mono-runtime-sgen/stable,now 6.8.0.105+dfsg-3.2 amd64 [installed,automatic]
mono-runtime/stable,now 6.8.0.105+dfsg-3.2 amd64 [installed,automatic]

Stacktrace

root@test-machine:/usr/src# mcs
TYPE: 6
V: mono_helper_ldstr_mscorlib
* Assertion at ../../mono/arch/amd64/../x86/x86-codegen.h:410, condition `offset == (gint32)offset' not met


=================================================================
	Native Crash Reporting
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

=================================================================
	Native stacktrace:
=================================================================
	0x40000bdf05 - /usr/bin/mono : (null)
	0x40000be2ac - /usr/bin/mono : (null)
	0x4000069a4a - /usr/bin/mono : (null)
	0x40000bd4df - /usr/bin/mono : (null)
	0x4001e6e140 - /lib/x86_64-linux-gnu/libpthread.so.0 : (null)
	0x4001ed1ce1 - /lib/x86_64-linux-gnu/libc.so.6 : gsignal
	0x4001ebb537 - /lib/x86_64-linux-gnu/libc.so.6 : abort
	0x400002c077 - /usr/bin/mono : (null)
	0x4000323895 - /usr/bin/mono : (null)
	0x40003425b1 - /usr/bin/mono : monoeg_assertion_message
	0x400008f321 - /usr/bin/mono : (null)
	0x40000c29cb - /usr/bin/mono : (null)
	0x40000c4b20 - /usr/bin/mono : (null)
	0x40000c5742 - /usr/bin/mono : (null)
	0x4000031ab1 - /usr/bin/mono : (null)
	0x400006d466 - /usr/bin/mono : (null)
	0x400006e24e - /usr/bin/mono : (null)
	0x4002089513 - Unknown

=================================================================
	Telemetry Dumper:
=================================================================
Pkilling 0x4005078700 from 0x400205c5c0
Could not exec mono-hang-watchdog, expected on path '/etc/../bin/mono-hang-watchdog' (errno 2)
Entering thread summarizer pause from 0x400205c5c0
Finished thread summarizer pause from 0x400205c5c0.

Waiting for dumping threads to resume

=================================================================
	External Debugger Dump:
=================================================================
mono_gdb_render_native_backtraces not supported on this platform, unable to find gdb or lldb

=================================================================
	Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x4001ed1ce1):0x4001ed1cd1  d2 4c 89 ce bf 02 00 00 00 b8 0e 00 00 00 0f 05  .L..............
0x4001ed1ce1  48 8b 84 24 08 01 00 00 64 48 2b 04 25 28 00 00  H..$....dH+.%(..
0x4001ed1cf1  00 75 20 44 89 c0 48 81 c4 18 01 00 00 c3 90 48  .u D..H........H
0x4001ed1d01  8b 15 69 21 18 00 f7 d8 41 b8 ff ff ff ff 64 89  ..i!....A.....d.

=================================================================
	Managed Stacktrace:
=================================================================
	  at <unknown> <0xffffffff>
	  at System.Text.ValueUtf8Converter:ConvertAndTerminateString <0x00073>
	  at Sys:Stat <0x0015b>
	  at System.IO.FileSystem:FileExists <0x00097>
	  at System.IO.FileSystem:DirectoryExists <0x0004b>
	  at System.IO.FileSystem:DirectoryExists <0x00053>
	  at System.IO.Directory:Exists <0x00133>
	  at System.TermInfoDriver:SearchTerminfo <0x00107>
	  at System.TermInfoDriver:.ctor <0x00147>
	  at System.ConsoleDriver:CreateTermInfoDriver <0x00053>
	  at System.ConsoleDriver:.cctor <0x000d7>
	  at System.Object:runtime_invoke_void <0x0009d>
	  at <unknown> <0xffffffff>
	  at System.Console:SetupStreams <0x00057>
	  at System.Console:.cctor <0x001b7>
	  at System.Object:runtime_invoke_void <0x0009d>
	  at <unknown> <0xffffffff>
	  at Mono.CSharp.Driver:Main <0x000a3>
	  at <Module>:runtime_invoke_int_object <0x000a8>
=================================================================
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted
@dwt
Copy link

dwt commented Aug 16, 2022

Same problem here, but on ubuntu 20.04 LTS during the installation of an unrelated library. Is there any workaround available? I don't really want to execute mono, but this happens as some sort of install dependency. libgio2.0-cil-dev in my case.

@werediver
Copy link

Happening to me on Ubuntu 20.04 LTS on an ARM64 host when running in a Podman container emulating AMD64.

@lockhartja
Copy link

Similar problem seen as well when attempting to execute chocolatey docker image for *.nix https://stackoverflow.com/questions/76553881/can-the-chocolatey-choco-container-be-used-on-apple-m1-silicon has anyone come across a workaround?

@caiomcg
Copy link

caiomcg commented Apr 23, 2024

Having the same issue no an M1 Pro with a Ubuntu 20.04 container. Any workarounds?

Docker Desktop: 26.0.0

@werediver
Copy link

The practical "workaround" is to run a full-blown VM with foreign architecture emulation.

@caiomcg
Copy link

caiomcg commented Apr 23, 2024

The practical "workaround" is to run a full-blown VM with foreign architecture emulation.

That's a bummer, thanks for the quick reply. I'll spin a VM while we don't have a better alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants