Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 May 2024 08:08:41 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 279267] gofortran on i386: SIGBUS inside _gfortran_transfer_complex128_write
Message-ID:  <bug-279267-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279267

            Bug ID: 279267
           Summary: gofortran on i386: SIGBUS inside
                    _gfortran_transfer_complex128_write
           Product: Ports & Packages
           Version: Latest
          Hardware: i386
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: mi@FreeBSD.org
                CC: salvadore@freebsd.org

Trying to install py-numpy, I tried both the OPENBLAS and the NETLIB option=
s.

OPENBLASS does not even build (it dies while testing itself):
gfortran13 -O2 -march=3Dnative -Wl,-rpath=3D/opt/lib/gcc13 -O2 -m128bit-lon=
g-double
-Wall -frecursive -fno-optimize-sibling-calls -m32  -msse -msse2 -msse3 -ms=
sse3
-msse4.1 -O2 -m128bit-long-double -Wall -frecursive -fno-optimize-sibling-c=
alls
-m32  -msse -msse2 -msse3 -mssse3 -msse4.1 -fno-tree-vectorize=20
-Wl,-rpath=3D/opt/lib/gcc13  -L/opt/lib/gcc13 -fstack-protector-strong  -o =
dblat3
dblat3.o ../libopenblas_nehalemp-r0.3.25.a -lpthread -lgfortran -lpthread
-lgfortran -L/usr/lib  -lc
OPENBLAS_NUM_THREADS=3D1 OMP_NUM_THREADS=3D1 ./sblat1
gmake[1]: *** [Makefile:30: level1] Bus error (core dumped)
gmake[1]: *** Waiting for unfinished jobs....

The BLAS/CBLAS/LAPACK (NETLIB) don't bother with self-testing and install.
However, trying to use even load them (such by running "import numpy" insid=
e a
Python script) crashes too.

In all cases the crash is inside:
#0  0x2845b346 in _gfortran_transfer_complex128_write () from
/opt/lib/gcc13/libgfortran.so.5
[New Thread 28a12000 (LWP 115657/<unknown>)]

I tried rebuilding everything with both gcc13 and 12 -- the crash is the sa=
me.

SIGBUS suggests a misalignment of input arguments -- perhaps, something oug=
ht
to be aligned at 128-bit, and is not (because i386).

My CFLAGS contain -march=3Dsandybridge and my FFLAGS use -march=3Dnative in=
stead.

The CPU-features are listed (in /var/run/dmesg.boot) as:
CPU: Intel(R) Core(TM) i5-9500 CPU @ 3.00GHz (3000.11-MHz 686-class CPU)
  Origin=3D"GenuineIntel"  Id=3D0x906ea  Family=3D0x6  Model=3D0x9e  Steppi=
ng=3D10
=20
Features=3D0x1783fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,=
MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE,SSE2,HTT>
=20
Features2=3D0x5eda2203<SSE3,PCLMULQDQ,SSSE3,CX16,PCID,SSE4.1,SSE4.2,MOVBE,P=
OPCNT,AESNI,XSAVE,OSXSAVE,AVX,RDRAND>
  AMD Features=3D0x8100000<NX,RDTSCP>
  AMD Features2=3D0x121<LAHF,ABM,Prefetch>
  Structured Extended
Features=3D0x42529<FSGSBASE,BMI1,AVX2,BMI2,INVPCID,NFPUSG,RDSEED>
  Structured Extended Features3=3D0x30000400<MD_CLEAR,L1DFL,ARCH_CAP>
  IA32_ARCH_CAPS=3D0x2000c04<RSBA>
  TSC: P-state invariant

However, this is a VM running under Oracle's VirtualBox supervisor.

According to OpenBLAS' Freshports-page, the port builds on i386 -- but it is
unclear, which version of gfortran it uses and which optimization flags.

--=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?bug-279267-7788>