You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running STARsolo on unaligned BAM files. I get a segmentation fault on some of the input files and these input BAM files have only a few reads.
I compiled STAR-2.7.11b with the gcc address sanitizer and running this executable on a problematic BAM file gives the message
== compile STAR with -fsanitizer=address -Og and run
...
Jan 18 15:48:24 ..... started STAR run
Jan 18 15:48:24 ..... loading genome
Jan 18 15:49:39 ..... started mapping
Jan 18 15:49:40 ..... finished mapping
Jan 18 15:49:42 ..... started Solo counting
AddressSanitizer:DEADLYSIGNAL
=================================================================
==2998837==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x5644a41f34c5 bp 0x7fff82ac2180 sp 0x7fff82ac1fe0 T0)
==2998837==The signal is caused by a READ memory access.
==2998837==Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn which register was used.
#0 0x5644a41f34c5 in long long binarySearchExact<unsigned long long>(unsigned long long, unsigned long long*, unsigned long long) /home/brent/src/star/STAR-2.7.11b/source/serviceFuns.cpp:300
#1 0x5644a420383d in SoloReadFeature::inputRecords(unsigned int**, unsigned int, std::vector<unsigned int, std::allocator<unsigned int> >&, std::vector<readInfoStruct, std::allocator<readInfoStruct> >&, SoloReadFlagClass&, std::vector<unsigned int, std::allocator<unsigned int> >&, std::vector<unsigned int, std::allocator<unsigned int> >&) /home/brent/src/star/STAR-2.7.11b/source/SoloReadFeature_inputRecords.cpp:44
#2 0x5644a41a6edb in SoloFeature::countCBgeneUMI() /home/brent/src/star/STAR-2.7.11b/source/SoloFeature_countCBgeneUMI.cpp:46
#3 0x5644a421446e in SoloFeature::processRecords() /home/brent/src/star/STAR-2.7.11b/source/SoloFeature_processRecords.cpp:54
#4 0x5644a420739e in Solo::processAndOutput() /home/brent/src/star/STAR-2.7.11b/source/Solo.cpp:82
#5 0x5644a42b25c1 in main /home/brent/src/star/STAR-2.7.11b/source/STAR.cpp:256
#6 0x14d5ec434d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#7 0x14d5ec434e3f in __libc_start_main_impl ../csu/libc-start.c:392
#8 0x5644a410f510 in _start (/net/gs/vol1/home/bge/STAR+0x52510)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/brent/src/star/STAR-2.7.11b/source/serviceFuns.cpp:300 in long long binarySearchExact<unsigned long long>(unsigned long long, unsigned long long*, unsigned long long)
==2998837==ABORTING
I added a diagnostic in binarySearchExact() to report the value of N, which turns out to be zero.
Furthermore, adding the lines
if (N==0)
return -1;
at the start of binarySearchExact() appears to solve this problem.
I appreciate your consideration.
Thank you.
Ever grateful,
Brent
The text was updated successfully, but these errors were encountered:
The first part of the modified binarySearchExact() looks like
template <class argType>
inline int64 binarySearchExact(argType x, argType *X, uint64 N) {
//binary search in the sorted list
//check the boundaries first
//returns -1 if no match found
//if X are not all distinct, no guarantee which element is returned
if (N==0)
return -1;
if (x>X[N-1] || x<X[0])
return -1;
This is at about line 300 in the source/serviceFuns.cpp file.
Thank you for your reply, this solution seems to not work in my issue. In my case, it was finally found that an extra blank line was introduced in the readFilesManifest file, which caused this error. But again, thank you for your kind help.
Hi,
I am running STARsolo on unaligned BAM files. I get a segmentation fault on some of the input files and these input BAM files have only a few reads.
I compiled STAR-2.7.11b with the gcc address sanitizer and running this executable on a problematic BAM file gives the message
I added a diagnostic in
binarySearchExact()
to report the value of N, which turns out to be zero.Furthermore, adding the lines
at the start of
binarySearchExact()
appears to solve this problem.I appreciate your consideration.
Thank you.
Ever grateful,
Brent
The text was updated successfully, but these errors were encountered: