NetBSD Problem Report #56521
From wiz@yt.nih.at Wed Nov 24 21:20:00 2021
Return-Path: <wiz@yt.nih.at>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id B4BD11A9239
for <gnats-bugs@gnats.NetBSD.org>; Wed, 24 Nov 2021 21:20:00 +0000 (UTC)
Message-Id: <20211124211955.7ABC51CB6ACA@yt.nih.at>
Date: Wed, 24 Nov 2021 22:19:55 +0100 (CET)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Subject: Linux emulation: dotnet does not work
X-Send-Pr-Version: 3.95
>Number: 56521
>Category: kern
>Synopsis: Linux emulation: dotnet does not work
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 24 21:25:00 +0000 2021
>Originator: Thomas Klausner
>Release: NetBSD 9.99.92
>Organization:
>Environment:
Architecture: x86_64
Machine: amd64
>Description:
When I try running .NET programs compiled for Linux on NetBSD, I see
errors about failures to create CoreCLR.
>How-To-Repeat:
Example:
https://romvault.com/trrntzip/download/TrrntZip.NET210Linux.zip
file reports:
TrrntZipCMD: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=104b3fd6fc145ba98d58ca66e152744bc7f251b7, stripped
Running it gives:
Failed to create CoreCLR, HRESULT: 0x8007054F
The same happens when one downloads the .NET SDK from Microsoft and tries to run it.
Visit https://dotnet.microsoft.com/download/dotnet/3.1 and get "SDK 3.1.something"
from the left side of the web page, the Linux x64 version.
Unpack it (attention, it unpacks into ".") and run
./dotnet -h
Failed to create CoreCLR, HRESULT: 0x8007054F
The kdump between finding the correct executable and the error is quite short:
(cut)
26233 26233 dotnet NAMI "/home/wiz/dotnet/dotnet"
26233 26233 dotnet RET lstat64 0
26233 26233 dotnet CALL mmap(0x7f7f7c3dc000,0x79bf0000,PROT_NONE,0x22<PRIVATE,RENAME,FILE,ALIGN=NONE>,0xffffffff,0)
26233 26233 dotnet RET mmap 140185519865856/0x7f7f7c1d4000
26233 26233 dotnet CALL munmap(0x7f7f7c1d4000,0x79bf0000)
26233 26233 dotnet RET munmap 0
26233 26233 dotnet CALL mmap(0x7f7f7c3dc000,0x71bf0000,PROT_NONE,0x22<PRIVATE,RENAME,FILE,ALIGN=NONE>,0xffffffff,0)
26233 26233 dotnet RET mmap 140185521995776/0x7f7f7c3dc000
26233 26233 dotnet CALL time(0)
26233 26233 dotnet RET time 1637788729/0x619eac39
26233 26233 dotnet CALL mmap(0,0x401000,PROT_READ|PROT_WRITE,0x20022<PRIVATE,RENAME,FILE,ALIGN=NONE>,0xffffffff,0)
26233 26233 dotnet RET mmap 140187558227968/0x7f7ff59c3000
26233 26233 dotnet CALL mprotect(0x7f7ff59c3000,0x1000,PROT_NONE)
26233 26233 dotnet RET mprotect 0
26233 26233 dotnet CALL clone(0x3d0f00,0x7f7ff5dc2fb0,0x7f7ff5dc39d0,0x7f7ff5dc39d0,0x7f7ff5dc3700)
26233 26233 dotnet RET clone 281/0x119
26233 26233 dotnet CALL futex(0x4f4cd4,FUTEX_WAIT_PRIVATE,1,0,0x4f4c00,0)
26233 281 dotnet RET open 0
26233 281 dotnet CALL __futex_set_robust_list(0x7f7ff5dc39e0,0x18)
26233 281 dotnet RET __futex_set_robust_list 0
26233 281 dotnet CALL sched_getaffinity(0x6679,0x80,0x7f7ff5dc2e70)
26233 281 dotnet RET sched_getaffinity 8
26233 281 dotnet CALL sched_getaffinity(0x6679,0x80,0x7f7ff5dc2da0)
26233 281 dotnet RET sched_getaffinity 8
26233 281 dotnet CALL sched_setaffinity(0,0x80,0x7f7ff5dc2e70)
26233 281 dotnet RET sched_setaffinity -1 errno -1 Operation not permitted
26233 281 dotnet CALL futex(0x4f4cd4,FUTEX_WAKE_OP_PRIVATE,1,1,0x4f4cd0,0x4000001)
26233 281 dotnet RET futex 1
26233 26233 dotnet RET futex 0
26233 26233 dotnet CALL futex(0x4f4ca8,FUTEX_WAKE_PRIVATE,1,0,0,1)
26233 281 dotnet CALL madvise(0x7f7ff59c3000,0x3fb000,4)
26233 26233 dotnet RET futex 0
26233 281 dotnet RET madvise 0
26233 281 dotnet CALL exit(0)
26233 26233 dotnet CALL write(2,0x470260,0x2d)
26233 26233 dotnet GIO fd 2 wrote 45 bytes
"Failed to create CoreCLR, HRESULT: 0x8007054F"
(cut)
>Fix:
Yes please.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.