Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Pro*C ? segmentation fault (core dumped)...
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
. ~/.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
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)
------>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
----->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;
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?
-- 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
![]() |
![]() |