Comments (3)
If you're interested, here's what went on when I was attempting to find a memory leak in my own code: grunwaldlab/poppr#40
I also have a build of R-devel with valgrind enabled: https://github.com/grunwaldlab/poppr/wiki/R-CMD-check-with-docker-rocker
My experience installing R with valgrind has been frustrating, even on Ubuntu. Docker can still be frustrating, but it's not as frustrating as trying to compile R from source.
from vcfr.
Valgrind reports:
vcf functions: ......................==18546== Conditional jump or move depends on uninitialised value(s)
==18546== at 0x30750046DC: deflate (in /usr/lib64/libz.so.1.2.8)
==18546== by 0x307500DDFC: ??? (in /usr/lib64/libz.so.1.2.8)
==18546== by 0x307500E685: gzclose_w (in /usr/lib64/libz.so.1.2.8)
==18546== by 0x1139582A: write_vcf_body(Rcpp::Matrix<16, Rcpp::PreserveStorage>, Rcpp::Matrix<16, Rcpp::PreserveStorage>, std::string, int) (packages/tests-vg/vcfR/src/vcf_io.cpp:555)
==18546== by 0x11374EB8: vcfR_write_vcf_body (packages/tests-vg/vcfR/src/RcppExports.cpp:263)
==18546== by 0x47AFAD: do_dotcall (svn/R-devel/src/main/dotcode.c:1252)
==18546== by 0x4B1039: Rf_eval (svn/R-devel/src/main/eval.c:713)
==18546== by 0x4B446D: do_set (svn/R-devel/src/main/eval.c:2211)
==18546== by 0x4B0E90: Rf_eval (svn/R-devel/src/main/eval.c:685)
==18546== by 0x4B3418: do_begin (svn/R-devel/src/main/eval.c:1821)
==18546== by 0x4B0E90: Rf_eval (svn/R-devel/src/main/eval.c:685)
==18546== by 0x4B0E90: Rf_eval (svn/R-devel/src/main/eval.c:685)
==18546== Uninitialised value was created by a heap allocation
==18546== at 0x4A06C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18546== by 0x307500CA69: ??? (in /usr/lib64/libz.so.1.2.8)
==18546== by 0x113952B9: write_vcf_body(Rcpp::Matrix<16, Rcpp::PreserveStorage>, Rcpp::Matrix<16, Rcpp::PreserveStorage>, std::string, int) (packages/tests-vg/vcfR/src/vcf_io.cpp:520)
==18546== by 0x11374EB8: vcfR_write_vcf_body (packages/tests-vg/vcfR/src/RcppExports.cpp:263)
==18546== by 0x47AFAD: do_dotcall (svn/R-devel/src/main/dotcode.c:1252)
==18546== by 0x4B1039: Rf_eval (svn/R-devel/src/main/eval.c:713)
==18546== by 0x4B446D: do_set (svn/R-devel/src/main/eval.c:2211)
==18546== by 0x4B0E90: Rf_eval (svn/R-devel/src/main/eval.c:685)
==18546== by 0x4B3418: do_begin (svn/R-devel/src/main/eval.c:1821)
==18546== by 0x4B0E90: Rf_eval (svn/R-devel/src/main/eval.c:685)
==18546== by 0x4B0E90: Rf_eval (svn/R-devel/src/main/eval.c:685)
==18546== by 0x4B3418: do_begin (svn/R-devel/src/main/eval.c:1821)
==18546==
==18546== Conditional jump or move depends on uninitialised value(s)
==18546== at 0x30750046DC: deflate (in /usr/lib64/libz.so.1.2.8)
==18546== by 0x307500DE56: ??? (in /usr/lib64/libz.so.1.2.8)
==18546== by 0x307500E685: gzclose_w (in /usr/lib64/libz.so.1.2.8)
==18546== by 0x1139582A: write_vcf_body(Rcpp::Matrix<16, Rcpp::PreserveStorage>, Rcpp::Matrix<16, Rcpp::PreserveStorage>, std::string, int) (packages/tests-vg/vcfR/src/vcf_io.cpp:555)
==18546== by 0x11374EB8: vcfR_write_vcf_body (packages/tests-vg/vcfR/src/RcppExports.cpp:263)
==18546== by 0x47AFAD: do_dotcall (svn/R-devel/src/main/dotcode.c:1252)
==18546== by 0x4B1039: Rf_eval (svn/R-devel/src/main/eval.c:713)
==18546== by 0x4B446D: do_set (svn/R-devel/src/main/eval.c:2211)
==18546== by 0x4B0E90: Rf_eval (svn/R-devel/src/main/eval.c:685)
==18546== by 0x4B3418: do_begin (svn/R-devel/src/main/eval.c:1821)
==18546== by 0x4B0E90: Rf_eval (svn/R-devel/src/main/eval.c:685)
==18546== by 0x4B0E90: Rf_eval (svn/R-devel/src/main/eval.c:685)
==18546== Uninitialised value was created by a heap allocation
==18546== at 0x4A06C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18546== by 0x307500CA69: ??? (in /usr/lib64/libz.so.1.2.8)
==18546== by 0x113952B9: write_vcf_body(Rcpp::Matrix<16, Rcpp::PreserveStorage>, Rcpp::Matrix<16, Rcpp::PreserveStorage>, std::string, int) (packages/tests-vg/vcfR/src/vcf_io.cpp:520)
==18546== by 0x11374EB8: vcfR_write_vcf_body (packages/tests-vg/vcfR/src/RcppExports.cpp:263)
==18546== by 0x47AFAD: do_dotcall (svn/R-devel/src/main/dotcode.c:1252)
==18546== by 0x4B1039: Rf_eval (svn/R-devel/src/main/eval.c:713)
==18546== by 0x4B446D: do_set (svn/R-devel/src/main/eval.c:2211)
==18546== by 0x4B0E90: Rf_eval (svn/R-devel/src/main/eval.c:685)
==18546== by 0x4B3418: do_begin (svn/R-devel/src/main/eval.c:1821)
==18546== by 0x4B0E90: Rf_eval (svn/R-devel/src/main/eval.c:685)
==18546== by 0x4B0E90: Rf_eval (svn/R-devel/src/main/eval.c:685)
==18546== by 0x4B3418: do_begin (svn/R-devel/src/main/eval.c:1821)
==18546==
When you look at lines 520 and 555 in the code, you see a gzFile being created. I notice that there's another gzFile opened here: https://github.com/knausb/vcfR/blob/v1.2.0/src/vcf_io.cpp#L47, but it's being initialized before gzopen is being called.
I wonder if this could be fixed by separating the declaration from the function:
gzFile fi;
fi = gzopen( filename.c_str(), "ab" );
from vcfr.
I think I addressed this a while ago. Thanks @zkamvar for your help and ideas! I'm slowly becoming better with Docker.
from vcfr.
Related Issues (20)
- Variants with MAF of 0 after removing monomorphics HOT 6
- Error: ID column contains non-unique names HOT 1
- How can I add population information to genind converted using vcfR2genind? HOT 2
- RStudio Session aborted when writing VCF
- vcfR not recognizing all chromosomes HOT 2
- Heterozygous SNP calling HOT 15
- read.vcfR() coredump with empty lines in input HOT 5
- Rename Genotype information HOT 2
- vcfR2tidy can't handle files with empty INFO HOT 4
- gene/chromosome annotation HOT 2
- write.vcf() not filtering variants HOT 2
- Filtering for minor allele Frequency HOT 4
- Assign_Indiv_by_Geno.R function of Demuxafy.sif problems with the vcf HOT 1
- chromR object not finding DP and MQ values HOT 2
- read.vcfR() not recognizing missing data HOT 3
- extract.gt() missing heterozygotes HOT 1
- compilation issue HOT 2
- Hide a panel from chromoqc or plot HOT 2
- vcfR Subsetting to the first chromosome HOT 1
- change genotype(change gap to NA) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vcfr.