Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Pro*C ? segmentation fault (core dumped)...

Re: Pro*C ? segmentation fault (core dumped)...

From: <contact_me_at_detik.com>
Date: Mon, 05 Mar 2001 20:03:34 -0800
Message-ID: <F001.002C469C.20010305194049@fatcity.com>

thanks for your concern pals,

Off course i've been installing the software (precompiler) also I've been doing :
-- $proc iname=sample1.pc oname=sample1.c or even -- make -f demo_proc.mk build OBJS=sample1.o EXE=sample1 result is still the same :
make: *** [sample1.o]
segmentation fault (core dump)

1). is it to enlarge the size of SHMLBA that is defined in /usr/src/linux/include/asm/shmparam.h
2).could there be any option, that i can execute during compiling to enlarge the memory attachedd to a process ?

---> my bash_profile



# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then

        . ~/.bashrc
fi
# User specific environment and startup programs PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME=""
export USERNAME BASH_ENV PATH

ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/8.1.6;export ORACLE_HOME
ORACLE_SID=ora1;export ORACLE_SID

PATH=$PATH:/bin:/usr/bin,/usr/local/bin:/usr/bin/X11:$ORACLE_HOME/bin:$HOME/bin:.;export PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/product/jlib:.;export CLASSPATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib;export LD_LIBRARY_PATH ORA_NLS33=/u01/app/oracle/product/8.1.6/ocommon/nls/admin/data; export ORA_NLS33

NLS_LANG=american; export NLS_LANG
TNS_ADMIN=$ORACLE_HOME/network/admin
SHELL=/bin/sh:/bin/csh; export SHELL
TMPDIR=/u02/oracle/tmp; export TMPDIR

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH CLASSPATH LD_LIBRARY_PATH SHELL TMPDIR ORAENV_ASK=NO
export ORAENV_ASK
. /usr/local/bin/oraenv


----->Pcscfg.cfg


code=ansi_c
header=h
cpp_suffix=c
comp_charset=single_byte
dbms=v8
dynamic=ansi
fips=yes
mode=ansi
sqlcheck=semantics

include=($ORACLE_HOME/precomp/syshdr)
include=($ORACLE_HOME/precomp/public)
include=($ORACLE_HOME/rdbms/public)
include=($ORACLE_HOME/rdbms/demo)
include=($ORACLE_HOME/network/public)
include=($ORACLE_HOME/precomp/public)
include=($ORACLE_HOME/rdbms/public)
include=($ORACLE_HOME/rdbms/demo)
include=($ORACLE_HOME/network/public)

ltype=short
sys_include=($ORACLE_HOME/precomp/public,/usr/include,/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include,/usr/include)

------>issuing $ipcs -l


------>contents of /usr/src/linux/include/asm/shmparam.h


#ifndef _ASMI386_SHMPARAM_H
#define _ASMI386_SHMPARAM_H

/* address range for shared memory attaches if no address passed to shmat() */
#define SHM_RANGE_START 0x50000000
#define SHM_RANGE_END 0x60000000

/*
 * Format of a swap-entry for shared memory pages currently out in
 * swap space (see also mm/swap.c).
 *
 * SWP_TYPE = SHM_SWP_TYPE
 * SWP_OFFSET is used as follows:
 *
 *  bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
 *  bits 7..21: index of page within shared memory segment (SHM_IDX)
 *              (actually fewer bits get used since SHMMAX is so low)
 */

/*
 * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
#define SHM_IDX_SHIFT   (_SHM_ID_BITS)
#define _SHM_IDX_BITS   15
#define SHM_IDX_MASK    ((1<<_SHM_IDX_BITS)-1)

/*
 * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
#define SHMMAX 0x2000000                /* max shared seg size (bytes) */
/* Try not to change the default shipped SHMMAX - people rely on it */
#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
#define SHMMNI (1<<_SHM_ID_BITS)        /* max num of segs system wide */
#define SHMALL                          /* max shm system wide (pages) */ \
        (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
#define SHMLBA PAGE_SIZE                /* attach addr a multiple of this */

//I change the size of SHMSEG 
/*#define SHMSEG SHMMNI                 /* max shared segs per process */
#sdefine SHMSEG SHMMAX
#endif /* _ASMI386_SHMPARAM_H */

----->i forget how i get this, but should this be taken into account ?


Number of segments gotten by shmget() = 50 Number of segments attached by shmat() = 50 Segments attach at higher addresses

Default shared memory address = 0x406b0000
Lowest shared memory address  = 0x406b0000
Highest shared memory address = 0x46ab0000
Total shared memory range     = 106954752
Total shared memory attached  = 104857600
Largest single segment size   =  2097152
Segment boundaries (SHMLBA)   =     4096 (0x1000)
----------------------------------------------------------------------------------------------



--------->executing another example,still the same result :-(


#include <stdio.h>
#include <sqlca.h>

void sqlerror();

EXEC SQL BEGIN DECLARE SECTION;
char *connstr = "scott/tiger";
char db_ename[30];
int db_deptno;
EXEC SQL END DECLARE SECTION; void main() {

        EXEC SQL WHENEVER SQLERROR DO sqlerror(); 
        EXEC SQL WHENEVER SQLWARNING CONTINUE; 
        EXEC SQL CONNECT :connstr; 

        EXEC SQL WHENEVER NOTFOUND GOTO notfound; 
        EXEC SQL SELECT ENAME, DEPTNO
                 INTO   :db_ename, :db_deptno
                 FROM   EMP
                 WHERE  EMPNO = 7369;
                 
        printf("%s is in department %i\n", db_ename, db_deptno);
notfound:
        printf("Employee record not found in database.\n");
        return; 

}
void sqlerror() {
        printf("Stop Error:\t%25i\n", sqlca.sqlcode); 
        return; 

}
> I maybe replying the second time to a message that was posted twice, 
>but, WTH.  First thing is to check where LD_LIBRARY_PATH and SHLIB_PATH 
>point to.  Shoule be $ORACLE_HOME/lib:/usr/lib;
>
>DIck Goulet
>---------------------- Reply Separator 
____________________________________________________________

PS: Hampir lupa, kamu sudah punya pacar belum? Mau temenin aku Cari Cinta ngga di www.naver.co.id?



Get your free E-mail account at http://www.detik.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: contact_me_at_detik.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Mar 05 2001 - 22:03:34 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US