Joseph Mingrone
2017-Jul-31 22:38 UTC
[Rd] reproducible segmentation fault installing packages on FreeBSD 11.1
Hi, This happens when attempting to install any package. There were no such problems on 11.0. Some other ways to trigger the problem: curlGetHeaders("http://bugs.r-project.org") There are no problems with the first two calls, but then the crash always happens on the third call. tf <- tempfile() download.file("http://cran.r-project.org/",tf,method="libcurl") This one is ok for the first five calls, but always crashes on the sixth call. download.file("http://cran.r-project.org/",tf,method="internal") does not trigger the issue. Is there any further information I can provide or anything else I can test? Joseph jrm at phe ~ % R --debugger=gdb GNU gdb (GDB) 8.0 [GDB v8.0 for FreeBSD] Copyright (C) 2017 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-portbld-freebsd11.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://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 /usr/local/lib/R/bin/exec/R...(no debugging symbols found)...done. (gdb) r Starting program: /usr/local/lib/R/bin/exec/R R version 3.4.1 (2017-06-30) -- "Single Candle" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: amd64-portbld-freebsd11.1 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.> install.packages("ggplot2")Installing package into ?/usr/home/jrm/.R/amd64-portbld-freebsd11.1-library/3.4? (as ?lib? is unspecified) --- Please select a CRAN mirror for use in this session --- [New LWP 100239 of process 56011] [LWP 100239 of process 56011 exited] --- snip --- Selection: 1 [New LWP 100265 of process 56011] [LWP 100265 of process 56011 exited] also installing the dependencies ?stringi?, ?magrittr?, ?colorspace?, ?Rcpp?, ?stringr?, ?RColorBrewer?, ?dichromat?, ?munsell?, ?labeling?, ?rlang?, ?digest?, ?gtable?, ?plyr?, ?reshape2?, ?scales?, ?tibble?, ?lazyeval? trying URL 'https://cloud.r-project.org/src/contrib/stringi_1.1.5.tar.gz' [New LWP 100267 of process 56011] [LWP 100267 of process 56011 exited] Content type 'application/x-gzip' length 3645872 bytes (3.5 MB) =================================================downloaded 3.5 MB trying URL 'https://cloud.r-project.org/src/contrib/magrittr_1.5.tar.gz' [New LWP 100844 of process 56011] [LWP 100844 of process 56011 exited] Content type 'application/x-gzip' length 200504 bytes (195 KB) =================================================downloaded 195 KB trying URL 'https://cloud.r-project.org/src/contrib/colorspace_1.3-2.tar.gz' [New LWP 100161 of process 56011] [LWP 100161 of process 56011 exited] Content type 'application/x-gzip' length 293433 bytes (286 KB) =================================================downloaded 286 KB trying URL 'https://cloud.r-project.org/src/contrib/Rcpp_0.12.12.tar.gz' [New LWP 100854 of process 56011] Thread 7 received signal SIGSEGV, Segmentation fault. [Switching to LWP 100854 of process 56011] uw_frame_state_for (context=context at entry=0x7fffdfffde20, fs=fs at entry=0x7fffdfffdb70) at /usr/ports/lang/gcc5/work/gcc-5.4.0/libgcc/unwind-dw2.c:1249 1249 return MD_FALLBACK_FRAME_STATE_FOR (context, fs); -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 962 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20170731/e5a14214/attachment.sig>
Dirk Eddelbuettel
2017-Aug-01 14:55 UTC
[Rd] reproducible segmentation fault installing packages on FreeBSD 11.1
On 31 July 2017 at 19:38, Joseph Mingrone wrote: | This happens when attempting to install any package. There were no such | problems on 11.0. | | Some other ways to trigger the problem: [...] | trying URL 'https://cloud.r-project.org/src/contrib/Rcpp_0.12.12.tar.gz' | [New LWP 100854 of process 56011] | | Thread 7 received signal SIGSEGV, Segmentation fault. | [Switching to LWP 100854 of process 56011] | uw_frame_state_for (context=context at entry=0x7fffdfffde20, fs=fs at entry=0x7fffdfffdb70) | at /usr/ports/lang/gcc5/work/gcc-5.4.0/libgcc/unwind-dw2.c:1249 | 1249 return MD_FALLBACK_FRAME_STATE_FOR (context, fs); Looks like a gcc error to me. Rcpp itself is pretty widely used and tested and I am not aware of it having issue per se on any of the *BSDs. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Joseph Mingrone
2017-Aug-01 17:09 UTC
[Rd] reproducible segmentation fault installing packages on FreeBSD 11.1
Dirk Eddelbuettel <edd at debian.org> writes:> On 31 July 2017 at 19:38, Joseph Mingrone wrote: > | This happens when attempting to install any package. There were no such > | problems on 11.0. > | > | Some other ways to trigger the problem: > [...] > | trying URL 'https://cloud.r-project.org/src/contrib/Rcpp_0.12.12.tar.gz' > | [New LWP 100854 of process 56011] > | > | Thread 7 received signal SIGSEGV, Segmentation fault. > | [Switching to LWP 100854 of process 56011] > | uw_frame_state_for (context=context at entry=0x7fffdfffde20, fs=fs at entry=0x7fffdfffdb70) > | at /usr/ports/lang/gcc5/work/gcc-5.4.0/libgcc/unwind-dw2.c:1249 > | 1249 return MD_FALLBACK_FRAME_STATE_FOR (context, fs);> Looks like a gcc error to me. Rcpp itself is pretty widely used and tested > and I am not aware of it having issue per se on any of the *BSDs.The problem isn't specific to any package or packages in general, but seems related to libcurl and/or gfortran. The third call to CURLcode ret = curl_easy_perform(hnd); in in_do_curlGetHeaders() from src/modules/internet/libcurl.c triggers the problem _unless_ R is built with flang instead of gfortran. For FreeBSD 11.1 R users, there are two workarounds [1]. 1) Build the FreeBSD R package with the FLANG option instead of GFORTRAN. FLANG may be the default soon. 2) Add options(download.file.method="wget") to ~/.Rprofile with a newline after it. Ensure ftp/wget is installed, because it is not pulled in by math/R. Joseph [1] Both these workarounds prevent a predictable crash, but have only been lightly tested. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 962 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20170801/ad211bef/attachment.sig>
Joseph Mingrone
2017-Aug-01 17:12 UTC
[Rd] reproducible segmentation fault installing packages on FreeBSD 11.1
For anyone interested, here is the FreeBSD bug report. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221127 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 962 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20170801/bea861c5/attachment.sig>