" getline(cin,stream) "  gives segmentation fault error

Hi
In our application, we have a client and a server. Client and server communicate from network with inetd services. server listens the port with fd_set and get the the string with " select " as a command line argument. everything looks fine in communication but when the client sent a string over the network and server tries the read with getline(cin,stream ), application throws a segmentation fault error.
Code:
struct timeval t;
t.tv_sec=60;
t.tv_usec=0;
fd_set rset;
FD_ZERO(&rset);
FD_SET(STDIN_FILENO, &rset);
if(select(2, &rset,NULL,NULL,&t) == 0)
return NULL;
getline(cin, stream); *//application crashes here*
How can we solve this error ?
thanks for your kindly answers.
regards
aykut

Aykut wrote:
Thanks for your addressing Andrew. i have already tried it. nothing have changed. well, i have read SunStudio11_Cpp_UserGuide and applied what it says. i think, my error is not related with standart compiler. this caused by 3rdparty tools. i am working on them right now.It's quite possible that your 3rd party tools are causing your problem, but given the dependencies between the C++ run-time libraries and the thread library, the link statement you provided earlier still has problems:
/sunpro/11/bin/CC -xildoff /dev_obj/users/src/project/sample.o -L/dev_obj/users/src/lib -lcommonCode -L/3rdparty/sybase/ebf10536/lib -lblk_r -lct_r -lcs_r -lcomn_r -ltcl_r -lintl_r -L/usr/lib -lCstd -lnsl -ldl -lthread -lposix4 -lintl -lresolv -lsocket -lc -lcrypt -L/usr/perl5/5.00503/sun4-solaris/CORE -lperl /usr/perl5/5.00503/sun4-solaris/auto/DynaLoader/DynaLoader.a -L/3rdparty/roguewave/SUNPRO60/12s/lib -lctl12s8 -ldbt12s8 -ltls12s8 -L/3rdparty/roguewave/SUNPRO60/12s/lib -lstd12s8 -o /dev_obj/users/src/project/sampleYou should remove "-L/usr/lib -lCstd" from your link step, and probably "-lc" also.
Also, your compile steps include the "-staticlib=libC" option, but your link step does not. That may or may not cause problems. You can try adding it to your link step, but try that after removing the extra library options, because that option probably does nothing when supplied to a compile-only step.
Finally, what patch level are patches 108434 and 108434 at? The latest versions of those patches are 108434-24 and 108435-24:
http://developers.sun.com/sunstudio/downloads/patches/ss11_patches.html
In my experience, the patch levels have a huge impact on C++ run-time issues. Note that there are dramatic dependencies on the levels of those patches. Do not compile on a machine at 108434-24 and try running on a machine at 108434-14, for example. All your machines pretty much must be at the same patch level for these series of patches.
If none of that works, and you can't isolate the problem to your third-party tools, you can try using the newer thread library, located in /usr/lib/lwp and /usr/lib/lwp/64, IIRC (I don't have access to a Solaris 8 box right now to check). You can add "-R/usr/lib/lwp" to your link statement and pick up the newer thread model.
You should also explore upgrading Solaris. Solaris 8 is pretty much no longer supported and as you're finding out, there are some rather intricate dependencies under Solaris 8 that Sun really did a good job removing in Solaris 9 and especially Solaris 10.

Similar Messages

  • Streamer gives segmentation fault when trying to grab a picture.

    I'm testing streamer to grab output from my web camera.
    Creating video works fine.
    # streamer -q -c /dev/video0 -f rgb24 -r 3 -t 00:30:00 -o outfile.avi
    But grabbing an image, gives segmentation fault.
    # streamer -c /dev/video0 -b 16 -o outfile.jpeg
    files / video: JPEG (JFIF) / audio: none
    Segmentation fault
    I got the commands from http://tldp.org/HOWTO/html_single/Webcam-HOWTO/#COMMAND
    Am I doing something wrong?

    Some extra information: If I run xawtv I get a blank screen but I can take a snapshot by pressing 'j' or by using the remote:
    $ xawtv-remote snap jpeg full picture.jpeg
    This actually gets an image from the camera. When I take a picture or close the xawtv client it briefly flashes an image of what the camera is seeing before returning back to black/closing.
    I also get exactly the same error as on the link above.

  • Segmentation fault error while connecting from forms server

    Hi,
    From Oracle Forms application client, if I give sqlplus /nolog it works fine where as if I give sqlplus username/password@DATABASEBNAME, it is giving Segmentation fault error.
    Could any one help? This problem is existing if I execute the command as oracle account. If I execute as non-oracle user (who has all privileges to run oracle stuff and all environment varilables like HOME, LD_LIBRARY_PATH, CLASS_PATH etc all stuff are correctly set)
    Thanks in advance.

    Hi David,
    What is Gateway, How I have to setup, Please let me know.
    I tried according to the Demo, But still I am facing the same problem. Which system IP I have to put in the host details.
    Can u please let me know.
    Regards,
    Kumar.

  • Python-matplotlib: segmentation fault error

    Hi All!
    I'm new an the forum and for my first post I'd like to be expose an issue that I face with the matplotlib tool of python. More precisely, I recently used the apt package to install python, nympy and matplotlib on a linux 64b computer. Everything seemed to be working well expect that when I try to import matplotlib (import matplotlib.pyplot as m for eg.) I get a segmentation fault error.
    I´ve been trough several forums trying to apply their suggestions but I could not overcome this issues. Do anybody can give me insight on how to fix this?
    Thank you and have a good week-end!
    L1011

    Honestly I'm not familiar with apt on arch, but if you're comfortable installing software from AUR you can try the package build I just cooked up for matplotlib with python3 support:
    http://aur.archlinux.org/packages.php?ID=49810
    (I'm assuming you were trying to get python3 support, else you would have just installed python2-matplotlib with pacman...)

  • Segmentation Fault Error onR12.1.1(64 bit) Installation on Linux 5.5-64 bit

    Dear Friends,
    I am Installing a Oracle E-Biz R12.1.1 (64 bit) on Red Hat Enterprise Linux Server release 5.5 (Tikanga) 64-bit.
    While Installining R12.1.1, DB Tier, Configuration Upload failed. Also, when we checked from server, sqlplus, lsnrctl tnsping... every thing giving Segmentation Fault Error.
    All the RPM's are Installed.
    Please let me know if there is any fix.
    Regards,

    Hi;
    Please check log file for more details about error
    How to locate the log files and troubleshoot RapidWiz for R12 [ID 452120.1]
    Regard
    Helios

  • Pro c program in red hat linux gives segmentation fault

    Hi,
    I got Pro*C multithreaded program running redhat enterprise linux which gives segmentation faults at proc libraries.
    I wish if some one could help me in resolving this issue
    Below is valgrind log of the execution of one thread
    total valgrind summary
    Thread 2:
    ==31610== Invalid write of size 1
    ==31610== at 0x529DDF9: snlfgch (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52948E7: nlparhs (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52935FD: nlpaparse (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x5293378: nlpardfile (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x5292CED: nlpains (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x529661A: nlpacheck_n_load (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52962FE: nlpagap (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x531B103: nnfttran (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x531ADDC: nnftrne (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52121F5: nnfgrne (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52A8AB4: nlolgobj (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x5210121: nnfun2a (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== Address 0x67d0917 is 151 bytes inside a block of size 8,216 free'd
    ==31610== at 0x4A06084: free (vg_replace_malloc.c:366)
    ==31610== by 0x5292D88: nlpains (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x529661A: nlpacheck_n_load (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52962FE: nlpagap (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x531B103: nnfttran (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x531ADDC: nnftrne (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52121F5: nnfgrne (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52A8AB4: nlolgobj (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x5210121: nnfun2a (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x520FEAC: nnfsn2a (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x51F9B2D: niqname (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x5110603: kwfnran (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610==
    ==31610== Invalid read of size 8
    ==31610== at 0x52948F4: nlparhs (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52935FD: nlpaparse (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x5293378: nlpardfile (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x5292CED: nlpains (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x529661A: nlpacheck_n_load (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52962FE: nlpagap (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x531B103: nnfttran (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x531ADDC: nnftrne (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52121F5: nnfgrne (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52A8AB4: nlolgobj (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x5210121: nnfun2a (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x520FEAC: nnfsn2a (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== Address 0x0 is not stack'd, malloc'd or (recently) free'd
    ==31610==
    ==31610==
    ==31610== Process terminating with default action of signal 11 (SIGSEGV)
    ==31610== Access not within mapped region at address 0x0
    ==31610== at 0x52948F4: nlparhs (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52935FD: nlpaparse (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x5293378: nlpardfile (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x5292CED: nlpains (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x529661A: nlpacheck_n_load (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52962FE: nlpagap (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x531B103: nnfttran (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x531ADDC: nnftrne (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52121F5: nnfgrne (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x52A8AB4: nlolgobj (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x5210121: nnfun2a (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== by 0x520FEAC: nnfsn2a (in /opt/oracle/product10g/lib/libclntsh.so.10.1)
    ==31610== If you believe this happened as a result of a stack
    ==31610== overflow in your program's main thread (unlikely but
    ==31610== possible), you can try to increase the size of the
    ==31610== main thread stack using the --main-stacksize= flag.
    ==31610== The main thread stack size used in this run was 10485760.
    ==31610==
    ==31610== HEAP SUMMARY:
    ==31610== in use at exit: 3,207,418 bytes in 8,561 blocks
    ==31610== total heap usage: 13,879 allocs, 5,318 frees, 3,620,545 bytes allocated
    your help would be appreciated
    regards
    Sal

    One of the challenges in supporting Linux is the frequent changing of what ought to be stable public interfaces. We have found a number of changes in Red Hat 6 that affect the behavior of the compiler and applications built with the compiler.
    We plan to support RH 6 (and Oracle Linux 6) in a future release of Studio.

  • Segmentation fault error during data load in parallel with multiple rules

    Hi,
    I'm trying to do sql data load in parallel with multiple rules (4 or 5 rules, maybe), i'm getting a "segmentation fault" error. I tested 3 rules file and it worked fine. we're using Essbase system 9.3.2., with UDB (v8) as the sql data source. ODBC driver is DataDirect 5.2 DB2 Wire Protocol Driver (ARdb222). Please let me know if you have any information on this.
    thx.
    Y

    Hi Thad,
    I was wondering, if system is unicode or non unicode that should not matter the amount and currency field . As currencies are defined by SAP and it is in pure English at least a currency code part of 3 Chars. 
    Could this because of some incosistency of data ??
    I would like to know for Which currency  had some special characters it it in that particular record ??
    Hope that helps.
    Regards
    Mr Kapadia

  • Error during up2date oracle-validated gives segmentation fault

    Hi all,
    I am trying to run the up2date oracle-validated command for Oracle Enterprise Linux 5 64 bit and it
    fails on memory dump errors.
    [root@tstdb01]# up2date oracle-validated
    Fetching Obsoletes list for channel: el5_x86_64_latest...
    Fetching rpm headers...
    Segmentation fault
    Any ideas how to resolve this?
    Edited by: 783904 on Aug 19, 2010 9:09 AM

    # cat /etc/sysconfig/rhn/up2date
    # Automatically generated Red Hat Update Agent config file, do not edit.
    # Format: 1.0
    enableRollbacks[comment]=Determine if up2date should create rollback rpms
    enableRollbacks=0
    noSSLServerURL[comment]=Remote server URL without SSL
    noSSLServerURL=http://linux-update.oracle.com/XMLRPC
    useNoSSLForPackages[comment] =Use the noSSLServerURL for package, package list, and header fetching
    useNoSSLForPackages=0
    debug[comment]=Whether or not debugging is enabled
    debug=0
    noReplaceConfig[comment]=When selected, no packages that would change configuration data are automatically installed
    noReplaceConfig=1
    retrieveOnly[comment]=Retrieve packages only
    retrieveOnly=0
    keepAfterInstall[comment]=Keep packages on disk after installation
    keepAfterInstall=0
    systemIdPath[comment]=Location of system id
    systemIdPath=/etc/sysconfig/rhn/systemid
    serverURL[comment]=Remote server URL
    serverURL=https://linux-update.oracle.com/XMLRPC
    pkgSkipList[comment]=A list of package names, optionally including wildcards, to skip
    pkgSkipList=kernel*;
    pkgsToInstallNotUpdate[comment]=A list of provides names or package names of packages to install not update
    pkgsToInstallNotUpdate=kernel;kernel-modules;kernel-devel;
    adminAddress[comment]=List of e-mail addresses for update agent to communicate with when run in batch mode
    adminAddress=root@localhost;
    storageDir[comment]=Where to store packages and other data when they are retrieved
    storageDir=/var/spool/up2date
    fileSkipList[comment]=A list of file names, optionally including wildcards, to skip
    fileSkipList=;
    removeSkipList[comment]=A list of package names, optionally including wildcards that up2date will not remove
    removeSkipList=kernel*;
    enableProxy[comment]=Use a HTTP Proxy
    enableProxy=0
    retrieveSource[comment]=Retrieve source RPM along with binary package
    retrieveSource=0
    versionOverride[comment]=Override the automatically determined system version
    versionOverride=
    httpProxy[comment]=HTTP proxy in host:port format, e.g. squid.redhat.com:3128
    httpProxy=
    useGPG[comment]=Use GPG to verify package integrity
    useGPG=1
    gpgKeyRing[comment]=The location of the gpg keyring to use for package checking
    gpgKeyRing=/etc/sysconfig/rhn/up2date-keyring.gpg
    noBootLoader[comment]=To disable modification of the boot loader (lilo, silo, etc)
    noBootLoader=0
    noReboot[comment]=Disable the reboot actions
    noReboot=0
    networkRetries[comment]=Number of attempts to make at network connections before giving up
    networkRetries=5
    updateUp2date[comment]=Allow up2date to update itself when possible
    updateUp2date=1
    disallowConfChanges[comment]=Config options that can not be overwritten by a config update action
    disallowConfChanges=noReboot;sslCACert;useNoSSLForPackages;noSSLServerURL;serverURL;disallowConfChanges;
    sslCACert[comment]=The CA cert used to verify the ssl server
    sslCACert=/usr/share/rhn/ULN-CA-CERT
    [root@tstdb01 up2date]# *up2date --show-channels*el5_x86_64_latest                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Svrmgrl gives segmentation fault

    I recently upgraded from redhat 5.2 to redhat 6.0. A default
    intall of oracle errored out when it started creating the
    database objects. I did I a reinstall with out creating db
    objects and now when ever I try sqlplus or server manager I get
    a "Segmentation fault (core dumped)" error. I had oracle
    running on my old box. Does this have to do with the 2.2.5
    kernel?
    null

    : I did I a reinstall with out creating db objects and now when
    : ever I try sqlplus or server manager I get a "Segmentation fault
    : (core dumped)" error. I had oracle running on my old box.
    : Does this have to do with the 2.2.5 kernel?
    Not with kernel but with glibc 2.1 - see thread "Oracle8 and
    Redhat 6.0"
    above.
    Marek
    null

  • ./iasdeploy ? gives Segmentation fault

    We are running a Solaris 8, iplanet 6.5 and when testing the command iasdeploy we receive a very strange error message. Does this fault derive from running the deploy command while the webserver is running?
    Also, we did not shut down the KJS and KXS before deploying an ear file, is it necessary?
    /iplanet/ias6/ias/bin> ./iasdeploy ?
    # HotSpot Virtual Machine Error, Internal Error
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Error ID: 5448524541440E4350500631 FF
    # Problematic Thread:
    /iplanet/ias6/ias/bin/productversion[60]: 893 Segmentation Fault(coredump)
    # HotSpot Virtual Machine Error, Internal Error
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Error ID: 5448524541440E4350500631 FF
    # Problematic Thread:
    ./iasdeploy[65]: 906 Segmentation Fault(coredump)
    Thomas

    [root@lapdance ~]# bkhive /mnt/win/windows/system32/config/system key
    Bkhive [email protected]
    Segmentation fault
    [root@lapdance ~]#
    I get the same, and I have tried this on two different computers.  Did you get anywhere with the problem?
    Cheers

  • InDesign Server CS6 (MacOS) - JavaScripting & Troubleshooting "Bus error" or "Segmentation fault"

    I'm attempting to convert a workflow from InDesign CS5.5 Desktop with AppleScript to InDesign Server CS6 with JavaScript. It seems most of our templates work fine but every now and then I run into one that seems to work properly but right after we export to PDF and JPG which is the final step in the script I get either a Bus error or a Segmentation fault error. The files do export and the console sits idle for a few seconds then I get the crash. It doesn't seem to give me anything else and I can't find a crash dump or core file anywhere on disk to examine.
    The exact same input files on InDesign CS5.5 Desktop completing a very similar automation task via AppleScript work without an issue or error. I'm not certain if it's a problem with the way the InDesign files were put together, a version problem between a CS5.5 file and CS6, or something that I'm doing wrong in the script.
    Is there a way to get InDesign Server to go into debug or verbose mode so that it will show more than just two word errors on crash?  I've read a few people talking here about the debug version but every path I've found to get access to the debug version runs into a roadblock with a bad link.
    I would appreciate a point in the current right direction for how to debug these templates this script.

    Re: verbose mode. These are not InDesign error messages. They are system errors, saying that an app (InDesign?) crashed, went away, hence could not issue any kind of message. Crash logs are the place to start. If they don't help, and the crash is outside your code, after that it's over to the maintainer (Adobe?)
    Worth sharing a suitable crash log, as the list of routines active at the crash can narrow down issues.

  • Limitation on number of roles in oracle menu or segmentation fault in menu

    Hi All,
    Is there any limitation on the number of roles we can have in oracle menu? We are having around 300 roles created in our menu and after that if we try to add new role we are not able to compile the menu file. In the windows the form builder closes abruptly and in Linux it gives us segmentation fault error. Did anyone face the problem? Also if there is any solution then please provide the same.
    Please let me know.
    Thanks in advance!
    Ashish

    I just wonder how many forms do you have that you needed to create 300 roles. We normally create a role for one set of users. It means you've 300 different set of users for your application !!.

  • Segmentation Fault in db- put() fun with BDB ver 4.5.20/4.6.19 in linux

    I am working on porting an application that runs on sun solaris sparc (OS ver 5.8) with Berkeley DB ver 4.2.50 into suse linux [ Linux version 2.6.5-7.244-smp (gcc version 3.3.3 (SuSE Linux)) ]. I have compiled the application in linux and i am getting segmentation fault error while running the application. The error occurs while the objects are loaded from the database into berkeley cache. The application fails in db->put function while loading the objects. This segmentation fault error is not consistently occuring every time on the same object. Sometimes it throws the error while loading the first object itself or sometimes it throws after loading couple of objects. But the stack trace shows the same function whenever it crashes.
    Given below is the stack trace of the application when it throws SIGSEGV.
    [INFO] [-1756589376] 14:23:24.406 BerkeleyCache : restoring database table metadata for table [BSCOffice]...
    [INFO] [-1756589376] 14:23:24.406 BerkeleyCache : restoring database index metadata for table [BSCOffice]...
    [INFO] [-1756589376] 14:23:24.408 Obj [BSCOffice] Col [BSCOfficeId] : Typ[TEXT] MaxLen[10] Null[Y]
    [INFO] [-1756589376] 14:23:24.408 Obj [BSCOffice] Col [City] : Typ[TEXT] MaxLen[100] Null[Y]
    [INFO] [-1756589376] 14:23:24.408 BerkeleyCache : creating table [BSCOffice.tbl]
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 182927004352 (LWP 14638)]
    0x0000002a9643203a in __db_check_txn () from /opt/home/pesprm/local/db-4.6.19/db-4.6.19/build_unix/.libs/libdb-4.6.so
    (gdb) where
    #0 0x0000002a9643203a in __db_check_txn () from /opt/home/pesprm/local/db-4.6.19/db-4.6.19/build_unix/.libs/libdb-4.6.so
    #1 0x0000002a9643475b in __db_put_pp () from /opt/home/pesprm/local/db-4.6.19/db-4.6.19/build_unix/.libs/libdb-4.6.so
    #2 0x000000000043586b in esp::BerkeleyCache::insert_i (this=0x7fbfffe380, transactionId=866640768, pObj=0x7fbfffd3e0) at BerkeleyCache.cpp:838
    #3 0x00000000004119c5 in RefServer::loadObject (this=0x7fbfffdbe0, objInfo=<value optimized out>, strPrimaryObjName=@0x7fbfffd6f0,
    procParams=<value optimized out>) at BerkeleyCache.h:569
    #4 0x0000000000419166 in RefServer::loadObjects (this=0x7fbfffdbe0) at RefServer.cpp:579
    #5 0x0000000000419748 in main (argc=<value optimized out>, argv=<value optimized out>) at RefServer.cpp:296
    The code that calls the db->put() function is given below:
    <pre>
    bool BerkeleyCache::insert_i(size_t transactionId, const CachePersistable* pObj)
         bdbcache::Table* pTable = findTable_i(pObj->getPersistInfo().getObjectName());
         if (pTable == NULL)
              return false;
         DB_TXN* txnp = (DB_TXN*)transactionId;
         if (txnp == NULL)
              return false;
         bdbcache::Index* pPrimaryKey = pTable->getPrimaryKey();
         if (pPrimaryKey == NULL)
              return false;
         if (pTable->getDataOffset() == -1)
              pTable->setDataOffset( (int)(pObj->getDataBufferStartPos() - pObj->getDataStartPos()) );
         DB* pdb = pTable->getDB();
         int rc = 0;
         Synchronize sync(pPrimaryKey->getKeyBufferCriticalSection());
         pPrimaryKey->getKeyValues(pObj, pPrimaryKey->getKeyBuffer());
         DBT key, data;
         memset(&key, 0, sizeof(DBT));
         key.flags = DB_DBT_USERMEM;
         key.data = (void*)pPrimaryKey->getKeyBuffer().getBuffer();
         key.ulen = key.size = pPrimaryKey->getKeyBuffer().getBufferLength();
         memset(&data, 0, sizeof(DBT));
         data.flags = DB_DBT_USERMEM;
         if (pTable->isPrimaryDb())
              data.data = (void*)pObj->getDataBufferStartPos();
              data.ulen = data.size = pObj->getDataBufferSize();
              rc = pdb->put(pdb, (DB_TXN*)transactionId, &key, &data, DB_NOOVERWRITE);
         else
              const PersistInfo::Property* prop = pTable->getJoinProperty();
              Variant var = pObj->getValue( prop );
              int n = 0;
              switch (prop->_eType)
                   case PersistInfo::CHAR_ARRAY:
                   case PersistInfo::STRING:
                   case PersistInfo::VAR_STRING:
                        const char* pch = (const char*)var;
                        data.data = (void*)pch;
                        data.ulen = data.size = (int)strlen(pch) + 1;
                        break;
                   case PersistInfo::INT:
                        n = (int)var;
                        data.data = (void*)&n;
                        data.ulen = data.size = sizeof(int);
                        break;
              rc = pdb->put(pdb, (DB_TXN*)transactionId, &key, &data, 0);
         if (rc!= DB_SUCCESS)
              //_app.logError("BerkeleyCache : DB->put() failed [%s]", db_strerror(rc));
              _app.logInfo("ERROR:BerkeleyCache : DB->put() failed [%s]", db_strerror(rc));
              return false;
         return true;
    </pre>
    At the end of this function, the return value of db->put is checked for DB_SUCCESS. The application never executed this line when it throws SIGSEGV.
    I have tried using the BDB versions 4.5.20/4.6.18/4.6.19 with the application and it throws segmentation fault error with all versions of BDB. Following are the cache related configurable parameters that we use in our application.
    cache size = 16 MB
    page size = 16 KB
    max locks = 3000000
    dirty read = N
    We are using the Sybase Adaptive DB server running in Solaris/Linux servers. The same application that runs in Solaris connecting to Sybase DB (in solaris) is working perfectly fine. And the application that i am working in linux connects to the Sybase DB running in linux server.
    Please let me know what could be the issue that is causing our application to segmentation fault.
    Thanks
    Senthil

    I am working on porting an application that runs on
    sun solaris sparc (OS ver 5.8) with Berkeley DB ver
    4.2.50 into suse linux [ Linux version
    2.6.5-7.244-smp (gcc version 3.3.3 (SuSE Linux)) ].
    I have compiled the application in linux and i am
    getting segmentation fault error while running the
    application. The error occurs while the objects areWhich indicates in almost every typical case, for a well used library like berkeleydb, an application issue.
    loaded from the database into berkeley cache. The
    application fails in db->put function while loading
    the objects. This segmentation fault error is not
    consistently occuring every time on the same object.Also indicative of typical misuse of heap, pointer errors, or otherwise undefined behavior on the application's part.
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 182927004352 (LWP 14638)]
    0x0000002a9643203a in __db_check_txn () from
    /opt/home/pesprm/local/db-4.6.19/db-4.6.19/build_unix/
    .libs/libdb-4.6.so
    (gdb) where
    #0 0x0000002a9643203a in __db_check_txn () from
    /opt/home/pesprm/local/db-4.6.19/db-4.6.19/build_unix/
    .libs/libdb-4.6.so
    #1 0x0000002a9643475b in __db_put_pp () from
    /opt/home/pesprm/local/db-4.6.19/db-4.6.19/build_unix/
    .libs/libdb-4.6.so
    #2 0x000000000043586b in
    esp::BerkeleyCache::insert_i (this=0x7fbfffe380,
    transactionId=866640768, pObj=0x7fbfffd3e0) at
    BerkeleyCache.cpp:838
    #3 0x00000000004119c5 in RefServer::loadObject
    (this=0x7fbfffdbe0, objInfo=<value optimized out>,
    strPrimaryObjName=@0x7fbfffd6f0,
    procParams=<value optimized out>) at
    BerkeleyCache.h:569
    4 0x0000000000419166 in RefServer::loadObjects
    (this=0x7fbfffdbe0) at RefServer.cpp:579
    #5 0x0000000000419748 in main (argc=<value optimized
    out>, argv=<value optimized out>) at
    RefServer.cpp:296Did you build the libraries stripped or otherwise remove debugging information?
    run "file /opt/home/pesprm/local/db-4.6.19/db-4.6.19/build_unix/.libs/libdb-4.6.so"
    Also, if I'm not mistaken this is Linux you're porting to, right? Might want to drop the "/opt" Solaris-ism as you continue to port more to Linux.
    The code that calls the db->put() function is given
    below:
         if (pTable->getDataOffset() == -1)Does this return an unsigned or signed value?
    pTable->setDataOffset(
    t( (int)(pObj->getDataBufferStartPos() -
    pObj->getDataStartPos()) );You cast to int here, what's the background reasoning for it?
         DB* pdb = pTable->getDB();
         int rc = 0;You don't check pdb is valid.
    Synchronize
    e sync(pPrimaryKey->getKeyBufferCriticalSection());
    pPrimaryKey->getKeyValues(pObj,
    , pPrimaryKey->getKeyBuffer());
         DBT key, data;
         memset(&key, 0, sizeof(DBT));
         key.flags = DB_DBT_USERMEM;
    key.data =
    = (void*)pPrimaryKey->getKeyBuffer().getBuffer();Do you verify this is even valid? Have you also checked the code within a debugger and verified the logic is correct?
    key.ulen = key.size =
    = pPrimaryKey->getKeyBuffer().getBufferLength();Same thing.
         memset(&data, 0, sizeof(DBT));
         data.flags = DB_DBT_USERMEM;
         if (pTable->isPrimaryDb())
              data.data = (void*)pObj->getDataBufferStartPos();
              data.ulen = data.size = pObj->getDataBufferSize();How do we know these are even valid? You're coming from the perspective that your code makes no mistakes when I have a hunch it does.
    rc = pdb->put(pdb, (DB_TXN*)transactionId, &key,
    y, &data, DB_NOOVERWRITE);Right, and this will most definitely result in a segmentation violation if you don't pass it valid data.
    You're on Linux, I highly suggest you download and build Valgrind, run your application w/ valgrind --tool=memcheck, and get back to us. Also, don't strip debugging information from the berkeley db libraries during this phase of troubleshooting - especially when you're still porting something over.
    I have tried using the BDB versions
    4.5.20/4.6.18/4.6.19 with the application and it
    throws segmentation fault error with all versions of
    BDB.Because the issue isn't within BDB.
    We are using the Sybase Adaptive DB server running in
    Solaris/Linux servers. The same application that
    runs in Solaris connecting to Sybase DB (in solaris)
    is working perfectly fine.More correctly, it was working perfectly fine under Solaris. That doesn't even mean that it's not taking part in undefined behavior - it just means it "worked."

  • Segmentation fault during index

    Can anyone tell me where to start looking to find out why I'm getting a "Segmentation fault" error while trying to "addIndex" to a container via the dbxml command line? I'm getting this in my messages logs:
    dbxml[8825]: segfault at ecd3000 ip 00957faa sp bfc65060 error 4 in libdbxml-2.4.so[80f000+278000]
    OR
    dbxml[8937]: segfault at 0 ip 00493fea sp bfd7e07c error 4 in libc-2.8.so[41d000+163000]
    That's about all I know...
    Any thoughts?
    Thanks,
    Kevin

    Kevin,
    You'll have to debug this. If you have a debug build you can run the dbxml shell under gdb.
    Regards,
    George

  • Segmentation fault while install Grid 11.2.0.3

    Hi guys.
       I try to install  a stand alone oracle Database 11.2.0.3 with ASM over a RedHat 6.4 x86_64 Vmware server.
    Hardware
    4 cores
    32 GB RAM
    Vmware server 5.1.0
    Operating System
    RedHat 6.4 x86_64, 2.6.32-358.6.2.el6.x86_64 (update today with yum update).
    All needs packages installeds (i think so).
    Vmware tools installed and updated.
    Software
    p10404530_112030 software packages.
    Disk are mapping with udev/multipath, not ASM.
    Installing steps.
    1.- Execute enviroment shell.
    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
    ORACLE_SID=+ASM; export ORACLE_SID
    ORACLE_HOME=/u01/app/11.2.0.3/grid; export ORACLE_HOME
    PATH=$PATH:$ORACLE_HOME/bin:$BASE_PATH; export PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
    2.- Execute Grid runInstall
    3.- Chose Configurarion Grid for Standalone server.
    4.- ASM disk are founded, listed and selected.
    5.- Requirement validator only warning pdksh package, but Redhat 6 has ksh package (and it's installed). So, i ignored that warning and continue.
    6.- Install process start fine.
    7.- Install process want executed root scripts
    [root@oraclepruebas ~]# /u01/app/oraInventory/orainstRoot.sh
    Changing permissions of /u01/app/oraInventory.
    Adding read,write permissions for group.
    Removing read,write,execute permissions for world.
    Changing groupname of /u01/app/oraInventory to oinstall.
    The execution of the script is complete.
    [root@oraclepruebas ~]# /u01/app/11.2.0.3/grid/root.sh
    Performing root user operation for Oracle 11g
    The following environment variables are set as:
        ORACLE_OWNER= oracle
        ORACLE_HOME=  /u01/app/11.2.0.3/grid
    Enter the full pathname of the local bin directory: [/usr/local/bin]:
       Copying dbhome to /usr/local/bin ...
       Copying oraenv to /usr/local/bin ...
       Copying coraenv to /usr/local/bin ...
    Creating /etc/oratab file...
    Entries will be added to the /etc/oratab file as needed by
    Database Configuration Assistant when a database is created
    Finished running generic part of root script.
    Now product-specific root actions will be performed.
    Using configuration parameter file: /u01/app/11.2.0.3/grid/crs/install/crsconfig_params
    Creating trace directory
    LOCAL ADD MODE
    Creating OCR keys for user 'oracle', privgrp 'oinstall'..
    Operation successful.
    LOCAL ONLY MODE
    Successfully accumulated necessary OCR keys.
    Creating OCR keys for user 'root', privgrp 'root'..
    Operation successful.
    Failure with signal 11 from command: /u01/app/11.2.0.3/grid/bin/crsctl pin css -n oraclepruebas
    Pin node (/u01/app/11.2.0.3/grid/bin/crsctl pin css -n oraclepruebas) ... failed
    So, if i execute crsctl command, i have a nice Segmentation fault error, but if i try to execute another grid command, everyting is fine.
    [root@oraclepruebas oracle]#  /u01/app/11.2.0.3/grid/bin/crsctl
    Segmentation fault
    [root@oraclepruebas oracle]#
    [root@oraclepruebas oracle]#  /u01/app/11.2.0.3/grid/bin/ocrcheck
    Status of Oracle Cluster Registry is as follows :
             Version                  :          3
             Total space (kbytes)     :     262120
             Used space (kbytes)      :         92
             Available space (kbytes) :     262028
             ID                       :  756593197
             Device/File Name         : /u01/app/11.2.0.3/grid/cdata/localhost/local.ocr
                                        Device/File integrity check succeeded
                                        Device/File not configured
                                        Device/File not configured
                                        Device/File not configured
                                        Device/File not configured
             Cluster registry integrity check succeeded
             Logical corruption check succeeded
    This is weird, because i has installed a RAC 11.2.0.3 databases and standalone databases (all with grid) over Vmware and RedHat 6.4 and works fine. I have even compared the rpm packages between a functionally installation with this server and matched all !!!.
    I think that i am making a mistake, but i can't see it. I wan't reinstall or clone a funcionally virtual machine, because i want to learn with my mistake.
    I has googled too much and i searched into metalink but i can't find something similar.
    I apreciate your help, suggestions, anything.

    I had similar issue while installing 32bit version by mistake. Just to checkyou have x86-64 in the filenames of oracle software distribution
    p10404530_112030_Linux-x86-64_1of7.zip
    p10404530_112030_Linux-x86-64_2of7.zip
    p10404530_112030_Linux-x86-64_3of7.zip
    Regards
    Ed
    http://erudans.blogspot.com

Maybe you are looking for

  • Getting the name of the executing method

    Hello, I'm looking for a way to get, in one method, an String with its name. For example, if the method's name is "testOne", I'm looking for getting a String with the name "testOne" in a sentence of the method. Is there any way? Thx

  • Wi Fi connection dhcp bogus address

    New Iphone --- Im a network admin and im trying to set up my personal home wireless network on my I phone. linksys router -- yes mac filter wep 128 phone appears to connect but is diplaying bogus ip address's outside my network and wont allow me to c

  • Wrong Suggest of Businer partner code

    I have a  problem in sales order with approval procedure and inactive business partner: When im trying to enter an inactive  business partner code in the document, suggest me  this code and let me create the draft to be authorized. How i can disable

  • Software Inventory / Asset Intelligence

    Hello everyone, I'm trying to get an inventory of how many computers have Adobe Acrobat Standard XI (Acrobat.exe). I've followed this link to configure Asset Intelligence, and for the most part I think it's sort of working. When I click on Inventorie

  • File Structure in LMS OVA Image

    Just installed Cisco Prime LMS 4.2 as OVA image. Tried to configure SMTP Default Server from web console, but error shows: Unable to set the default SMTP server. Please see the nos.log for details. Does anyone know where is this nos.log file location