[Bioc-devel] Running vignettes one at a time works but build_vignettes causes buffer overflow

Martin Morgan mtmorg@n@b|oc @end|ng |rom gm@||@com
Tue Nov 24 17:00:14 CET 2020


same result with BiocManager::version() 3.13

From: Shraddha Pai <shraddha.pai using utoronto.ca>
Date: Tuesday, November 24, 2020 at 8:13 AM
To: Martin Morgan <mtmorgan.bioc using gmail.com>
Cc: Bioc-devel <bioc-devel using r-project.org>
Subject: Re: [Bioc-devel] Running vignettes one at a time works but build_vignettes causes buffer overflow

Hi Martin,
The issue is on the bioc-devel version, not the release version (3.12).
Shraddha

On Tue, Nov 24, 2020 at 4:06 AM Martin Morgan <mtmorgan.bioc using gmail.com<mailto:mtmorgan.bioc using gmail.com>> wrote:
Please respond on the list. After creating a new clone of your package

  git clone git using git.bioconductor.org:packages/netDx

and validating my installation

  BiocManager::version() # 3.12
  BiocManager::valid()    # TRUE

I do not see a problem

> devtools::build_vignettes()
Building netDx vignettes
…
Building vignette index
>

so can’t really help further…?

From: Shraddha Pai <shraddha.pai using utoronto.ca<mailto:shraddha.pai using utoronto.ca>>
Date: Monday, November 23, 2020 at 12:14 PM
To: Martin Morgan <mtmorgan.bioc using gmail.com<mailto:mtmorgan.bioc using gmail.com>>
Subject: Re: [Bioc-devel] Running vignettes one at a time works but build_vignettes causes buffer overflow

Hi Martin,
Thanks for responding. Sorry, left out the package name(!).
This is netDx, v 1.3.1, currently the version in bioc-devel.

I have tried opening a single session, and then running
> rmarkdown::render("vignette1.rmd")
> rmarkdown::render("vignette2.rmd")
> rmarkdown::render("vignette3.rmd")

This works.  But if I call
> devtools::build_vignettes()
I get the buffer overflow error.

I expect that if I use gdb and then run one vignette at a time, I may not get an error message.
But let me try running gdb and then calling devtools::build_vignettes(), see if that turns up something.

If it helps, this only started after I switched using rJava to make java calls, instead of using system2(). I have tried looking to see if I need to empty some kind of buffer at the end of all java operations for a given vignette (maybe they build up over time?) but a quick Google search hasn't turned up anything.

Aside from the gdb tool, I basically don't know how to debug the problem.  Any other thoughts would be great.

Thanks,Shraddha


On Mon, Nov 23, 2020 at 11:59 AM Martin Morgan <mtmorgan.bioc using gmail.com<mailto:mtmorgan.bioc using gmail.com>> wrote:
It would really help (maybe this has been mentioned before, but I'm not very good at remembering things) to indicate what package this is!

When R installs a package, it (probably this is not the right thing to do) builds all vignettes in the same session. Maybe devtools does this too? You could work toward debugging by creating the source code of each vignette using tools::Stangle() or knitr::purl(), then starting a new, clean, R session and source()ing the first, second... vignettes. Basically the goal is to simplify the problem so that it can be reproduced in a single R session, and perhaps even further...

Buffer overflow is a C-level problem, e.g., copying too many characters into a buffer. If I were trying to debug this I'd brush up on my gdb / lldb skills and try to reproduce this with something like

  $ R -d gdb
  gdb> run
  > source("vig1.R")
  > source("vig2.R")
  ...

If this triggers the error, you'd find yourself at the gdb prompt, and you could use `up` to navigate the stack until the location of the buffer overflow (in your code) is found...

If you provide more information, especially an easily reproducible example, I can try to provide more specific advice.

Martin

On 11/23/20, 11:39 AM, "Bioc-devel on behalf of Shraddha Pai" <bioc-devel-bounces using r-project.org<mailto:bioc-devel-bounces using r-project.org> on behalf of shraddha.pai using utoronto.ca<mailto:shraddha.pai using utoronto.ca>> wrote:

    Hello BioC community,
    Still haven't figured out why I get a buffer_overflow_detected error when I
    build vignettes for our package netDx.

    I find that running "devtools::build_vignetttes()" causes a "*** buffer
    overflow detected ***" error after the first vignette has been built and
    the second is just named.
    But running the vignettes one at a time leads to them all running smoothing.

    Any thoughts as to what could be causing the problem would be appreciated.

    Thanks,Shraddha

    --
    Shraddha Pai, PhD
    http://shraddhapai.com ; @spaiglass on Twitter
    Post-doctoral Fellow, http://baderlab.org
    The Donnelly Centre for Cellular and Biomolecular Research
    University of Toronto

        [[alternative HTML version deleted]]

    _______________________________________________
    Bioc-devel using r-project.org<mailto:Bioc-devel using r-project.org> mailing list
    https://stat.ethz.ch/mailman/listinfo/bioc-devel

	[[alternative HTML version deleted]]



More information about the Bioc-devel mailing list