Date: Thu, 1 Apr 2021 11:30:08 +0200 (CEST) From: Ronald Klop <ronald-lists@klop.ws> To: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= <mgorny@gentoo.org> Cc: freebsd-arm@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Illegal instruction on new port mongodb49 on arm64 Message-ID: <570889743.2.1617269408704@localhost> In-Reply-To: <dc54a8d4ee2ca73f41930681348bc9b2a3e89376.camel@gentoo.org> References: <1071728798.124.1617266260257@localhost> <dc54a8d4ee2ca73f41930681348bc9b2a3e89376.camel@gentoo.org>
next in thread | previous in thread | raw e-mail | index | archive | help
=20 Van: "Micha? G=C3=B3rny" <mgorny@gentoo.org> Datum: donderdag, 1 april 2021 10:47 Aan: Ronald Klop <ronald-lists@klop.ws>, freebsd-ports@freebsd.org, freebsd= -arm@freebsd.org Onderwerp: Re: Illegal instruction on new port mongodb49 on arm64 >=20 > On Thu, 2021-04-01 at 10:37 +0200, Ronald Klop wrote: > > Hi, > > > > I created a new port for mongodb49: https://bugs.freebsd.org/bugzilla/s= how_bug.cgi?id=3D254631 > > It compiles fine: https://www.klop.ws/mongodb49-4.9.0.r0.log > > > > When I run an application I get "Illegal Instruction" error. > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > [root@rpi4 /tmp]# lldb /usr/local/bin/mongo > > (lldb) target create "/usr/local/bin/mongo" > > Current executable set to '/usr/local/bin/mongo' (aarch64). > > (lldb) run > > Process 55420 launching > > Process 55420 launched: '/usr/local/bin/mongo' (aarch64) > > Process 55420 stopped > > * thread #1, name =3D 'mongo', stop reason =3D signal SIGILL: illegal t= rap > > frame #0: 0x00000000016a320c mongo`___lldb_unnamed_symbol32$$mongo = + 1784 > > mongo`___lldb_unnamed_symbol32$$mongo: > > -> 0x16a320c <+1784>: ldaddal x9, x8, [x8] >=20 > According to [1], this instruction requires ARMv8.1. If I grep > correctly, rpi4 is ARMv8-A. Yet you're compiling with -march=3Darmv8.2-a= , > so it's a case of wrong -march. >=20 > [1] https://developer.arm.com/documentation/100069/0608/A64-Data-Transfer= -Instructions/LDADDA--LDADDAL--LDADD--LDADDL--LDADDAL--LDADD--LDADDL >=20 > --=20 > Best regards, > Micha G=C3=B3rny >=20 > =20 >=20 >=20 >=20 Hi, Thank you for the quick insight. Now I found this update upstream: https://jira.mongodb.org/browse/SERVER-55= 178 and https://github.com/mongodb/mongo/commit/8f708f3b68c3c85108294a8f58d= 780b6ccf18194 . Not much info why this was necessary though. I hate it when a commit messag= e describes *what* changed instead of *why* it changed. The what is already= in the diff. Anyways. Thanks for the reply. I think I'll need to try to contact somebody= at MongoDB. Regards, Ronald. =20 From owner-freebsd-arm@freebsd.org Thu Apr 1 10:17:38 2021 Return-Path: <owner-freebsd-arm@freebsd.org> Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B4005C6FD8 for <freebsd-arm@mailman.nyi.freebsd.org>; Thu, 1 Apr 2021 10:17:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F9zdZ0CxGz3K7t for <freebsd-arm@FreeBSD.org>; Thu, 1 Apr 2021 10:17:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE9DF2EA1 for <freebsd-arm@FreeBSD.org>; Thu, 1 Apr 2021 10:17:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 131AHbki003649 for <freebsd-arm@FreeBSD.org>; Thu, 1 Apr 2021 10:17:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 131AHb9q003648 for freebsd-arm@FreeBSD.org; Thu, 1 Apr 2021 10:17:37 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 254693] random crashes with armv7 thumb application on arm64 Date: Thu, 01 Apr 2021 10:17:38 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 13.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: fuz@fuz.su X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: <bug-254693-7@https.bugs.freebsd.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting FreeBSD to ARM processors <freebsd-arm.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-arm>, <mailto:freebsd-arm-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-arm/> List-Post: <mailto:freebsd-arm@freebsd.org> List-Help: <mailto:freebsd-arm-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-arm>, <mailto:freebsd-arm-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 01 Apr 2021 10:17:38 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254693 Bug ID: 254693 Summary: random crashes with armv7 thumb application on arm64 Product: Base System Version: 13.0-STABLE Hardware: arm OS: Any Status: New Severity: Affects Some People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: fuz@fuz.su I'm trying to run Mecrisp Stellaris 2.5.8 on arm64 FreeBSD. This is a Forth system written entirely in armv7 thumb2 assembly. A FreeBSD port has exist= ed for a while and has recently been made available as lang/mecrisp-stellaris = in the ports tree. It appears that with FreeBSD 13, rudimentary support for loading and running armv7 binaries from arm64 FreeBSD exists. And indeed, mecrisp-stellaris lo= ads and executes fine. However, problems crop up once more definitions are loa= ded. Specifically, the system crashes in random places with a wildly inconsiste= nt program state. To reproduce the issue, download Mecrisp Stellaris 2.5.8 from Sourceforge [= 1] onto an arm64 FreeBSD 13 system. Navigate into the freebsd-ra directory and execute "buildcore-freebsd". You should see a few pages of output followed= by a crash. The crash is a segmentation fault or an illegal instruction fault. The same issue does not seem to appear on armv7 FreeBSD, so I'm a bit at a = loss as to what may have caused this. [1]: https://sourceforge.net/projects/mecrisp/files/mecrisp-stellaris-2.5.8.tar.= gz --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?570889743.2.1617269408704>