[Biojava-l] Restriction Mapper - Thread (or dual core cpu) problem

mark.schreiber at novartis.com mark.schreiber at novartis.com
Wed Dec 13 01:32:57 UTC 2006


This does indeed sound like a thread problem. Can you post this to the 
biojava bugzilla (there is a link on the homepage) to make sure we fix it. 
Can you post code that replicates the bug as well.

This raises an interesting point. Because Java is inherently 
multi-threaded on multi-core machines you can expose thread issues you 
never knew you had. We may see more of this sort of thing for a while as 
more dual core CPUs become commidity.

- Mark

Mark Schreiber
Research Investigator (Bioinformatics)

Novartis Institute for Tropical Diseases (NITD)
10 Biopolis Road
#05-01 Chromos
Singapore 138670
www.nitd.novartis.com
www.dengueinfo.org

phone +65 6722 2973
fax  +65 6722 2910





ilhami visne <ilhami.visne at gmail.com>
Sent by: biojava-l-bounces at lists.open-bio.org
12/13/2006 06:57 AM

 
        To:     biojava-l at lists.open-bio.org
        cc:     (bcc: Mark Schreiber/GP/Novartis)
        Subject:        [Biojava-l] Restriction Mapper - Thread (or dual core cpu) problem


hello,

in last summer, i wrote a program, which uses Restriction Mapper. As it 
was in example (if i remember correctly), for each enzyme i used one 
thread. everytime i got error.

then i noticed, if i use only one enzyme, i get no error. i thought, 
this could be a thread-safe issue, because if enzyme count is more than 
one, more than one thread will run. therefore i have changed my program 
to single threaded. and it has worked well, even for many enzymes. till 
this week...

one of my clients has run my program on a dual cpu machine. Guess what? 
Again same error!!! i have a single-cpu laptop. a friend of mine has a 
dual-core cpu laptop. i have tried myself on this machine. And yeah. 
that is the problem, because for the same file i don't get any error on 
my single-core machine, but everytime the same error on dual-core cpu. 
Two more important information: 1. here i got an error for HpaII but it 
can be any other enzyme. 2. my file has 24000 sequences. the sequence, 
by which this exception is thrown, is random too. sometimes the 5600. 
sequence, another time the 17456. sequence. it changes too. i checked, 
all sequences are normal.

is this a known issue? is there any solution?

The exception:

Exception in thread "Thread-13" org.biojava.bio.BioRuntimeException: 
Failed to complete search for HpaII CCGG (1/3)
    at 
org.biojava.bio.molbio.RestrictionSiteFinder.run(RestrictionSiteFinder.java:137)
    at 
org.biojava.utils.SimpleThreadPool$PooledThread.run(SimpleThreadPool.java:295)
Caused by: java.lang.NullPointerException
    at 
org.biojava.bio.seq.io.SymbolListCharSequence.charAt(SymbolListCharSequence.java:115)
    at java.lang.Character.codePointAt(Unknown Source)
    at java.util.regex.Pattern$Single.match(Unknown Source)
    at java.util.regex.Pattern$Curly.match(Unknown Source)
    at java.util.regex.Pattern$Start.match(Unknown Source)
    at java.util.regex.Matcher.search(Unknown Source)
    at java.util.regex.Matcher.find(Unknown Source)
    at 
org.biojava.bio.molbio.RestrictionSiteFinder.run(RestrictionSiteFinder.java:104)
    ... 1 more

thanx in advance.

P.S.: i got here a nullpointer exception. if i remember correctly, i got 
that time ArrayIndexOutOfBound exception. the index was bigger than the 
length of the sequence.
_______________________________________________
Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biojava-l






More information about the Biojava-l mailing list