NetBSD Problem Report #56637

From www@netbsd.org  Mon Jan 17 07:05:22 2022
Return-Path: <www@netbsd.org>
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 89DF91A9239
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 17 Jan 2022 07:05:22 +0000 (UTC)
Message-Id: <20220117070521.024791A923A@mollari.NetBSD.org>
Date: Mon, 17 Jan 2022 07:05:20 +0000 (UTC)
From: pekdon@gmail.com
Reply-To: pekdon@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Disable LuaJIT2 support on SunOS derivates
X-Send-Pr-Version: www-1.0

>Number:         56637
>Category:       pkg
>Synopsis:       Disable LuaJIT2 support on SunOS derivates
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    solaris-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 17 07:10:00 +0000 2022
>Last-Modified:  Wed Jan 19 10:53:22 +0000 2022
>Originator:     Claes Nstn
>Release:        trunk 2022-01-01
>Organization:
>Environment:
SunOS 5.10 i86pc i386 i86pc

>Description:
LuaJIT2 relies on allocating pointers that fit in < 32 bits on 64bit platforms and the current implementation fails to do so on Solaris 10 not starting at all and on SmartOS it intermittently fails with out of memory errors.

Suggest disabling LuaJIT2 in platform.mk for SunOS until it has been resolved and instead get functional packages falling back to C LUA (where supported)
>How-To-Repeat:
On x86_64 Solaris 10:

% luajit 
luajit: cannot create state: not enough memory

And I've seen similar errors using neovim on SmartOS.
>Fix:
diff --git a/lang/LuaJIT2/platform.mk b/lang/LuaJIT2/platform.mk
index 679c094a64a..8887c862844 100644
--- a/lang/LuaJIT2/platform.mk
+++ b/lang/LuaJIT2/platform.mk
@@ -4,15 +4,19 @@

 .if !defined(PLATFORM_SUPPORTS_LUAJIT)

-.  for _luajit_arch in *arm* i386 mipseb mipsel powerpc x86_64
+# LuaJIT struggle on Illumos derivates with random crashes and fails
+# completely on Solaris
+.  if ${OPSYS} != "SunOS"
+.    for _luajit_arch in *arm* i386 mipseb mipsel powerpc x86_64
 LUAJIT_PLATFORMS+=             *-*-${_luajit_arch}
-.  endfor
+.    endfor

-.  for _luajit_platform in ${LUAJIT_PLATFORMS}
-.    if !empty(MACHINE_PLATFORM:M${_luajit_platform})
+.    for _luajit_platform in ${LUAJIT_PLATFORMS}
+.      if !empty(MACHINE_PLATFORM:M${_luajit_platform})
 PLATFORM_SUPPORTS_LUAJIT=      yes
-.    endif
-.  endfor
+.      endif
+.    endfor
+.  endif
 PLATFORM_SUPPORTS_LUAJIT?=     no

 .endif # !defined(PLATFORM_SUPPORTS_LUAJIT)

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Wed, 19 Jan 2022 10:53:22 +0000
Responsible-Changed-Why:
A SunOS problem.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.