You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Sean Johnston <sh...@conical-effort.net> on 2008/05/29 15:11:00 UTC

Crash on HPUX ia64 with Oracle OCI

I'm struggling with an unexpected crash. It seems that when I link with
Oracle OCI libraries on HPUX ia64 the parser crashes. It is fine when
linking with ODBC (easysoft) libraries.

The code changes in my application between the two builds are well
encaspulated and none of that code is executed before doing the parse.

This problem does not occur on Solaris. On both platforms I'm using a 64bit
build. I've tried a 32bit build on HPUX but that still falls over. A Windows
(32bit) build is also fine.

It looks like it is falling over in IGXMLScanner2.cpp:1286 where it calls
resetDocument() on the document handler. It ends up at BaseRefVectorOf.c:68
with ThrowXMLwithMemMgr.

I'm setting a content handler and an error handler and using the
SAX2XMLReader created from the XMLReaderFactory::createXMLReader. Using
version 2.8.0.

It fails with a SIGILL, though in my various tweaking to try and get it
working I've had an address align signal at some point too.

I suspect this is a linker issue somehow given that it works without the
Oracle libraries linked in and on other platforms, but it's doing my head in
and I'm not sure where to go from here.

Does this ring any bells with anyone?

Sean.
-- 
It's a conical sort of effort

Re: Crash on HPUX ia64 with Oracle OCI

Posted by Jerry Napoli <jn...@iteamsolutions.com>.
Hi,

I would also check you're compiling / linking consistently with the -mt 
flag.  I'm pretty sure the OCI libraries were compiled for 
multi-threading, so you build of XercesC and application (plus any other 
third-party libs) must be built and linked with -mt.  Also check you're 
using the latest compiler, linker and runtime patches.

Do you have a small example that you can post that reproduces the issue? 


The symptoms you describe make me think there is potentially corruption 
in the application somewhere, and that linking vs not linking something 
in just might mask the problem.  You might try running it in the latest 
gdb with heap and memory checking enabled.


Jerry


Sean Johnston wrote:
> On Thu, May 29, 2008 at 6:29 PM, David Bertoni <db...@apache.org> wrote:
> 
>> Sean Johnston wrote:
>>
>>> I'm struggling with an unexpected crash. It seems that when I link with
>>> Oracle OCI libraries on HPUX ia64 the parser crashes. It is fine when
>>> linking with ODBC (easysoft) libraries.
>>>
>>> I would check two things:
>> 1. Verify that all of your binaries are linking with the same -A option.
>>  That is, make sure you aren't mixing -AA and -AP.  I would suspect the
>> Oracle library was built with -AP.
>>
>> 2. Verify that the Oracle library you're using isn't also linking with
>> Xerces-C or some variant of the Xerces-C library.
>>
>> Dave
>>
> 
> I'll have a look at that, thanks. Linking against the shared version of the
> Oracle libraries seems OK so the build of the Oracle static libraries
> certainly looks like a likely culprit here. Or of course that is fine and I
> need to change my build and possibly my Xerces-C build too.
> 
> Sean.


Re: Crash on HPUX ia64 with Oracle OCI

Posted by Sean Johnston <sh...@conical-effort.net>.
On Thu, May 29, 2008 at 6:29 PM, David Bertoni <db...@apache.org> wrote:

> Sean Johnston wrote:
>
>> I'm struggling with an unexpected crash. It seems that when I link with
>> Oracle OCI libraries on HPUX ia64 the parser crashes. It is fine when
>> linking with ODBC (easysoft) libraries.
>>
>
>> I would check two things:
>
> 1. Verify that all of your binaries are linking with the same -A option.
>  That is, make sure you aren't mixing -AA and -AP.  I would suspect the
> Oracle library was built with -AP.
>
> 2. Verify that the Oracle library you're using isn't also linking with
> Xerces-C or some variant of the Xerces-C library.
>
> Dave
>

I'll have a look at that, thanks. Linking against the shared version of the
Oracle libraries seems OK so the build of the Oracle static libraries
certainly looks like a likely culprit here. Or of course that is fine and I
need to change my build and possibly my Xerces-C build too.

Sean.
-- 
It's a conical sort of effort

Re: Crash on HPUX ia64 with Oracle OCI

Posted by David Bertoni <db...@apache.org>.
Sean Johnston wrote:
> I'm struggling with an unexpected crash. It seems that when I link with
> Oracle OCI libraries on HPUX ia64 the parser crashes. It is fine when
> linking with ODBC (easysoft) libraries.
> 
> The code changes in my application between the two builds are well
> encaspulated and none of that code is executed before doing the parse.
> 
> This problem does not occur on Solaris. On both platforms I'm using a 64bit
> build. I've tried a 32bit build on HPUX but that still falls over. A Windows
> (32bit) build is also fine.
> 
> It looks like it is falling over in IGXMLScanner2.cpp:1286 where it calls
> resetDocument() on the document handler. It ends up at BaseRefVectorOf.c:68
> with ThrowXMLwithMemMgr.
Since that's a template, the compiler has had to generate an 
instantiation of that class.  Where is the object code for that 
instantiation?

> 
> I'm setting a content handler and an error handler and using the
> SAX2XMLReader created from the XMLReaderFactory::createXMLReader. Using
> version 2.8.0.
> 
> It fails with a SIGILL, though in my various tweaking to try and get it
> working I've had an address align signal at some point too.
> 
> I suspect this is a linker issue somehow given that it works without the
> Oracle libraries linked in and on other platforms, but it's doing my head in
> and I'm not sure where to go from here.
> 
> Does this ring any bells with anyone?
I would check two things:

1. Verify that all of your binaries are linking with the same -A option. 
  That is, make sure you aren't mixing -AA and -AP.  I would suspect the 
Oracle library was built with -AP.

2. Verify that the Oracle library you're using isn't also linking with 
Xerces-C or some variant of the Xerces-C library.

Dave