Pindel segmentation fault in GetRealStart4Deletion
1
0
Entering edit mode
10.4 years ago
Wai Yi Leung ▴ 60

Dear Kai,

I found a possible bug in one of the functions: GetRealStart4Deletion.

See a fragment from gdb:

There are 0 split-reads mapped by aligner.
report closeMappedReads
search far ends
Far end searching completed for this window.
update FarFragName
update FarFragName done
save interchromsome SR
Searching and reporting variations
Reads already used: 0
Far ends already mapped 17555
Checksum of far ends: 312599851
Searching some type of variant, replace this with the correct name in child class ...

Program received signal SIGSEGV, Segmentation fault.
GetRealStart4Deletion (TheInput=..., RealStart=@0x7fffffffbea0: 16535, RealEnd=@0x7fffffffbea8: 22020693) at pindel.cpp:2058
2058               while (TheInput[PosIndex] == TheInput[End]) {
(gdb)

The "TheInput" in the context is the human chrM with a size of 16569. I suspect the End is larger than the input itself.

I've tested versions:

0.2.4t, 0.2.4w, 0.2.5 (latest checkout from github). All of these version have the same "error".

pindel • 2.6k views
ADD COMMENT
1
Entering edit mode
10.4 years ago
liangkaiye ▴ 250

Can you check out the latest version at github, version "Pindel version 0.2.5a7, July 24 2014"? I should have removed the bug.

ADD COMMENT
0
Entering edit mode

Hello @liangkaiye. I am getting a segfault using pindel + breakdancer. All other events are output by pindel except for these:

-rw-r--r-- 1 apand2 mdclab 0 Aug 11 12:42 LB_BGI_vs_none.pindel_BP
-rw-r--r-- 1 apand2 mdclab 0 Aug 11 12:42 LB_BGI_vs_none.breakdancer.pindel.txt --> (--output_of_breakdancer_events)
-rw-r--r-- 1 apand2 mdclab 0 Aug 11 12:42 LB_BGI_vs_none.pindel_CloseEndMapped

Looking at the coredump:

Segfault happened @ 889

884     bool BDData::isBreakDancerEvent( const unsigned int leftPosition, const unsigned int rightPosition ) const
885     {
886        unsigned int rawLeftPosition = leftPosition + g_SpacerBeforeAfter;
887        unsigned int rawRightPosition = rightPosition + g_SpacerBeforeAfter;
888
889        if ( m_breakDancerMask[ rawLeftPosition - m_currentWindow.getStart() ]!=0  &&
890                       m_breakDancerMask[ rawRightPosition - m_currentWindow.getStart() ]!=0 ) {
891                     //std::cout << "Found breakdancerEvent near " << leftPosition << "-" << rightPosition << "\n";
892          
893                     return haveCommonBDEvent( m_regionsToScanCollection[ m_breakDancerMask[ rawLeftPosition - m_currentWindow.getStart() ] ],

rawLeftPosition = 4239970296

p m_currentWindow.m_currentStart
$4 = 55097000

m_breakDancerMask[rawLeftPosition - 55097000 ]
   Cannot access memory at address 0x4481665c0

(gdb) p m_breakDancerMask[rawLeftPosition ]
Cannot access memory at address 0x455394060

That looks to be the start of the problem.

m_breakDancerMask[ 4239970296 - 55097000 ]

Have you seen this before? I am currently using (Pindel version 0.2.5a4, May 2 2014.), Is there a specific version of breakdancer I should use too?

ADD REPLY
0
Entering edit mode

Also, I updated pindel to 0.2.5a7 and ran wihout the breakdancer output. It went further than before but I eventually get this error:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
/opt/gridengine/default/spool/compute-1-2/job_scripts/177954: line 112: 21543 Aborted                 pindel -T $THREADS -f $REF -i $PINDEL_CFG -c ALL --report_inversions --report_duplications --report_long_insertions --report_breakpoints --report_interchromosomal_events -o $ANALYSIS_OUT_DIR/$ANALYSIS_OUT_DIR_NAME.pindel
ADD REPLY
0
Entering edit mode

Hi liangkaiye,

I also have a segfault in this function, with 0.2.5a7. I don't have it narrowed down to a small sample but can provide a bam with reads aligned against rice which is much smaller than human at least :)

[ edit ]

by this function I meant, I saw isBreakDancerEvent in my initial stack trace. I'm trying to track it further but valgrind is slooowww, probably take a week to show me anything

and I also can complete w/o using breakdancer input, but we see much better results with candidate site lists so...

[/edit]

it generally happens after looking at 10-20 mb of a chromosome, running each chr separately it would crash after last 'Looking' entry in the log.

Chr1. :Looking at chromosome Chr1 bases 1 to 5000001 of the bed region: chromosome Chr1:1-43270923
Chr1. :Looking at chromosome Chr1 bases 5000001 to 10000001 of the bed region: chromosome Chr1:1-43270923
Chr1. :Looking at chromosome Chr1 bases 10000001 to 15000001 of the bed region: chromosome Chr1:1-43270923
Chr1. :Looking at chromosome Chr1 bases 15000001 to 20000001 of the bed region: chromosome Chr1:1-43270923
Chr10. :Looking at chromosome Chr10 bases 1 to 5000001 of the bed region: chromosome Chr10:1-23207287
Chr10. :Looking at chromosome Chr10 bases 5000001 to 10000001 of the bed region: chromosome Chr10:1-23207287
Chr10. :Looking at chromosome Chr10 bases 10000001 to 15000001 of the bed region: chromosome Chr10:1-23207287
Chr11. :Looking at chromosome Chr11 bases 1 to 5000001 of the bed region: chromosome Chr11:1-29021106
Chr11. :Looking at chromosome Chr11 bases 5000001 to 10000001 of the bed region: chromosome Chr11:1-29021106
Chr12. :Looking at chromosome Chr12 bases 1 to 5000001 of the bed region: chromosome Chr12:1-27531856
Chr12. :Looking at chromosome Chr12 bases 5000001 to 10000001 of the bed region: chromosome Chr12:1-27531856
Chr12. :Looking at chromosome Chr12 bases 10000001 to 15000001 of the bed region: chromosome Chr12:1-27531856
Chr2. :Looking at chromosome Chr2 bases 1 to 5000001 of the bed region: chromosome Chr2:1-35937250
Chr2. :Looking at chromosome Chr2 bases 5000001 to 10000001 of the bed region: chromosome Chr2:1-35937250
Chr2. :Looking at chromosome Chr2 bases 10000001 to 15000001 of the bed region: chromosome Chr2:1-35937250
Chr2. :Looking at chromosome Chr2 bases 15000001 to 20000001 of the bed region: chromosome Chr2:1-35937250
Chr3. :Looking at chromosome Chr3 bases 1 to 5000001 of the bed region: chromosome Chr3:1-36413819
Chr3. :Looking at chromosome Chr3 bases 5000001 to 10000001 of the bed region: chromosome Chr3:1-36413819
Chr3. :Looking at chromosome Chr3 bases 10000001 to 15000001 of the bed region: chromosome Chr3:1-36413819
Chr4. :Looking at chromosome Chr4 bases 1 to 5000001 of the bed region: chromosome Chr4:1-35502694
Chr4. :Looking at chromosome Chr4 bases 5000001 to 10000001 of the bed region: chromosome Chr4:1-35502694
Chr4. :Looking at chromosome Chr4 bases 10000001 to 15000001 of the bed region: chromosome Chr4:1-35502694
Chr5. :Looking at chromosome Chr5 bases 1 to 5000001 of the bed region: chromosome Chr5:1-29958434
Chr5. :Looking at chromosome Chr5 bases 5000001 to 10000001 of the bed region: chromosome Chr5:1-29958434
Chr5. :Looking at chromosome Chr5 bases 10000001 to 15000001 of the bed region: chromosome Chr5:1-29958434
Chr5. :Looking at chromosome Chr5 bases 15000001 to 20000001 of the bed region: chromosome Chr5:1-29958434
Chr5. :Looking at chromosome Chr5 bases 20000001 to 25000001 of the bed region: chromosome Chr5:1-29958434
Chr5. :Looking at chromosome Chr5 bases 25000001 to 29958434 of the bed region: chromosome Chr5:1-29958434
Chr6. :Looking at chromosome Chr6 bases 1 to 5000001 of the bed region: chromosome Chr6:1-31248787
Chr6. :Looking at chromosome Chr6 bases 5000001 to 10000001 of the bed region: chromosome Chr6:1-31248787
Chr7. :Looking at chromosome Chr7 bases 1 to 5000001 of the bed region: chromosome Chr7:1-29697621
Chr7. :Looking at chromosome Chr7 bases 5000001 to 10000001 of the bed region: chromosome Chr7:1-29697621
Chr7. :Looking at chromosome Chr7 bases 10000001 to 15000001 of the bed region: chromosome Chr7:1-29697621
Chr7. :Looking at chromosome Chr7 bases 15000001 to 20000001 of the bed region: chromosome Chr7:1-29697621
Chr8. :Looking at chromosome Chr8 bases 1 to 5000001 of the bed region: chromosome Chr8:1-28443022
Chr8. :Looking at chromosome Chr8 bases 5000001 to 10000001 of the bed region: chromosome Chr8:1-28443022
Chr8. :Looking at chromosome Chr8 bases 10000001 to 15000001 of the bed region: chromosome Chr8:1-28443022
Chr8. :Looking at chromosome Chr8 bases 15000001 to 20000001 of the bed region: chromosome Chr8:1-28443022
Chr9. :Looking at chromosome Chr9 bases 1 to 5000001 of the bed region: chromosome Chr9:1-23012720
Chr9. :Looking at chromosome Chr9 bases 5000001 to 10000001 of the bed region: chromosome Chr9:1-23012720
ADD REPLY

Login before adding your answer.

Traffic: 2458 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6