Issue Details (XML | Word | Printable)

Key: DERBY-4148
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Myrna van Lunteren
Reporter: Myrna van Lunteren
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

NullPointerException in system.sttest run with 10.5.1.0

Created: 06/Apr/09 06:57 PM   Updated: 04/May/09 06:24 PM
Component/s: Test
Affects Version/s: 10.4.2.0
Fix Version/s: 10.5.1.1

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works DERBY-4148.diff 2009-04-08 10:57 PM Myrna van Lunteren 0.7 kB
Environment:
Linux 2.6.16.60-0.34-bigsmp #1 SMP Fri Jan 16 14:59:01 UTC 2009 i686 i686 i386 GNU/Linux;
java -version:
java version "1.6.0"
Java(TM) SE Runtime Environment (build pxi3260sr3-20081106_07(SR3))
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260-20081105_25433 (JIT enabled, AOT enabled)
J9VM - 20081105_025433_lHdSMr
JIT - r9_20081031_1330
GC - 20081027_AB)
JCL - 20081106_01

Resolution Date: 09/Apr/09 05:55 PM


 Description  « Hide
I see the following stack trace on line 22615 of the redirected output:

Thread finished: 1
complete initial data
total memory: 50713600 free: 3130088 Tue Mar 31 23:39:47 PDT 2009
java.lang.NullPointerException
        at org.apache.derbyTesting.system.sttest.utils.Datatypes.update_one_row(Datatypes.java:612)
        at org.apache.derbyTesting.system.sttest.Sttest.run(Sttest.java:387)
Exception in thread "Thread-9" java.lang.NullPointerException
        at org.apache.derbyTesting.system.sttest.Sttest.run(Sttest.java:435)
java.lang.NullPointerException
        at org.apache.derbyTesting.system.sttest.utils.Datatypes.update_one_row(Datatypes.java:612)
        at org.apache.derbyTesting.system.sttest.Sttest.run(Sttest.java:387)
Exception in thread "Thread-10" java.lang.NullPointerException
        at org.apache.derbyTesting.system.sttest.Sttest.run(Sttest.java:435)
java.lang.NullPointerException
        at org.apache.derbyTesting.system.sttest.utils.Datatypes.update_one_row(Datatypes.java:612)
        at org.apache.derbyTesting.system.sttest.Sttest.run(Sttest.java:387)
Exception in thread "Thread-11" java.lang.NullPointerException
        at org.apache.derbyTesting.system.sttest.Sttest.run(Sttest.java:435)
quantity in pick_some is: 1
0 rows deleted

Matching this up with the derby.log - the first entry in derby.log is 2009-04-01 03:01:52.432 GMT, and ls -al shows 2009-03-31 20:01 PDT for the creation of testDB, so time diff was 7 hours - shows nothing of interest. The last entry in derby.log is at 2009-04-01 06:52:15.595 GMT, so only 3 hours later.

I've seen the same thing 3 times - this needs to be analyzed further.
I will also run on another machine, and run with sane jars to see if we get any stack trace of other help from derby.log.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Myrna van Lunteren added a comment - 07/Apr/09 05:57 PM
I see the same on another machine (both were linux, by the way) and with the sane build, but there was no more info in derby.log.

Myrna van Lunteren added a comment - 07/Apr/09 08:32 PM
Based on a code inspection, it seems to me the problem is that in Datatypes.java, method update_one_row, the Reader StreamReader is always initialized to null, and always closed (in line 612), but only ever modified if the datatype is a CLOB. So, it should give a NPE for all other datatypes.
The closing should be conditional for null.
As this test has been unchanged in the last 2 years, I'd expect this to be the same with 10.4.
I'll start a 10.4 run and see.

Myrna van Lunteren added a comment - 08/Apr/09 10:57 PM
I did see this with my 10.4 test run. I also spotted a similar issue with streamIn in the same method - it's only ever set when we're dealing with a blob.
Attaching a minor patch that addresses these two NPEs. Running a trial of the fixed up test now. If OK, I'll commit & backport this minor change to the test.

Myrna van Lunteren added a comment - 09/Apr/09 05:55 PM
committed the patch with revision 763743 to trunk, backported to 10.5 with revision 763748.