[ts-gen] segmentation faults

Nils Gebhardt mail at ngebhardt.de
Wed Aug 20 01:59:37 EDT 2008



Bill, 

thanks for your quick answer. 


> 
> > tsd$ cat sql/req/Version.sql
> > insert into `Version`(uid, text)
> > values
> > (58, 'shim dbms version 1.58');
> 

I get 

(58, 'shim dbms version 1.58');


> setup scripts, you consider firing up the shim using gdb and
> capturing a stack backtrace of the crash, e.g.
> 
> > gdb ./shim
> 

looks like as follows: 

n at gb07:$ gdb ./shim 
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) run --data
Starting program: /home/n/T/TEST/shim-080815/shim --data
[Thread debugging using libthread_db enabled]
[New Thread 0x7fea8b34e6f0 (LWP 8857)]

          The trading shim has connected to the database server

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fea8b34e6f0 (LWP 8857)]
0x000000000050ac10 in Cursor (this=0x7fff933681a0, a=@0x7fea88b0e370,
b=@0x7fff9336820f, c=0x0) at src/envs.c:241
241	      eRror(*new (a.temp)    nat(0))
Current language:  auto; currently c++
(gdb) 
(gdb) where
#0  0x000000000050ac10 in Cursor (this=0x7fff933681a0,
a=@0x7fea88b0e370, b=@0x7fff9336820f, c=0x0) at src/envs.c:241
#1  0x00000000004dfb97 in
TradingShimDaemon1_0::InputOutputFlows::Mysql::query
(this=0x7fea88aee068, e=@0x7fff93368310, v=@0x7fea88ad57b8, 
    q=0x7fea88ad8fe8 "select uid, tid, name, curr, region from Symbol
where uid >= 1 order by uid;") at src/fill.c:105
#2  0x00000000004dfe0b in
TradingShimDaemon1_0::DatabaseRelation::Persistent::read
(this=0x7fea88ad57b8, q=@0x7fff93368310) at src/fill.c:46
#3  0x00000000004dfe83 in
TradingShimDaemon1_0::DatabaseRelation::Tables::read
(this=0x7fea88ad0168, e=@0x7fff93368310, tabs=@0x7fea88ad82e8) at
src/fill.c:21
#4  0x00000000004d184b in
TradingShimDaemon1_0::DatabaseRelation::Tables::init
(this=0x7fea88ad0168, i=@0x7fff93368420, r=@0x7fea88aea308) at
src/init.c:143
#5  0x00000000004d18a1 in
TradingShimDaemon1_0::DomainSingletons::InitialEnv::tables_init
(this=0x7fff93368420) at src/init.c:118
#6  0x00000000004d197d in
TradingShimDaemon1_0::DomainSingletons::Main::tabs (this=0x7fea88a2dcd0,
e=@0x7fff93368420, c=@0x7fea88b0e360) at src/init.c:77
#7  0x00000000004d1b54 in LateData (this=0x7fea88b0e100,
e=@0x7fff93368420, m=@0x7fea88a2dcd0, i=@0x7fea88a15320) at
src/init.c:54
#8  0x00000000004d1d2f in
TradingShimDaemon1_0::DomainSingletons::Shim::init (this=0x7fea88a15010,
e=@0x7fff933684b0, s=@0x7fea88a150d0, f=@0x7fea88aedeb8,
r=@0x7fea88aea308)
    at src/init.c:39
#9  0x0000000000409c1b in Shim (this=0x7fea88a15010, p=@0x7fea889c8048,
l=@0x7fea88a08730, args=@0x7fff933686d0) at src/once.c:56
#10 0x0000000000409c72 in Init (this=0x7fea88a15000, c=@0x7fea88a08730,
perm=@0x7fea889c8048, a=@0x7fff933686d0) at src/once.c:46
#11 0x0000000000409f3e in Singletons (this=0x7fea88a15000,
c=@0x7fea88a08730, a=@0x7fff933686d0) at src/once.c:21
#12 0x0000000000409fbc in
MinimalModeMultiParadigm::SingleTreePattern::SingleTree<TradingShimDaemon1_0::DomainSingletons::Shim>::root (c=@0x7fea88a08730, a=@0x7fff933686d0) at src/once.c:34
#13 0x00000000004dd7e8 in
TradingShimDaemon1_0::DomainSingletons::Shim::shim (argc=2,
argv=0x7fff93368828) at src/shim.c:16
#14 0x0000000000402bfb in main (argc=2, argv=0x7fff93368828) at
src/main.c:13
(gdb) 

------%------

interestingly, I got a slightly different output in an earlier run (no
changes otherwise):

(gdb) run --data
Starting program: /home/n/T/TEST/shim-080815/shim --data
[Thread debugging using libthread_db enabled]
[New Thread 0x7f5259e5c6f0 (LWP 8587)]

          The trading shim has connected to the database server

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f5259e5c6f0 (LWP 8587)]
0x000000000042b5c3 in
MinimalModeMultiParadigm::HashAndTreeMaps::Function<MinimalModeMultiParadigm::BytesAndStringsAndOtherThings::Identifier, TradingShimDaemon1_0::TuplesAttributes::FunctorAtoms::Symbol>::extend (this=0x7f52575e3988, 
    key=@0x7f52584d5f60) at src/../lib/function.h:244
244	        for (nat j(0); j<n   ; ++j) b[j] = a[j];
Current language:  auto; currently c++
(gdb) where
#0  0x000000000042b5c3 in
MinimalModeMultiParadigm::HashAndTreeMaps::Function<MinimalModeMultiParadigm::BytesAndStringsAndOtherThings::Identifier, TradingShimDaemon1_0::TuplesAttributes::FunctorAtoms::Symbol>::extend (this=0x7f52575e3988, 
    key=@0x7f52584d5f60) at src/../lib/function.h:244
#1  0x000000000042b934 in
MinimalModeMultiParadigm::HashAndTreeMaps::Function<MinimalModeMultiParadigm::BytesAndStringsAndOtherThings::Identifier, TradingShimDaemon1_0::TuplesAttributes::FunctorAtoms::Symbol>::check (this=0x7f52575e3988, 
    key=@0x7f52584d5f60) at src/../lib/function.h:255
#2  0x000000000042b96f in
MinimalModeMultiParadigm::HashAndTreeMaps::Function<MinimalModeMultiParadigm::BytesAndStringsAndOtherThings::Identifier, TradingShimDaemon1_0::TuplesAttributes::FunctorAtoms::Symbol>::insert (this=0x7f52575e3988, 
    val=@0x7f52584d5dc0) at src/../lib/function.h:183
#3  0x000000000042bd2c in
MinimalModeMultiParadigm::HashAndTreeMaps::Function<MinimalModeMultiParadigm::BytesAndStringsAndOtherThings::Identifier, TradingShimDaemon1_0::TuplesAttributes::FunctorAtoms::Symbol>::invert (this=0x7f52575e3988, 
    val=@0x7f52584d5dc0) at src/../lib/function.h:156
#4  0x000000000042bd4f in
MinimalModeMultiParadigm::HashAndTreeMaps::Subset<MinimalModeMultiParadigm::BytesAndStringsAndOtherThings::Identifier, TradingShimDaemon1_0::TuplesAttributes::FunctorAtoms::Symbol>::operator+= (
    this=0x7f52575e3988, val=@0x7f52584d5dc0) at src/../lib/domain.h:88
#5  0x000000000042bd84 in
TradingShimDaemon1_0::DatabaseRelation::KeyedTableT<TradingShimDaemon1_0::DatabaseRelation::SessionSet, TradingShimDaemon1_0::TuplesAttributes::FunctorAtoms::Symbol, TradingShimDaemon1_0::ObjectTypeSystem::Fsym<Tra---Type <return> to continue, or q <return> to quit---
dingShimDaemon1_0::ObjectTypeSystem::Tuple, 33ul,
TradingShimDaemon1_0::TuplesAttributes::FunctorAtoms::Symbol> const,
MinimalModeMultiParadigm::HashAndTreeMaps::Subset<MinimalModeMultiParadigm::BytesAndStringsAndOtherThings::Identifier, TradingShimDaemon1_0::TuplesAttributes::FunctorAtoms::Symbol> const>::operator+=
    (this=0x7f52575e37b8, r=@0x7f52584d5dc0) at src/tabs.h:88
#6  0x0000000000418332 in
TradingShimDaemon1_0::DatabaseRelation::SequentialT<TradingShimDaemon1_0::DatabaseRelation::SessionSet, TradingShimDaemon1_0::TuplesAttributes::FunctorAtoms::Symbol, TradingShimDaemon1_0::ObjectTypeSystem::Fsym<TradingShimDaemon1_0::ObjectTypeSystem::Tuple, 33ul, TradingShimDaemon1_0::TuplesAttributes::FunctorAtoms::Symbol> const>::append (this=0x7f52575e37b8, 
    r=@0x7f52584d5dc0) at src/tabs.h:67
#7  0x00000000004df154 in
TradingShimDaemon1_0::DatabaseRelation::Sequential::check
(this=0x7f52575e37b8, r=@0x7f52584d5dc0) at src/fill.c:162
#8  0x00000000004df527 in
TradingShimDaemon1_0::DatabaseRelation::Persistent::match
(this=0x7f52575e37b8, e=@0x7fff61e76e20, r=@0x7f52575fc108, 
    k=@0x7fff61e76cb0) at src/fill.c:154
#9  0x00000000004dfbb9 in
TradingShimDaemon1_0::InputOutputFlows::Mysql::query
    (this=0x7f52575fc068, e=@0x7fff61e76e20, v=@0x7f52575e37b8, 
    q=0x7f52575e6fe8 "select uid, tid, name, curr, region from Symbol
where uid >= 1 order by uid;") at src/fill.c:105
#10 0x00000000004dfe0b in
TradingShimDaemon1_0::DatabaseRelation::Persistent::read
(this=0x7f52575e37b8, q=@0x7fff61e76e20) at src/fill.c:46
#11 0x00000000004dfe83 in
TradingShimDaemon1_0::DatabaseRelation::Tables::read
---Type <return> to continue, or q <return> to quit---
    (this=0x7f52575de168, e=@0x7fff61e76e20, tabs=@0x7f52575e62e8)
    at src/fill.c:21
#12 0x00000000004d184b in
TradingShimDaemon1_0::DatabaseRelation::Tables::init
    (this=0x7f52575de168, i=@0x7fff61e76f30, r=@0x7f52575f8308)
    at src/init.c:143
#13 0x00000000004d18a1 in
TradingShimDaemon1_0::DomainSingletons::InitialEnv::tables_init
(this=0x7fff61e76f30) at src/init.c:118
#14 0x00000000004d197d in
TradingShimDaemon1_0::DomainSingletons::Main::tabs (
    this=0x7f525753bcd0, e=@0x7fff61e76f30, c=@0x7f525761c360) at
src/init.c:77
#15 0x00000000004d1b54 in LateData (this=0x7f525761c100,
e=@0x7fff61e76f30, 
    m=@0x7f525753bcd0, i=@0x7f5257523320) at src/init.c:54
#16 0x00000000004d1d2f in
TradingShimDaemon1_0::DomainSingletons::Shim::init (
    this=0x7f5257523010, e=@0x7fff61e76fc0, s=@0x7f52575230d0, 
    f=@0x7f52575fbeb8, r=@0x7f52575f8308) at src/init.c:39
#17 0x0000000000409c1b in Shim (this=0x7f5257523010, p=@0x7f52574d6048, 
    l=@0x7f5257516730, args=@0x7fff61e771e0) at src/once.c:56
#18 0x0000000000409c72 in Init (this=0x7f5257523000, c=@0x7f5257516730, 
    perm=@0x7f52574d6048, a=@0x7fff61e771e0) at src/once.c:46
#19 0x0000000000409f3e in Singletons (this=0x7f5257523000,
c=@0x7f5257516730, 
    a=@0x7fff61e771e0) at src/once.c:21
#20 0x0000000000409fbc in
MinimalModeMultiParadigm::SingleTreePattern::SingleTree<TradingShimDaemon1_0::DomainSingletons::Shim>::root (c=@0x7f5257516730, 
    a=@0x7fff61e771e0) at src/once.c:34
---Type <return> to continue, or q <return> to quit---
#21 0x00000000004dd7e8 in
TradingShimDaemon1_0::DomainSingletons::Shim::shim (
    argc=2, argv=0x7fff61e77338) at src/shim.c:16
#22 0x0000000000402bfb in main (argc=2, argv=0x7fff61e77338) at
src/main.c:13
(gdb) quit

-------%----------




Thanks, 

Nils




More information about the ts-general mailing list