[Bioc-devel] Ask for help to debug the error on riesling1
Jianhong Ou, Ph.D.
j|@nhong@ou @end|ng |rom duke@edu
Thu Apr 8 01:39:09 CEST 2021
Hi Martin,
Thank you for going so deep. I tried
R -d "valgrind --leak-check=full --track-origins=yes" -f plotInteractionData.R
to locate the exact line where initialed the possible leak.
Is there any other possibility that killed the process and did not leave any error log information?
Jianhong.
________________________________
From: Martin Morgan <mtmorgan.bioc using gmail.com>
Sent: Wednesday, April 7, 2021 2:16 PM
To: Jianhong Ou, Ph.D. <jianhong.ou using duke.edu>; Hervé Pagès <hpages.on.github using gmail.com>; bioc-devel using r-project.org <bioc-devel using r-project.org>
Subject: Re: [Bioc-devel] Ask for help to debug the error on riesling1
I followed these steps, more or less, to configure and use valgrind on the Bioconductor docker image.
https://urldefense.com/v3/__https://gist.github.com/mtmorgan/77f9d92d81830eeb7f254809b445874d__;!!OToaGQ!-g840WABoFzxZ4_VS8wWp_YSW6KeHVFxX66mQcS2nGxeHwk8XlzjCnonGt7rnWeMU0g$
For this particular use I
- added the valgrind system dependency
- installed trackViewer and it's 'Suggests' dependencies in a standard R session
- made a git clone --depth 1 https://urldefense.com/v3/__https://git.bioconductor.org/packages/trackViewer__;!!OToaGQ!-g840WABoFzxZ4_VS8wWp_YSW6KeHVFxX66mQcS2nGxeHwk8XlzjCnonGt7rzc3RP4s$
- made an R script from the vignette via cd vignettes && R CMD Stangle...
- ran once with
root using 8dd16a8006a1:/tmp/trackViewer/vignettes# R -f plotInteractionData.R
as a sanity check, then
root using 8dd16a8006a1:/tmp/trackViewer/vignettes# R -d valgrind -f plotInteractionData.R
This lead to a single suspicious valgrind message
> importGInteractions(file=hic, format="hic",
+ ranges=GRanges("22", IRanges(50000000, 100000000)),
+ out = "GInteractions")
==29679== Conditional jump or move depends on uninitialised value(s)
==29679== at 0x48428EC: memset (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==29679== by 0x212D08FF: memset (string_fortified.h:71)
==29679== by 0x212D08FF: select_hits (Hits_class.c:324)
==29679== by 0x4944EB3: R_doDotCall (dotcode.c:614)
==29679== by 0x4945464: do_dotcall (dotcode.c:1281)
==29679== by 0x498AC35: bcEval (eval.c:7072)
==29679== by 0x4999DA7: Rf_eval (eval.c:727)
==29679== by 0x499BBDE: R_execClosure (eval.c:1897)
==29679== by 0x499CAD1: Rf_applyClosure (eval.c:1823)
==29679== by 0x4987DBD: bcEval (eval.c:7083)
==29679== by 0x4999DA7: Rf_eval (eval.c:727)
==29679== by 0x499BBDE: R_execClosure (eval.c:1897)
==29679== by 0x499CAD1: Rf_applyClosure (eval.c:1823)
==29679==
Hits_class.c:324 is in S4Vectors
if (nodup0) {
is_used = _new_CharAE(get_nnode(nRnode, "R"));
memset(is_used->elts, 0, is_used->_buflength);
}
I re-ran under gdb
root using 8dd16a8006a1:/tmp/trackViewer/vignettes# R -d valgrind -f plotInteractionData.R
...
(gdb) break Hits_class.c:324
(gdb) run
...
(gdb) continue
...
> importGInteractions(file=hic, format="hic",
+ ranges=GRanges("22", IRanges(50000000, 100000000)),
+ out = "GInteractions")
Thread 1 "R" hit Breakpoint 1, select_hits (from=<optimized out>,
to=<optimized out>, nLnode=<optimized out>, nRnode=0x56071b51d5e8,
select=<optimized out>, nodup=<optimized out>) at Hits_class.c:327
327 in Hits_class.c
(gdb) p *is_used
$2 = {_buflength = 0, _nelt = 0, elts = 0x0}
I guess the complaint is about elts = 0x0, but I'm not really sure if this is enough to cause a fault during package build -- it seems like the code writes nothing nowhere, but ...
Martin Morgan
On 4/7/21, 8:08 AM, "Bioc-devel on behalf of Jianhong Ou, Ph.D." <bioc-devel-bounces using r-project.org on behalf of jianhong.ou using duke.edu> wrote:
Hi Herv�,
Thank you for the information. I will try to figure out.
Jianhong.
________________________________
From: Herv� Pag�s <hpages.on.github using gmail.com>
Sent: Wednesday, April 7, 2021 1:54 AM
To: Jianhong Ou, Ph.D. <jianhong.ou using duke.edu>; bioc-devel using r-project.org <bioc-devel using r-project.org>
Subject: Re: [Bioc-devel] Ask for help to debug the error on riesling1
Hi Jianhong,
Memory leaks and other memory errors are bugs in native code that often
exist on all platforms but typically manifest themselves in different
ways depending on the platform where it runs. Running your code thru a
tool like Valgrind should reveal these problems even if you do this on a
non-Windows machine. See
https://urldefense.com/v3/__https://bioconductor.org/developers/how-to/c-debugging/__;!!OToaGQ!6X7J1i17XSPaKkNmZMcdEY24rEjchLfeQ8YTdhLB68dZII3WDxYfoPTTpGr2AOjQ4ds$
for more information.
Best,
H.
On 4/6/21 6:46 AM, Jianhong Ou, Ph.D. wrote:
> Hi,
>
> The trackViewer package got error on Windows Server since version 1.27.4. I am totally lost to figure it out by myself. The current error message listed in building system is:
>
>
> * creating vignettes ... ERROR
> --- re-building 'changeTracksStyles.Rmd' using rmarkdown
> --- finished re-building 'changeTracksStyles.Rmd'
>
> --- re-building 'dandelionPlot.Rmd' using rmarkdown
> --- finished re-building 'dandelionPlot.Rmd'
>
> --- re-building 'lollipopPlot.Rmd' using rmarkdown
> --- finished re-building 'lollipopPlot.Rmd'
>
> --- re-building 'plotInteractionData.Rmd' using rmarkdown
>
> I suppose this is a memory leak error. But I don't have windows server to repeat the error. What is the best way to fix the issue? Thank you in advance for your help.
>
>
> Yours Sincerely,
>
> Jianhong Ou
>
> Email: jianhong.ou using duke.edu
> Bioinformatician II
> Department of Cell Biology
> Duke University School of Medicine
> Durham, NC, 27710
>
> Confidentiality Notice:\ This e-mail message, including ...{{dropped:12}}
>
> _______________________________________________
> Bioc-devel using r-project.org mailing list
> https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/bioc-devel__;!!OToaGQ!6X7J1i17XSPaKkNmZMcdEY24rEjchLfeQ8YTdhLB68dZII3WDxYfoPTTpGr2_rFwouU$
>
--
Herv� Pag�s
Bioconductor Core Team
hpages.on.github using gmail.com
[[alternative HTML version deleted]]
[[alternative HTML version deleted]]
More information about the Bioc-devel
mailing list