dbTalk Databases Forums  

Using gdb with the ABF library

comp.databases.ingres comp.databases.ingres


Discuss Using gdb with the ABF library in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Roy Hann
 
Posts: n/a

Default Using gdb with the ABF library - 11-09-2009 , 07:06 AM






I am looking at a problem with an ABF application that is being ported
to 9.2/9.3 x86 64-bit Linux. There seems to be a problem with a couple
of SELECT-loops which looks like the number of pre-fetched rows is
somehow being messed up so that sometimes a bogus extra row is returned
and other times too few rows are returned.

I was thinking it'd be easy enough to trace it with gdb but the
community builds don't seem to have been compiled with -g. What is the
least amount of work I'd need to do to build the ABF library with -g
from source?

--
Roy

UK Ingres User Association Conference 2010 will be on Tuesday June 8 2010
Go to http://www.iua.org.uk/join to get on the mailing list.

Reply With Quote
  #2  
Old   
grant
 
Posts: n/a

Default Re: Using gdb with the ABF library - 11-09-2009 , 07:40 AM






On Nov 9, 2:06*pm, Roy Hann <specia... (AT) processed (DOT) almost.meat> wrote:
Quote:
I am looking at a problem with an ABF application that is being ported
to 9.2/9.3 x86 64-bit Linux. *There seems to be a problem with a couple
of SELECT-loops which looks like the number of pre-fetched rows is
somehow being messed up so that sometimes a bogus extra row is returned
and other times too few rows are returned.

I was thinking it'd be easy enough to trace it with gdb but the
community builds don't seem to have been compiled with -g. *What is the
least amount of work I'd need to do to build the ABF library with -g
from source?

Assuming you have a working build area, the following should build
all of ABF in debug:

cd $ING_SRC/front/abf
jam -a -sII_OPTIM=-g

You'll find the updated libraries in $ING_BUILD/lib. It might be
possible to target a particular sub-section of the code for which
you would cd to that directory and run:

jam -a -sII_OPTIM=-g
cd $ING_SRC/front/abf
jam

the second jam rebuilds the libraries with the parts you built in
debug.

regards

grant

ps Is anyone else having problems posting to info-ingres@....? My
original post to the list got bounced with:

Unable to deliver message to: <info-ingres (AT) mmleo (DOT) com>
Delivery failed for the following reason:
71.5.110.138[71.5.110.138] responded with failure: 550 5.7.1 Access
denied


This has been a permanent failure. No further delivery attempts will
be made.


--
Grant Croker, Ingres Corp
Ingres PHP and Ruby maintainer
http://blogs.planetingres.org/grant
"Or maybe she decided that an evening with your old tutor would be
blisteringly dull and opted for the more exhilarating course of
washing
her hair instead. Dear me, I know what I would have done. It's only
lack
of hair that forces me to pursue such a hectic social round these
days."

Reply With Quote
  #3  
Old   
Roy Hann
 
Posts: n/a

Default Re: Using gdb with the ABF library - 11-09-2009 , 07:57 AM



grant wrote:

Quote:
On Nov 9, 2:06*pm, Roy Hann <specia... (AT) processed (DOT) almost.meat> wrote:
I am looking at a problem with an ABF application that is being ported
to 9.2/9.3 x86 64-bit Linux. *There seems to be a problem with a couple
of SELECT-loops which looks like the number of pre-fetched rows is
somehow being messed up so that sometimes a bogus extra row is returned
and other times too few rows are returned.

I was thinking it'd be easy enough to trace it with gdb but the
community builds don't seem to have been compiled with -g. *What is the
least amount of work I'd need to do to build the ABF library with -g
from source?


Assuming you have a working build area, the following should build
all of ABF in debug:

cd $ING_SRC/front/abf
jam -a -sII_OPTIM=-g

You'll find the updated libraries in $ING_BUILD/lib. It might be
possible to target a particular sub-section of the code for which
you would cd to that directory and run:

jam -a -sII_OPTIM=-g
cd $ING_SRC/front/abf
jam

the second jam rebuilds the libraries with the parts you built in
debug.
Many thanks Grant, I was hoping for a recipe that simple.

--
Roy

UK Ingres User Association Conference 2010 will be on Tuesday June 8 2010
Go to http://www.iua.org.uk/join to get on the mailing list.

Reply With Quote
  #4  
Old   
Ingres Forums
 
Posts: n/a

Default Re: Using gdb with the ABF library - 11-09-2009 , 03:17 PM



Roy,
Although you are looking for a way to debug this, you might like to
know that bug 122422 results in these symptoms. In ABF nested select
loops can terminate early or run over with junk being output - that junk
obviously can then cause all sort of odd results.
A patch containing a fix for this bug is likely to resolve your
problem, without the need to use gdb. Fixed in patch 13599 for Ingres
9.2 on NPTL Linux on x86_64 available from ESD. Fix 500127 in main,
which might be of use for 9.3 (don't know that).
John


--
denjo02

Reply With Quote
  #5  
Old   
Roy Hann
 
Posts: n/a

Default Re: Using gdb with the ABF library - 11-09-2009 , 04:09 PM



Ingres Forums wrote:

Quote:
Although you are looking for a way to debug this, you might like to
know that bug 122422 results in these symptoms. In ABF nested select
loops can terminate early or run over with junk being output - that junk
obviously can then cause all sort of odd results.
A patch containing a fix for this bug is likely to resolve your
problem, without the need to use gdb. Fixed in patch 13599 for Ingres
9.2 on NPTL Linux on x86_64 available from ESD. Fix 500127 in main,
which might be of use for 9.3 (don't know that).
Thanks John, I will pursue that.

--
Roy

UK Ingres User Association Conference 2010 will be on Tuesday June 8 2010
Go to http://www.iua.org.uk/join to get on the mailing list.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.