Re: Lots of SIGFPE and SIGSEGV found while debugging Sun hotspotvm on AMD64 machine

Michael Snyder
2007-03-22T21:19:23Z

On Thu, 2007-03-22 at 15:33 -0600, Neo wrote:

> >
> Dnaiel & Michael,
>
> Yes, those annoying messages are gone after applying "handle". But the
> latest gdb seems cannot break on the functions.

I don't know -- but I notice considerable difference in the
thread reporting between your two sessions below.

Are you sure the only difference between the two sessions
is the gdb version?

'nother question -- is tenuredGeneration.cpp in a shared library?
Is gdb finding the shared libraries? You can get more info about
shared library symbol loading by saying "set verbose" before "run".

>
> This is from gdb 6.5.50.20060621-cvs, which can resolve the line number
> and can break.
>
> > gdb --args java_g -XX:+UseSerialGC -Xms144m -Xmx654m -classpath
> ./jbb.jar:./jbb_no_precompile.jar:./check.jar:./reporter.jar:/home/cjia/jdk1.5.0_05/lib/dt.jar:/home/cjia/jdk1.5.0_05/lib/tools.jar
> spec.jbb.JBBmain -propfile SPECjbb.props
> GNU gdb 6.5.50.20060621-cvs
> Copyright (C) 2006 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "x86_64-unknown-linux-gnu"...Using host
> libthread_db library "/lib64/tls/libthread_db.so.1".
>
> (gdb) r
> Starting program:
> /home/cjia/research/jdk/jdk5-dynamic_gc.svn/control/build/linux-amd64/bin/java_g
> -XX:+UseSerialGC -Xms144m -Xmx654m -classpath
> ./jbb.jar:./jbb_no_precompile.jar:./check.jar:./reporter.jar:/home/cjia/jdk1.5.0_05/lib/dt.jar:/home/cjia/jdk1.5.0_05/lib/tools.jar
> spec.jbb.JBBmain -propfile SPECjbb.props
> [Thread debugging using libthread_db enabled]
> [New Thread 182894205312 (LWP 17940)]
> [New process 17940]
> Executing new program:
> /home/cjia/research/jdk/jdk5-dynamic_gc.svn/control/build/linux-amd64/bin/java_g
> [Thread debugging using libthread_db enabled]
> [New Thread 182894205312 (LWP 17940)]
> VM option '+UseSerialGC'
> [New Thread 1074788704 (LWP 17943)]
> [New Thread 1075837280 (LWP 17944)]
> [New Thread 1076885856 (LWP 17945)]
> [New Thread 1077934432 (LWP 17946)]
> [New Thread 1078983008 (LWP 17947)]
> [New Thread 1080031584 (LWP 17948)]
> [New Thread 1081080160 (LWP 17949)]
> [New Thread 1082128736 (LWP 17950)]
> [New Thread 1083177312 (LWP 17951)]
>
> Checking JVM
>
> 1st bounds test: OK
> Super: Class Super, public=34, protected=33, private=32
> Sub: Class Super, public=804, protected=803, private=802
> Super: prot=33, priv=32
> Sub: prot=111, priv=105
> Subclass test OK
> 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765
> 1 1 2 3 5 8 666 666 13 13 21 21
> 2nd bounds test: OK
> testIf: OK
> testArray: OK
> testBitOps: OK
> testFor: OK
> testDiv:
> Program received signal SIGFPE, Arithmetic exception.
> [Switching to Thread 182894205312 (LWP 17940)]
> 0x0000002a96eca3e8 in ?? ()
> (gdb) b tenuredGeneration.cpp:289
> Breakpoint 1 at 0x2a95ee5f0a: file
> /home/cjia/research/jdk/jdk5-dynamic_gc.svn/hotspot/src/share/vm/memory/tenuredGeneration.cpp,
> line 289.
> (gdb) c
> Continuing.
> OK
> testTableSwitch: OK
> testLookupSwitch: OK
> testHiddenField: OK
> checkRemainders: long double OK
> checkMathFcts: OK
> Primes less than 50: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47
> testExc1(simple throw/catch): OK
> testExc2(skip catch clauses): OK
> testExc3(catch in inner): OK
> testExc4(catch in outer): OK
> testExc5(rethrow): OK
> testExc6(throw accross call): OK
> testExc7(throw accr. 2 calls): OK
> loopExitContinueInExceptionHandler: OK
> testStringHash: OK
> testClone: OK
> testObjectArray: OK
> checkInstanceOf: OK
> checkInterfaceInstanceOf: OK
> testWaitNull: OK
> testVarAndMethodNameClash: OK
> testMisk: OK
> testGC: [Switching to Thread 1074788704 (LWP 17943)]
>
> Breakpoint 1, TenuredGeneration::compute_new_size (this=0x557498)
> at
> /home/cjia/research/jdk/jdk5-dynamic_gc.svn/hotspot/src/share/vm/memory/tenuredGeneration.cpp:289
> 289 assert(_shrink_factor <= 100, "invalid shrink factor");
> Current language: auto; currently c++
>
> This is from gdb 6.6.50.20070322-cvs, which cannot resolve the symbol
> and cannot break.
>
> > /opt/gdb-cvs/bin/gdb --args java_g -XX:+UseSerialGC -Xms144m -Xmx654m
> -classpath
> ./jbb.jar:./jbb_no_precompile.jar:./check.jar:./reporter.jar:/home/cjia/jdk1.5.0_05/lib/dt.jar:/home/cjia/jdk1.5.0_05/lib/tools.jar
> spec.jbb.JBBmain -propfile SPECjbb.props
> GNU gdb 6.6.50.20070322-cvs
> Copyright (C) 2007 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "x86_64-unknown-linux-gnu"...
> Using host libthread_db library "/lib64/tls/libthread_db.so.1".
> (gdb) r
> Starting program:
> /home/cjia/research/jdk/jdk5-dynamic_gc.svn/control/build/linux-amd64/bin/java_g
> -XX:+UseSerialGC -Xms144m -Xmx654m -classpath
> ./jbb.jar:./jbb_no_precompile.jar:./check.jar:./reporter.jar:/home/cjia/jdk1.5.0_05/lib/dt.jar:/home/cjia/jdk1.5.0_05/lib/tools.jar
> spec.jbb.JBBmain -propfile SPECjbb.props
> [Thread debugging using libthread_db enabled]
> [New Thread 182894205312 (LWP 17984)]
> [New process 17984]
> VM option '+UseSerialGC'
>
> Checking JVM
>
> 1st bounds test: OK
> Super: Class Super, public=34, protected=33, private=32
> Sub: Class Super, public=804, protected=803, private=802
> Super: prot=33, priv=32
> Sub: prot=111, priv=105
> Subclass test OK
> 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765
> 1 1 2 3 5 8 666 666 13 13 21 21
> 2nd bounds test: OK
> testIf: OK
> testArray: OK
> testBitOps: OK
> testFor: OK
> testDiv: [New LWP 17984]
>
> Program received signal SIGFPE, Arithmetic exception.
> 0x0000002a96eca3e8 in ?? ()
> (gdb) b tenuredGeneration.cpp:289
> No source file named tenuredGeneration.cpp.
> Make breakpoint pending on future shared library load? (y or [n]) y
> Breakpoint 1 (tenuredGeneration.cpp:289) pending.
> (gdb) c
> Continuing.
> OK
> testTableSwitch: OK
> testLookupSwitch: OK
> testHiddenField: OK
> checkRemainders: long double OK
> checkMathFcts: OK
> Primes less than 50: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47
> testExc1(simple throw/catch): OK
> testExc2(skip catch clauses): OK
> testExc3(catch in inner): OK
> testExc4(catch in outer): OK
> testExc5(rethrow): OK
> testExc6(throw accross call): OK
> testExc7(throw accr. 2 calls): OK
> loopExitContinueInExceptionHandler: OK
> testStringHash: OK
> testClone: OK
> testObjectArray: OK
> checkInstanceOf: OK
> checkInterfaceInstanceOf: OK
> testWaitNull: OK
> testVarAndMethodNameClash: OK
> testMisk: OK
> testGC: OK
> PepTest: OK
>
> JVM Check OK
> Constructing the company now Hang....on
>
> Loading Warehouse 1...
>
>
>
> Loading properties from SPECjbb.props
> The results will be in: results/SPECjbb.050.raw
> Opened results/SPECjbb.050.results
> Opened results/SPECjbb.050.raw
>
> Licensed Materials - Property of SPEC
> SPECjbb2000
> Copyright (c) 2000 Standard Performance Evaluation Corporation
> (SPEC),All rights reserved,(C) Copyright IBM Corp., 1996 - 2000All
> rights reserved,
> This source code is provided as is, without any express or implied warranty.
>
> TPC Fair Use policy:
>
> SPECjbb2000 is not a TPC Benchmark. SPECjbb2000 results are not
> comparable with
> any TPC Benchmark results. The workload used by SPECjbb2000 is inspired
> by the TPC-C specification, TPC Benchmark C , Standard Specification,
> Revision 3.2, August 27 1996. TPC Benchmark is a trademark of the
> Transaction
> Processing Performance Council.
>
> Benchmark SPECjbb2000 1.02 now Opening
>
>
> Input Properties:
> ramp_up_seconds = 30
> measurement_seconds = 120
> forcegc = false
> starting_number_warehouses = 1
> increment_number_warehouses = 1
> ending_number_warehouses = 1
>
>
> Thanks,
> Neo
>