开发者

Oracle 9 ProC precompiler segfault while reading pcsus.msb

开发者 https://www.devze.com 2023-03-23 06:24 出处:网络
I\'m trying to compile an old piece of software which includes the use of the ProC pre-compiler for Oracle.

I'm trying to compile an old piece of software which includes the use of the ProC pre-compiler for Oracle.

This software runs using Oracle 9 under Solaris 10, and uses the proc tool to convert .proc files to .c files before the real compiler runs to conver the .c to .o

When I try to run proc for any of the .proc files this happens.

# /avacm/nproducts//oracle/source/solaris_2.9/9.2/bin/proc define=__sun  define=PRE_COMP  code=ansi_c  mode=oracle  def_sqlcode=yes  threads=yes  include=/usr/include  include=../../../../../include  include=../../../../../include/rpcsvc  include=../../../../../aam/include  include=../../../../../aam/libs/libavaora/include datahost.proc

Pro*C/C++: Release 9.2.0.6.0 - Production on Tue Jul 26 19:06:20 2011

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

System default option values taken from: /avacm/nproducts//oracle/source/solaris_2.9/9.2//precomp/admin/pcscfg.cfg

Segmentation Fault (core dumped)

I then tries using truss to see what is actually happening.

   # truss -vall -wall -fall /avacm/nproducts//oracle/source/solaris_2.9/9.2/bin/proc define=__sun  define=PRE_COMP  code=ansi_c  mode=oracle  def_sqlcode=yes  threads=yes  include=/usr/include  include=../../../../../include  include=../../../../../include/rpcsvc  include=../../../../../aam/include  include=../../../../../aam/libs/libavaora/include datahost.proc

And these are the last couple of lines:

15775/1:        close(10)                                       = 0
15775/1:        open("sys/uio.h", O_RDONLY)                     Err#2 ENOENT
15775/1:        open("/usr/include/sys/uio.h", O_RDONLY)        = 10
15775/1:        fstat64(10, 0xFFBFB578)                         = 0
15775/1:            d=0x00800000 i=16783 m=0100644 l=1  u=0     g=2     sz=2885
15775/1:                at = Jul 26 18:50:45 GMT 2011  [ 1311706245 ]
15775/1:                mt = Mar 13 10:41:10 GMT 2009  [ 1236940870 ]
15775/1:                ct = May 10 19:03:47 GMT 2011  [ 1305054227 ]
15775/1:            bsz=8192  blks=6     fs=ufs
15775/1:        brk(0x00A475B0)                                 = 0
15775/1:        brk(0x00A495B0)                                 = 0
15775/1:        fstat64(10, 0xFFBFB420)                         = 0
15775/1:            d=0x00800000 i=16783 m=0100644 l=1  u=0     g=2     sz=2885
15775/1:                at = Jul 26 18:50:45 GMT 2011  [ 1311706245 ]
15775/1:                mt = Mar 13 10:41:10 GMT 2009  [ 1236940870 ]
15775/1:                ct = May 10 19:03:47 GMT 2011  [ 1305054227 ]
15775/1:            bsz=8192  blks=6     fs=ufs
15775/1:        ioctl(10, TCGETA, 0xFFBFB504)                   Err#25 ENOTTY
15775/1:        read开发者_JAVA百科(10, " / *\t C o p y r i g h t".., 8192)    = 2885
15775/1:        brk(0x00A495B0)                                 = 0
15775/1:        brk(0x00A4B5B0)                                 = 0
15775/1:        brk(0x00A4B5B0)                                 = 0
15775/1:        brk(0x00A4D5B0)                                 = 0
15775/1:        brk(0x00A4D5B0)                                 = 0
15775/1:        brk(0x00A4F5B0)                                 = 0
15775/1:        read(10, 0x00A45A9C, 8192)                      = 0
15775/1:        llseek(10, 0, SEEK_CUR)                         = 2885
15775/1:        close(10)                                       = 0
15775/1:        open("/avacm/nproducts//oracle/source/solaris_2.9/9.2//precomp/mesg/pcpus.msb", O_RDONLY) = 10
15775/1:        fcntl(10, F_SETFD, 0x00000001)                  = 0
15775/1:        lseek(10, 0, SEEK_SET)                          = 0
15775/1:        read(10, "1513 "011303\t\t\0\0\0\0".., 256)     = 256
15775/1:        open("/avacm/nproducts//oracle/source/solaris_2.9/9.2//slax/mesg/pxus.msb", O_RDONLY) Err#2 ENOENT
15775/1:        open("/avacm/nproducts//oracle/source/solaris_2.9/9.2//slax/mesg/pxus.msb", O_RDONLY) Err#2 ENOENT
15775/1:        close(10)                                       = 0
15775/1:        close(9)                                        = 0
15775/1:        close(8)                                        = 0
15775/1:        open("/avacm/nproducts//oracle/source/solaris_2.9/9.2//precomp/mesg/pcsus.msb", O_RDONLY) = 8
15775/1:        fcntl(8, F_SETFD, 0x00000001)                   = 0
15775/1:        lseek(8, 0, SEEK_SET)                           = 0
15775/1:        read(8, "1513 "011303\t\t\0\0\0\0".., 256)      = 256
15775/1:            Incurred fault #6, FLTBOUNDS  %pc = 0x0004CED8
15775/1:              siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
15775/1:            Received signal #11, SIGSEGV [default]
15775/1:              siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000

What I understand of this, is that while reading the pcsus.msb file, some string handling went wrong and it segfaulted.

I tried using different pcsus.msb files I found online, and some gave out different errors, but I cannot make it work.

The pstrack output of the core file does not help much either.

# pstack core
core 'core' of 15803:   /avacm/nproducts//oracle/source/solaris_2.9/9.2/bin/proc define=__sun 
 0004ced8 pcs      (0, ffbfeae4, 0, 1, ffbfd788, 2) + 37c
 00044dfc pc2main  (ffbfeb94, ffbff0ac, 1, 0, 544668, fe6ba518) + 1030
 00416d70 lpmcall  (51bac0, 51f660, 51bb68, c, ffbff780, 51b7a0) + 46c
 004129a4 lpmpmai  (4, ffbff534, d, ffbff74c, ff000000, 80808080) + 178
 0003e688 main     (d, ffbff74c, ffbff784, 513c00, ff2a0100, 0) + f0
 0003e570 _start   (0, 0, 0, 0, 0, 0) + 108

Any pointers I can try to fix this?

Thanks, Javier


I was able to get a fresh Oracle 9i installation and its proc returned an error regarding "lloff_t":

PCC-S-02201, Encountered the symbol "lloff_t" when expecting one of the following

And I found a solution here:

http://www.orafaq.com/forum/t/59837/2/

Which is to add -D__sparc to the proc command line.

Javier

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号