[R] Compilation problems with R4.4.0

Simon Andrews @|mon@@ndrew@ @end|ng |rom b@br@h@m@@c@uk
Wed May 8 16:25:08 CEST 2024


Hi Ivan,

Thanks for getting back to me and very happy to hear I'm not the only one who's seen this.

I've run the command under the debugger and the backtrace is below.  It's complaining about missing debuginfo packages, but I definitely installed them so I'm not sure why they're not being seen.

$ ./debug.sh
GNU gdb (GDB) Red Hat Enterprise Linux 10.2-11.el9
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /bi/apps/R/R-4.4.0/bin/exec/R...
(gdb) run
Starting program: /bi/apps/R/R-4.4.0/bin/exec/R --vanilla --no-echo -e tools:::makeLazyLoading\(\"grDevices\"\)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Detaching after vfork from child process 2621570]
[Detaching after vfork from child process 2621572]

Program received signal SIGSEGV, Segmentation fault.
dlaswp (n=<optimized out>, a=<error reading variable: value has been optimized out>, lda=<optimized out>, k1=<optimized out>, k2=<optimized out>, ipiv=...,
    incx=1) at /usr/src/debug/lapack-3.9.0-10.el9.x86_64/SRC/dlaswp.f:180
180                       TEMP = A( I, K )
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.34-83.el9_3.7.x86_64 libgcc-11.4.1-2.1.el9.alma.x86_64 libgfortran-11.4.1-2.1.el9.alma.x86_64 libgomp-11.4.1-2.1.el9.alma.x86_64 libquadmath-11.4.1-2.1.el9.alma.x86_64 libstdc++-11.4.1-2.1.el9.alma.x86_64 pcre2-10.40-2.el9.x86_64
(gdb) bt
#0  dlaswp (n=<optimized out>, a=<error reading variable: value has been optimized out>, lda=<optimized out>, k1=<optimized out>, k2=<optimized out>,
    ipiv=..., incx=1) at /usr/src/debug/lapack-3.9.0-10.el9.x86_64/SRC/dlaswp.f:180
#1  0x00007ffff3f9474a in dgetrf2 (m=12884901891, n=<optimized out>, a=<error reading variable: value has been optimized out>, lda=12884901891, ipiv=...,
    info=0) at /usr/src/debug/lapack-3.9.0-10.el9.x86_64/SRC/dgetrf2.f:238
#2  0x00007ffff3f946dc in dgetrf2 (m=12884901891, n=4, a=<error reading variable: value has been optimized out>, lda=12884901891, ipiv=..., info=0)
    at /usr/src/debug/lapack-3.9.0-10.el9.x86_64/SRC/dgetrf2.f:229
#3  0x00007ffff3f946dc in dgetrf2 (m=12884901891, n=8, a=<error reading variable: value has been optimized out>, lda=12884901891, ipiv=..., info=0)
    at /usr/src/debug/lapack-3.9.0-10.el9.x86_64/SRC/dgetrf2.f:229
#4  0x00007ffff3f946dc in dgetrf2 (m=12884901891, n=16, a=<error reading variable: value has been optimized out>, lda=12884901891, ipiv=..., info=0)
    at /usr/src/debug/lapack-3.9.0-10.el9.x86_64/SRC/dgetrf2.f:229
#5  0x00007ffff3f946dc in dgetrf2 (m=12884901891, n=32, a=<error reading variable: value has been optimized out>, lda=12884901891, ipiv=..., info=0)
    at /usr/src/debug/lapack-3.9.0-10.el9.x86_64/SRC/dgetrf2.f:229
#6  0x00007ffff3f946dc in dgetrf2 (m=12884901891, n=64, a=<error reading variable: value has been optimized out>, lda=12884901891, ipiv=..., info=0)
    at /usr/src/debug/lapack-3.9.0-10.el9.x86_64/SRC/dgetrf2.f:229
#7  0x00007ffff3f94cb4 in dgetrf (m=12884901891, n=12884901891, a=<error reading variable: value has been optimized out>, lda=12884901891, ipiv=..., info=0)
    at /usr/src/debug/lapack-3.9.0-10.el9.x86_64/SRC/dgetrf.f:183
#8  0x00007ffff3f87c0b in dgesv (n=12884901891, nrhs=4294967299, a=<error reading variable: value has been optimized out>, lda=12884901891, ipiv=...,
    b=<error reading variable: value has been optimized out>, ldb=12884901891, info=0) at /usr/src/debug/lapack-3.9.0-10.el9.x86_64/SRC/dgesv.f:167
#9  0x00007ffff50b2a17 in La_solve (tolin=<optimized out>, Bin=<optimized out>, A=0x18f2f68) at Lapack.c:1246
#10 mod_do_lapack (call=<optimized out>, op=<optimized out>, args=<optimized out>, env=<optimized out>) at Lapack.c:1483
#11 0x00007ffff7c95668 in bcEval_loop (ploc=<optimized out>) at eval.c:8141
#12 0x00007ffff7cb0f4d in bcEval (rho=0x19027c8, body=0x18fc7a0) at eval.c:7524
#13 bcEval (body=0x18fc7a0, rho=0x19027c8) at eval.c:7509
#14 0x00007ffff7cb127b in Rf_eval (e=e using entry=0x18fc7a0, rho=rho using entry=0x19027c8) at eval.c:1167
#15 0x00007ffff7cb330f in R_execClosure (call=call using entry=0x1902918, newrho=newrho using entry=0x19027c8, sysparent=<optimized out>, rho=rho using entry=0x18f8508,
    arglist=arglist using entry=0x18f85e8, op=op using entry=0x18fcae8) at eval.c:2398
#16 0x00007ffff7cb40f7 in applyClosure_core (call=0x1902918, op=0x18fcae8, arglist=0x18f85e8, rho=0x18f8508, suppliedvars=<optimized out>,
    unpromise=unpromise using entry=FALSE) at eval.c:2311
#17 0x00007ffff7cb4b19 in Rf_applyClosure (call=<optimized out>, op=<optimized out>, arglist=<optimized out>, rho=<optimized out>,
    suppliedvars=<optimized out>, unpromise=unpromise using entry=FALSE) at eval.c:2333
#18 0x00007ffff7cf6cce in applyMethod (call=call using entry=0x1902918, op=op using entry=0x18fcae8, args=<optimized out>, rho=rho using entry=0x18f8508,
    newvars=newvars using entry=0x1902988) at objects.c:120
#19 0x00007ffff7cf7e44 in dispatchMethod (op=op using entry=0x18f8818, sxp=0x18fcae8, dotClass=<optimized out>, cptr=cptr using entry=0x7fffffff5bc0,
    method=method using entry=0x524110, generic=generic using entry=0x4c9080 "solve", rho=<optimized out>, callrho=<optimized out>, defrho=<optimized out>)
    at objects.c:472
#20 0x00007ffff7cf8457 in Rf_usemethod (generic=0x4c9080 "solve", obj=obj using entry=0x18f2f68, call=call using entry=0x18f8700, args=args using entry=0x423210,
    rho=rho using entry=0x18f8508, callrho=0x18f74c8, defrho=0x45a470, ans=0x7fffffff3ea8) at objects.c:522
#21 0x00007ffff7cf882b in do_usemethod (call=0x18f8700, op=<optimized out>, args=<optimized out>, env=0x18f8508) at objects.c:578
#22 0x00007ffff7c9548f in bcEval_loop (ploc=<optimized out>) at eval.c:7172
#23 0x00007ffff7cb0f4d in bcEval (rho=0x18f8508, body=0x18f8738) at eval.c:7524
#24 bcEval (body=0x18f8738, rho=0x18f8508) at eval.c:7509
#25 0x00007ffff7cb127b in Rf_eval (e=e using entry=0x18f8738, rho=rho using entry=0x18f8508) at eval.c:1167
#26 0x00007ffff7cb330f in R_execClosure (call=call using entry=0x1625058, newrho=newrho using entry=0x18f8508, sysparent=<optimized out>, rho=rho using entry=0x18f74c8,
    arglist=arglist using entry=0x18f85e8, op=op using entry=0x18f8818) at eval.c:2398
#27 0x00007ffff7cb40f7 in applyClosure_core (call=call using entry=0x1625058, op=op using entry=0x18f8818, arglist=0x18f85e8, rho=rho using entry=0x18f74c8,
    suppliedvars=<optimized out>, unpromise=unpromise using entry=TRUE) at eval.c:2311
#28 0x00007ffff7cb13ac in Rf_applyClosure (unpromise=TRUE, suppliedvars=<optimized out>, rho=0x18f74c8, arglist=<optimized out>, op=0x18f8818, call=0x1625058)
    at eval.c:2333
#29 Rf_eval (e=0x1625058, rho=rho using entry=0x18f74c8) at eval.c:1285
#30 0x00007ffff7cb649f in Rf_evalList (el=0x1625020, rho=rho using entry=0x18f74c8, call=call using entry=0x1624fb0, n=<optimized out>, n using entry=0) at eval.c:3680
#31 0x00007ffff7cb17aa in Rf_eval (e=0x1624fb0, rho=0x18f74c8) at eval.c:1256
#32 0x00007ffff7cb1c55 in forcePromise (e=0x18f8a48) at eval.c:976
--Type <RET> for more, q to quit, c to continue without paging--
#33 forcePromise (e=0x18f8a48) at eval.c:954
#34 0x00007ffff7cb1ed0 in getvar (symbol=0x48b050, rho=0x18f89a0, dd=<optimized out>, keepmiss=FALSE, vcache=<optimized out>, sidx=<optimized out>)
    at eval.c:5857
#35 0x00007ffff7c9dc4e in bcEval_loop (ploc=<optimized out>) at eval.c:7871
#36 0x00007ffff7cb0f4d in bcEval (rho=0x18f89a0, body=0x18f8bd0) at eval.c:7524
#37 bcEval (body=0x18f8bd0, rho=0x18f89a0) at eval.c:7509
#38 0x00007ffff7cb127b in Rf_eval (e=e using entry=0x18f8bd0, rho=rho using entry=0x18f89a0) at eval.c:1167
#39 0x00007ffff7cb330f in R_execClosure (call=call using entry=0x1624e98, newrho=newrho using entry=0x18f89a0, sysparent=<optimized out>, rho=rho using entry=0x18f74c8,
    arglist=arglist using entry=0x18f8a10, op=op using entry=0x18f8c40) at eval.c:2398
#40 0x00007ffff7cb40f7 in applyClosure_core (call=call using entry=0x1624e98, op=op using entry=0x18f8c40, arglist=0x18f8a10, rho=rho using entry=0x18f74c8,
    suppliedvars=<optimized out>, unpromise=unpromise using entry=TRUE) at eval.c:2311
#41 0x00007ffff7cb13ac in Rf_applyClosure (unpromise=TRUE, suppliedvars=<optimized out>, rho=0x18f74c8, arglist=<optimized out>, op=0x18f8c40, call=0x1624e98)
    at eval.c:2333
#42 Rf_eval (e=0x1624e98, rho=rho using entry=0x18f74c8) at eval.c:1285
#43 0x00007ffff7cb6322 in do_set (call=0x1624df0, op=0x421338, args=0x1624e28, rho=0x18f74c8) at ../../src/include/Rinlinedfuns.h:90
#44 0x00007ffff7cb16b6 in Rf_eval (e=0x1624df0, rho=rho using entry=0x18f74c8) at eval.c:1237
#45 0x00007ffff7cb4e68 in do_begin (call=0x1621a78, op=0x42c4a0, args=0x1624db8, rho=0x18f74c8) at ../../src/include/Rinlinedfuns.h:90
#46 0x00007ffff7cb16b6 in Rf_eval (e=e using entry=0x1621a78, rho=rho using entry=0x18f74c8) at eval.c:1237
#47 0x00007ffff7cb330f in R_execClosure (call=call using entry=0x1631a40, newrho=newrho using entry=0x18f74c8, sysparent=<optimized out>, rho=rho using entry=0x15a65c8,
    arglist=arglist using entry=0x18f7880, op=op using entry=0x18d38d8) at eval.c:2398
#48 0x00007ffff7cb40f7 in applyClosure_core (call=call using entry=0x1631a40, op=op using entry=0x18d38d8, arglist=0x18f7880, rho=rho using entry=0x15a65c8,
    suppliedvars=<optimized out>, unpromise=unpromise using entry=TRUE) at eval.c:2311
#49 0x00007ffff7cb13ac in Rf_applyClosure (unpromise=TRUE, suppliedvars=<optimized out>, rho=0x15a65c8, arglist=<optimized out>, op=0x18d38d8, call=0x1631a40)
    at eval.c:2333
#50 Rf_eval (e=0x1631a40, rho=rho using entry=0x15a65c8) at eval.c:1285
#51 0x00007ffff7cb649f in Rf_evalList (el=0x1631928, rho=rho using entry=0x15a65c8, call=call using entry=0x16497a0, n=<optimized out>, n using entry=0) at eval.c:3680
#52 0x00007ffff7cb17aa in Rf_eval (e=0x16497a0, rho=rho using entry=0x15a65c8) at eval.c:1256
#53 0x00007ffff7cb6322 in do_set (call=0x16496f8, op=0x421338, args=0x1649730, rho=0x15a65c8) at ../../src/include/Rinlinedfuns.h:90
#54 0x00007ffff7cb16b6 in Rf_eval (e=0x16496f8, rho=rho using entry=0x15a65c8) at eval.c:1237
#55 0x00007ffff7cb7b46 in do_eval (call=<optimized out>, op=<optimized out>, args=<optimized out>, rho=0x18d5d70) at eval.c:3974
#56 0x00007ffff7c95668 in bcEval_loop (ploc=<optimized out>) at eval.c:8141
#57 0x00007ffff7cb0f4d in bcEval (rho=0x1517590, body=0x7e06a0) at eval.c:7524
#58 bcEval (body=0x7e06a0, rho=0x1517590) at eval.c:7509
#59 0x00007ffff7cb127b in Rf_eval (e=e using entry=0x7e06a0, rho=rho using entry=0x1517590) at eval.c:1167
#60 0x00007ffff7cb330f in R_execClosure (call=call using entry=0x78a960, newrho=newrho using entry=0x1517590, sysparent=<optimized out>, rho=rho using entry=0x8eb288,
    arglist=arglist using entry=0x1517910, op=op using entry=0x7e0b70) at eval.c:2398
#61 0x00007ffff7cb40f7 in applyClosure_core (call=call using entry=0x78a960, op=op using entry=0x7e0b70, arglist=0x1517910, rho=rho using entry=0x8eb288,
    suppliedvars=<optimized out>, unpromise=unpromise using entry=TRUE) at eval.c:2311
#62 0x00007ffff7cb13ac in Rf_applyClosure (unpromise=TRUE, suppliedvars=<optimized out>, rho=0x8eb288, arglist=<optimized out>, op=0x7e0b70, call=0x78a960)
    at eval.c:2333
#63 Rf_eval (e=0x78a960, rho=rho using entry=0x8eb288) at eval.c:1285
#64 0x00007ffff7cb6322 in do_set (call=0x78a8b8, op=0x421338, args=0x78a8f0, rho=0x8eb288) at ../../src/include/Rinlinedfuns.h:90
#65 0x00007ffff7cb16b6 in Rf_eval (e=0x78a8b8, rho=rho using entry=0x8eb288) at eval.c:1237
#66 0x00007ffff7cb4e68 in do_begin (call=0x78a880, op=0x42c4a0, args=0x78a848, rho=0x8eb288) at ../../src/include/Rinlinedfuns.h:90
#67 0x00007ffff7cb16b6 in Rf_eval (e=e using entry=0x78a880, rho=rho using entry=0x8eb288) at eval.c:1237
#68 0x00007ffff7cb92ac in do_for (call=<optimized out>, op=<optimized out>, args=<optimized out>, rho=<optimized out>) at eval.c:2892
#69 0x00007ffff7cb16b6 in Rf_eval (e=0x78a068, rho=rho using entry=0x8eb288) at eval.c:1237
#70 0x00007ffff7cb4e68 in do_begin (call=0x78a030, op=0x42c4a0, args=0x789ff8, rho=0x8eb288) at ../../src/include/Rinlinedfuns.h:90
#71 0x00007ffff7cb16b6 in Rf_eval (e=e using entry=0x78a030, rho=rho using entry=0x8eb288) at eval.c:1237
#72 0x00007ffff7cb330f in R_execClosure (call=call using entry=0x8eb330, newrho=newrho using entry=0x8eb288, sysparent=<optimized out>, rho=rho using entry=0x45a518,
    arglist=arglist using entry=0x423210, op=op using entry=0x789e38) at eval.c:2398
#73 0x00007ffff7cb40f7 in applyClosure_core (call=call using entry=0x8eb330, op=op using entry=0x789e38, arglist=0x423210, rho=rho using entry=0x45a518,
--Type <RET> for more, q to quit, c to continue without paging--
    suppliedvars=<optimized out>, unpromise=unpromise using entry=TRUE) at eval.c:2311
#74 0x00007ffff7cb13ac in Rf_applyClosure (unpromise=TRUE, suppliedvars=<optimized out>, rho=0x45a518, arglist=<optimized out>, op=0x789e38, call=0x8eb330)
    at eval.c:2333
#75 Rf_eval (e=0x8eb330, rho=0x45a518) at eval.c:1285
#76 0x00007ffff7ce5a57 in setup_Rmainloop () at main.c:1166
#77 0x00007ffff7ce6ae9 in Rf_mainloop () at main.c:1222
#78 0x000000000040106b in main (ac=<optimized out>, av=<optimized out>) at Rmain.c:29



-----Original Message-----
From: Ivan Krylov <ikrylov using disroot.org> 
Sent: 08 May 2024 15:12
To: Simon Andrews via R-help <r-help using r-project.org>
Cc: Simon Andrews <simon.andrews using babraham.ac.uk>; Miguel Esteva <esteva.m using wehi.edu.au>
Subject: Re: [R] Compilation problems with R4.4.0

Dear Simon,

В Wed, 8 May 2024 10:17:41 +0000
Simon Andrews via R-help <r-help using r-project.org> пишет:

> I'm having a strange problem compiling R4.4.0 on an AlmaLinux9 box.

> make[4]: Entering directory '/bi/apps/R/R-4.4.0/src/library/grDevices'
> byte-compiling package 'grDevices'
> 
> *** caught segfault ***
> address 0x18017a8110, cause 'memory not mapped'
> 
> Traceback:
> 1: solve.default(rgb)

Miguel Esteva has recently complained about the same problem on RHEL9, but didn't provide enough details, nor was I able to reproduce it
myself: https://stat.ethz.ch/pipermail/r-help/2024-May/479288.html

Thanks for letting us know it's reproducible on AlmaLinux and telling us your compiler version!

Unfortunately, I wasn't able to reproduce the crash, neither with gcc-toolset-13, nor with the ordinary gcc & gfortran 11.4.1 20231218 (Red Hat 11.4.1-3) from the repository. I see that your compiler version is slightly different (11.4.1-2). I'm running `podman run -it --rm almalinux:9`. Would an upgrade help?

Can you run R under the debugger and obtain a backtrace? Something like the following, in the src/library/grDevices subdirectory:

_R_COMPILE_PKGS_=1 R_COMPILER_SUPPRESS_ALL=1 \  R_DEFAULT_PACKAGES=NULL LC_ALL=C \ ../../../bin/R -d gdb --vanilla --no-echo -e \  'tools:::makeLazyLoading("grDevices")'

--
Best regards,
Ivan

------------------------------------
This email has been scanned for spam & viruses. If you believe this email should have been stopped by our filters, click the following link to report it (https://portal-uk.mailanyone.net/index.html#/outer/reportspam?token=dXNlcj1zaW1vbi5hbmRyZXdzQGJhYnJhaGFtLmFjLnVrO3RzPTE3MTUxNzc1NTg7dXVpZD02NjNCODg1NTEyNjcyMzlDMjY5RkMwQTY5MUE2RDg5Njt0b2tlbj0zZjFiOWNmMGM5NTY3NjU3YjM0YmZhY2QwMTEzM2E3YmRlMDUxY2IwOw%3D%3D).



More information about the R-help mailing list