[Rd] R CMD check . segfault on re-building vignettes

From: Sebastian Meyer <Sebastian.Meyer_at_ifspm.uzh.ch>
Date: Mon, 30 Apr 2012 17:48:38 +0200

(Warning: There is some potential that this message is redundant.)

I think that i have spotted an issue with R CMD check that does not trace back to a rare case, so it must have been reported already or i am doing something stupid. However, to be sure and because I did not find any comments on this while searching the R mailing lists, here is what i did:
  R CMD check .
from within a package source directory which has some vignettes in inst/doc. When the check finally comes to
"checking re-building of vignette PDFs ..."
i get the following error


  1. file.copy(pkgdir, vd2, recursive = TRUE)
  2. run_vignettes(desc)
  3. check_pkg(pkgdir, pkgname, pkgoutdir, startdir, libdir, desc, is_base_pkg, is_rec_pkg, thispkg_subdirs, extra_arch)
  4. tools:::.check_packages() aborting ... Segmentation fault (core dumped)

as one can see, the error stems from the call file.copy(pkgdir, vd2, recursive = TRUE) in the run_vignettes function defined in the tools:::.check_packages function. this call will copy the contents of "pkgdir" (the source directory) to the ..Rcheck/vign_test/ directory _recursively_, the problem of which being that the "..Rcheck" directory is part of
"pkgdir". Thus we get into a loop of copying pkgdir into
pkgdir/..Rcheck/vign_test, which is interrupted at some point by a segfault (at least on my x86_64 GNU/Linux machine running Ubuntu 12.04 and R 2.15.0; the OS might be crucial for this issue).

I can reproduce the error by e.g.:

  pkgdir <- tempdir()
  file.create(file.path(pkgdir,"DESCRIPTION")) # not necessary   vd2 <- file.path(pkgdir,"..Rcheck/vign_test")   dir.create(vd2, recursive=TRUE)

  ### Better Do NOT run -> buffer overflow
  # file.copy(pkgdir, vd2, recursive=TRUE)

Can anybody confirm this problem? Of course, a workaround is to run R CMD check from outside the source directory (which is probably the preferred way).

Thanks in advance,

Sebastian Meyer
Division of Biostatistics
Institute of Social and Preventive Medicine
University of Zurich

R-devel_at_r-project.org mailing list
Received on Mon 30 Apr 2012 - 15:55:23 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 01 May 2012 - 00:20:53 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive