Ensembl / Bio-DB-HTS

Git repo for Bio::DB::HTS module on CPAN, providing Perl links into HTSlib
Apache License 2.0
24 stars 16 forks source link

Problems when installing Bio::DB::HTS, possibly due to memory leak #82

Closed AndreVidas closed 5 years ago

AndreVidas commented 5 years ago

Hi Ensembl team.

I'm trying to install Bio::DB::HTS, but I get the following error during the installation:

sudo cpanm Bio::DB::HTS Password: --> Working on Bio::DB::HTS Fetching http://www.cpan.org/authors/id/A/AV/AVULLO/Bio-DB-HTS-2.11.tar.gz ... OK Configuring Bio-DB-HTS-2.11 ... OK

Broadcast Message from _distnote@SUND33194
(no tty) at 15:41 CET...

perl(90621,0x11b35c5c0) malloc: *** error for object 0x7fe849915dd0: pointer be ing realloc'd was not allocated
FAIL ! Installing Bio::DB::HTS failed. See /Users/gdn417/.cpanm/work/1550673676.90567/build.log for details. Retry with --force to force install it.

Broadcast Message from _distnote@SUND33194
(no tty) at 15:41 CET...

perl(90627,0x1103895c0) malloc: *** error for object 0x7fca65d00840: pointer be ing realloc'd was not allocated
SUND33194:bin gdn417$ cpan -D Bio Reading '/Users/gdn417/.cpan/Metadata' Database was generated on Tue, 19 Feb 2019 23:17:03 GMT Can't call method "userid" on an undefined value at /System/Library/Perl/5.18/App/Cpan.pm line 1146. SUND33194:bin gdn417$ cpan -D Bio/DB/HTS Reading '/Users/gdn417/.cpan/Metadata' Database was generated on Tue, 19 Feb 2019 23:17:03 GMT Can't call method "userid" on an undefined value at /System/Library/Perl/5.18/App/Cpan.pm line 1146. SUND33194:bin gdn417$ cpan -D Bio/DB/HTS.pm Reading '/Users/gdn417/.cpan/Metadata' Database was generated on Tue, 19 Feb 2019 23:17:03 GMT Can't call method "userid" on an undefined value at /System/Library/Perl/5.18/App/Cpan.pm line 1146. SUND33194:bin gdn417$ cpan -D HEJ Reading '/Users/gdn417/.cpan/Metadata' Database was generated on Tue, 19 Feb 2019 23:17:03 GMT Can't call method "userid" on an undefined value at /System/Library/Perl/5.18/App/Cpan.pm line 1146.

installedModules.txt

Do you have any idea of why this is happening? From what I could read from other posts on stackoverflow etc. this might have something to do with memory leak in C.

I have attached a list of my installed modules.

Best, André

avullo commented 5 years ago

Hi,

can you please inspect the build.log in search for a more informative and verbose error message? Otherwise it's difficult to generate hypotheses.

Also, what's the platform/perl you're using?

cheers,

Alessandro

AndreVidas commented 5 years ago

Hi again,

Sorry for my bad Perl knowledge.

Here is the build.log. build.log

I'm using Perl v5.18.2 on a Mac OS Mojave 10.14.

Best, André

avullo commented 5 years ago

Not a problem!

I see you're using a multi-threaded version of perl. It would be interesting to compare the behavior with a single threaded version. Are you able to install alternative perl versions, e.g. using perlbrew?

Thanks,

Alessandro

tjparnell commented 5 years ago

Apologies for jumping in, but I wanted to chime in with my observations. I've repeatedly seen this on macOS, and it's been on my to do list to file a bug request. I've tested with several perlbrew-installed perl and HTSlib versions. I haven't tested every HTSlib and Perl version combination, but the failures are quite consistent. This is on macOS Mojave (10.14.3). It always fails 130/177 tests on t/05.vcf. Here's the crash message. perl(54836,0x11037f5c0) malloc: *** error for object 0x7fd123633590: pointer being realloc'd was not allocated perl(54836,0x11037f5c0) malloc: *** set a breakpoint in malloc_error_break to debug Abort trap: 6

I wonder if this is related to #76 . Interestingly, I don't seem to recall having this error with earlier versions of macOS, so I'm guessing it's something new with 10.14 (Developer tools, clang compiler, etc), but clearly independent of Perl version.

@AndreVidas , if you don't need VCF functionality, you can always force install the model by adding --force to cpanm. The Bam functionality works just fine.

jmarshall commented 5 years ago

Running perl t/05vcf.t by itself shows that 130/177 means that it's crashing after test 47, i.e., on the first test of $row->get_format($h) with only one argument.

avullo commented 5 years ago

@tjparnell thanks for the insight. I think you're right, this is likely to be related to #76 Were your tests on earlier MacOSes done with this Bio::DB::HTS version?

jmarshall commented 5 years ago

Thanks to @tjparnell's hints, I've tracked down the dangling pointer in the XS code. Fixed by PR #83, which has been tested on FreeBSD and observed to fix #76.

avullo commented 5 years ago

@AndreVidas this is now addressed thanks to @jmarshall

I will prepare a new release soon. If you need the module immediately, please feel free to install by cloning the repo and run the install script with suitable options.

AndreVidas commented 5 years ago

Al right sounds good.

Thanks for the quick response!

Best, André

avullo commented 5 years ago

@AndreVidas you're welcome :+1: