From owner-freebsd-arm@freebsd.org Thu Apr 1 09:30:13 2021 Return-Path: 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 229A15C6280; Thu, 1 Apr 2021 09:30:13 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4F9yZr2rRfz3Gd1; Thu, 1 Apr 2021 09:30:12 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Date: Thu, 1 Apr 2021 11:30:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1617269409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RgqgUmZFRUTJJF4ooabnt8gWFyVDCqZ9cqM4MsYa5PU=; b=pC1q32Vvi/9An8V3/h4Heys20TmsesuI6oaTQ1KPDwqO8n8aXtX3pA69f98WGG0CjJnleo 2bI8K/JlDAa0BCXI0mrJEg6uj+qFDc9xovkmxP/sdy8dWIz9p39kTdh6DEupv9kYBJzWSb dG393Ko2j/wKn7W7X21qkEA1/MvoJDtlvVNf7F0Hrxfp1ir4B6WyNfx1Zpn9aTO2sjGy7s s3VBODH1rgLVAG0j8lYmzJOlIN+dCiVHo9rZMmALPcrncstJUupsGiJH+fFyFOCKSYfyiP muX2Sc7EpxrakVuB+KwfSeiqWmJ5FELJyBnnoK/NFnldU8nZ6j0wNQKztV96yg== From: Ronald Klop To: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= Cc: freebsd-arm@freebsd.org, freebsd-ports@freebsd.org Message-ID: <570889743.2.1617269408704@localhost> In-Reply-To: References: <1071728798.124.1617266260257@localhost> Subject: Re: Illegal instruction on new port mongodb49 on arm64 MIME-Version: 1.0 X-Mailer: Realworks (554.128.db2b1297238) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 4F9yZr2rRfz3Gd1 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=rw2 header.b=pC1q32Vv; dmarc=pass (policy=none) header.from=klop.ws; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 194.109.157.24 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-1.50 / 15.00]; ARC_NA(0.00)[]; RWL_MAILSPIKE_VERYGOOD(0.00)[194.109.157.24:from]; R_DKIM_ALLOW(-0.20)[klop.ws:s=rw2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[klop.ws:+]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,none]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_IN_DNSWL_NONE(0.00)[194.109.157.24:from]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; MAILMAN_DEST(0.00)[freebsd-arm,freebsd-ports] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting FreeBSD to ARM processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2021 09:30:13 -0000 =20 Van: "Micha? G=C3=B3rny" Datum: donderdag, 1 april 2021 10:47 Aan: Ronald Klop , 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: 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 ; 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 ; 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 ; 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 ; 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: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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.=