Bug#947001: Bug#947004: S4Vectors Segmentation fault after r-base-core update (Was: Bug#947004: Tests segfaults (since the r-base-core update?))
AFAIK the only standard way to run tests is by sourcing whatever files are in the tests/ folder of a package. This is actually what 'R CMD check' does to run the tests. When you use the following commands ``` require("S4Vectors") S4Vectors:::.test() ``` or ``` BiocGenerics:::testPackage("S4Vectors") ``` in your build system scripts, you're using the commands contained in the files found in the tests/ folder and **hardcoding** them in your scripts. This is fragile because the content of these files could change anytime (and will very likely change in the near future e.g. when S4Vectors or other packages with RUnit-based tests switch to testthat-based tests). OTOH when you source the files in the tests/ folder you remain agnostic of the exact commands that are used to run the tests. This is robust. Back to the segfault issue. The fact that it goes away when replacing require("S4Vectors"); S4Vectors:::.test() with BiocGenerics:::testPackage("S4Vectors") sounds like luck, that's all there is to it. And you didn't get such luck when doing the same for IRanges. It's worrying that a "fix" for a serious issue like a segfault relies on luck. In other words, someone should take the time to go to the bottom of this issue so we **really** understand what's going on. Thanks, H.
Bug#947001: Bug#947004: S4Vectors Segmentation fault after r-base-core update (Was: Bug#947004: Tests segfaults (since the r-base-core update?))
On Sat, Jan 11, 2020 at 10:12:48AM +0100, Dylan Aïssi wrote: > Le ven. 10 janv. 2020 à 00:30, Pages, Herve a écrit : > > Based on the traceback the error happens during evaluation of the 1st > > argument ('target') passed to checkEqualsNumeric(), that is, during > > evaluation of 'runmed(y, 7)'. Since this involves base R code only > > (runmed() is implemented in the stats package) I would say that it's not > > immediately obvious that the problem is in my court. > > Thanks Hervé for this. +1 > I just updated how to run Debian autopkgtests [1-2] by replacing: > > > LC_ALL=C R --no-save < > require("S4Vectors") > > S4Vectors:::.test() > > EOT > > with > > > LC_ALL=C.UTF-8 R --no-save -e 'BiocGenerics:::testPackage("S4Vectors")' > > which seems to be the recommended way to run tests for bioconductor > packages. And now, there is no segfault anymore for S4vectors but > IRanges is still crashing. Should we upload these fixes into > Debian/unstable? Thanks for the fix - IMHO it makes sense to upload in any way if we are doing something differently than it should be done. Would you mind checking other BioConductor packages as well? Kind regards and thanks for your investigation Andreas. > [1] > https://salsa.debian.org/r-pkg-team/r-bioc-s4vectors/commit/51b8ca2571dac1685e748679568edf4463cbfd59 > [2] > https://salsa.debian.org/r-pkg-team/r-bioc-iranges/commit/06a76a22fa236f919fc0038c5c01aec35ec2ecda > [3] > https://bioconductor.org/developers/how-to/unitTesting-guidelines/#RUnitConventions -- http://fam-tille.de
Bug#947001: Bug#947004: S4Vectors Segmentation fault after r-base-core update (Was: Bug#947004: Tests segfaults (since the r-base-core update?))
Hi, Le ven. 10 janv. 2020 à 00:30, Pages, Herve a écrit : > Based on the traceback the error happens during evaluation of the 1st > argument ('target') passed to checkEqualsNumeric(), that is, during > evaluation of 'runmed(y, 7)'. Since this involves base R code only > (runmed() is implemented in the stats package) I would say that it's not > immediately obvious that the problem is in my court. Thanks Hervé for this. I just updated how to run Debian autopkgtests [1-2] by replacing: > LC_ALL=C R --no-save < require("S4Vectors") > S4Vectors:::.test() > EOT with > LC_ALL=C.UTF-8 R --no-save -e 'BiocGenerics:::testPackage("S4Vectors")' which seems to be the recommended way to run tests for bioconductor packages. And now, there is no segfault anymore for S4vectors but IRanges is still crashing. Should we upload these fixes into Debian/unstable? Best, Dylan [1] https://salsa.debian.org/r-pkg-team/r-bioc-s4vectors/commit/51b8ca2571dac1685e748679568edf4463cbfd59 [2] https://salsa.debian.org/r-pkg-team/r-bioc-iranges/commit/06a76a22fa236f919fc0038c5c01aec35ec2ecda [3] https://bioconductor.org/developers/how-to/unitTesting-guidelines/#RUnitConventions