Segmentation Fault on Solaris JVM

Hi,
We have a Java application that executes all 'C' code through JNI code.
It works fine on NT but on solaris, the JVM suddenly crashes with a
segmentation fault. The crashes are random. We did a lot of debugging to ensure that the JVM doesn't crash when we are in the 'C' code.
We are using jdk1.4.0-b92. Any ideas?
Here's the stack trace from gdb:
Program received signal SIGSEGV, Segmentation fault.
0xfa535000 in ?? ()
(gdb) bt
#0 0xfa535000 in ?? ()
#1 0xfa53908c in ?? ()
#2 0xfa538f50 in ?? ()
#3 0xfa534480 in ?? ()
#4 0xfa52d560 in ?? ()
#5 0xfa405c54 in ?? ()
#6 0xfa405b88 in ?? ()
#7 0xfa405da8 in ?? ()
#8 0xfa405da8 in ?? ()
#9 0xfa405da8 in ?? ()
#10 0xfa400440 in ?? ()
#11 0xfe0fd9ac in __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ ()
#12 0xfe10f644 in __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_ ()
#13 0xfe10f4a4 in __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ ()
#14 0xfe10f42c in __1cMthread_entry6FpnKJavaThread_pnGThread__v_ ()
#15 0xfe10f13c in __1cKJavaThreadDrun6M_v_ ()
#16 0xfe0fc284 in _start ()

I had same segmentation fault and found out some char array variable's value length is over the size of char array variable. After fixed it, then it doesn't have that segmentation fault.
In Solaris, when I use java JFileChooser to select a file, the file path usually including a lot of "../" which causes a path over 200 char long. When I assigned that path to a char array variable which only have 200 char length, the segmentation fault happened.

Similar Messages

  • Segmentation Fault while installing on Solaris 9

    Hi,
    I was able to install Sun One Studio on Solaris 8 as root and was able to run it.
    However I am trying to re-install it on Solaris 9 as a user with super user previlages.
    I keep getting segmentation Fault when i run s1s5se-sol-sparc-en.bin
    Any pointers?
    thanks
    Sri

    Hi,
    From the develpers.sun.com KB:
    Installation
    S1S5 : Segmentation Fault when running Solaris S1S5 Installer
    Whenever i try to run the installer on a Solaris 9 machine as root I get Segmentation fault as follows-
    root[(k)sh]@score1# ./s1s5se-sol-sparc-en.bin Segmentation Fault root[(k)sh]@score1#
    Reason for Problem :-
    The cause of this Segementation Fault problem is due to a directory read permissions problem. The installer could not be invoked because the user did not have read permission to a directory above the one containing the installer.

  • Bash issue on solaris 8 ( Segmentation fault for non root users)

    Hi,
    This is solaris 8 on sparc and a NFS file server for the NIS+ environment. As supposed to be this file server is nis+ client.
    Now this issue happens only sometimes and goes away on its own but it did not this time.
    I connect to file server using ssh, system closes my session,
    this is ssh -vvv log , copied here : http://pastebin.ca/1633893Please note that my shell is /bin/bash. It worked 99% time but not now, nothing is changed on system.
    If I ssh root@fileserver then ssh connection works fine. root can also run bash command. and run other commands in bash
    For a normal user with csh if the user tries "bash" , then gets
    user@fileserver%> bash
    Segmentation Fault
    I am thinking this is somewhere related to rpc but I do not see any errors on nis+ server nor on fileserver.
    %>truss bash o/p is here :
    http://pastebin.ca/1633907Please let me know what is this issue related to. If by stopping/restarting a process helps that would be great.
    one more thing to note is, other nis+ clients can mount shares from this fileserver properly and authentication also works fine on them even for users with /bin/bash shell and bash does work manually also.
    If you need any other info, please let me know
    Please help!
    Thanks!

    Anyone any idea? I thought the truss o/p copied in pastebin might be very useful
    Additional info, for someone with /bin/tcsh as shell, when su - <user> from root account, following messages come up
    free(4b31688) bad block. (memtop = 4b7e400 membot = 9c9a0)
    free(4b31688) bad block. (memtop = 4b7e400 membot = 9c9a0)
    free(4b316c8) bad block. (memtop = 4b7e400 membot = 9c9a0)
    free(4b316c8) bad block. (memtop = 4b7e400 membot = 9c9a0)
    free(4b31448) bad block. (memtop = 4b7ec00 membot = 9c9a0)
    free(4b31448) bad block. (memtop = 4b7ec00 membot = 9c9a0)
    free(49fca08) bad block. (memtop = 4b7f400 membot = 9c9a0)
    free(49fca08) bad block. (memtop = 4b7f400 membot = 9c9a0)$ truss -f -t stat,open /bin/bash
    http://pastebin.ca/1635134

  • Solaris 9 live upgrade to solaris 10 segmentation fault

    pre-upgrade work:
    apply patch doc 72099
    upgrade live upgrade to solaris 10.
    lucreate-m /:/dev/dsk/c0t1d0s0:ufs -m /var:/dev/dsk/c0t1d0s1:ufs -m /opt:/dev/dsk/c0t1d0s3:ufs -n sol10
    it works well
    oot Environment Is Active Active Can Copy
    Name Complete Now On Reboot Delete Status
    sol9 yes yes yes no -
    sol10 yes no no yes -
    But luupgrade -u -n sol10 -s /sol11
    Validating the contents of the media </sol11>.
    The media is a standard Solaris media.
    The media contains an operating system upgrade image.
    The media contains <Solaris> version <11>.
    Constructing upgrade profile to use.
    Locating the operating system upgrade program.
    Checking for existence of previously scheduled Live Upgrade requests.
    Creating upgrade profile for BE <sol10>.
    Determining packages to install or upgrade for BE <sol10>.
    Performing the operating system upgrade of the BE <sol10>.
    CAUTION: Interrupting this process may leave the boot environment unstable
    or unbootable.
    /usr/sbin/luupgrade&#91;677&#93;: 6549 Segmentation Fault(coredump)
    ERROR: Installation of the packages from this media of the media failed; pfinstall returned these diagnostics:
    The Solaris upgrade of the boot environment <sol10> failed.

    I would break your mirror and do a liveupgrade on the available mirror. Then boot that disk.

  • Notify segmentation fault from C++ in JVM

    Hello,
    I have a Java application which is doing a request to a C++ application through JNI.
    The Java application does not wait the end of the treatment in the C++ part (The work done in the C++ part is about 30 minutes long).
    How could I be notified that a "segmentation fault" or such error occured in the C++ application, BEFORE doing another call with the java application???
    I want to be able to nofify the user that his request for the work performed in the C++ part has failed without waiting that the user requests again the information.
    Thanks a lot for your help.
    Tanguy

    Search on the topic "callback".

  • GNU compiled app crashes with signal 11: Segmentation Fault

    Hi Community,
    I know this is not a GNU oriented forum, but maybe this is a common issue.
    We have a C++ multi-threaded application running properly in Solaris 9 Sparc. Due to some issues mostly related to the NICs we needed to have the application running in Solaris 10 x86. The problem is that the compilation is ok (always with GNU) but during run time, we have the application crashing in different instructions because of a signal 11.
    It always crashes in a malloc call within the libstdc++.so.6
    It was compiled with the option -mt and -lthread. Is this a known problem? Do you recommend any direction to start seeking for a solution?
    Pls, find attached the gdb outcomes after the crash.
    Thanks in advance, Pablo
    quiterio{root}# gdb cord /usr/nguser/core
    GNU gdb 6.6
    Copyright (C) 2006 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "i386-pc-solaris2.10"...
    Reading symbols from /lib/libsocket.so.1...done.
    Loaded symbols for /lib/libsocket.so.1
    Reading symbols from /export/home/mysql/mysql-5.0.51/lib/mysql/libmysqlclient.so.15...done.
    Loaded symbols for /opt/mysql/mysql/lib/mysql/libmysqlclient.so.15
    Reading symbols from /lib/libnsl.so.1...done.
    Loaded symbols for /lib/libnsl.so.1
    Reading symbols from /lib/librt.so.1...done.
    Loaded symbols for /lib/librt.so.1
    Reading symbols from /lib/libthread.so.1...
    warning: Lowest section in /lib/libthread.so.1 is .dynamic at 00000074
    done.
    Loaded symbols for /lib/libthread.so.1
    Reading symbols from /usr/local/lib/libmysqlpp.so.2...done.
    Loaded symbols for /usr/local/lib/libmysqlpp.so.2
    Reading symbols from /usr/lib/libz.so.1...done.
    Loaded symbols for /usr/lib/libz.so.1
    Reading symbols from /usr/local/lib/libstdc++.so.6...done.
    Loaded symbols for /usr/local/lib/libstdc++.so.6
    Reading symbols from /lib/libm.so.2...done.
    Loaded symbols for /lib/libm.so.2
    Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
    Loaded symbols for /usr/local/lib/libgcc_s.so.1
    Reading symbols from /lib/libc.so.1...done.
    Loaded symbols for /lib/libc.so.1
    Reading symbols from /lib/libresolv.so.2...done.
    Loaded symbols for /lib/libresolv.so.2
    Reading symbols from /lib/libaio.so.1...done.
    Loaded symbols for /lib/libaio.so.1
    Reading symbols from /lib/libmd.so.1...done.
    Loaded symbols for /lib/libmd.so.1
    Reading symbols from /export/home/mysql/mysql-5.0.51/lib/mysql/libmysqlclient_r.so.15...done.
    Loaded symbols for /opt/mysql/mysql/lib/mysql/libmysqlclient_r.so.15
    Reading symbols from /lib/libpthread.so.1...
    warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
    done.
    Loaded symbols for /lib/libpthread.so.1
    Reading symbols from /lib/ld.so.1...done.
    Loaded symbols for /lib/ld.so.1
    Core was generated by `/export/home/egasco/cord/cord'.
    Program terminated with signal 11, Segmentation fault.
    #0  0xfebd4ad2 in t_splay () from /lib/libc.so.1
    (gdb) bt
    #0  0xfebd4ad2 in t_splay () from /lib/libc.so.1
    #1  0xfebd49b0 in t_delete () from /lib/libc.so.1
    #2  0xfebd46ea in realfree () from /lib/libc.so.1
    #3  0xfebd42ee in _malloc_unlocked () from /lib/libc.so.1
    #4  0xfebd4138 in malloc () from /lib/libc.so.1
    #5  0x080bdf64 in PMData::addData (this=0x818ae70, header=
              {_M_t = {_M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >> = {<No data fields>}, <No data fields>}, _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,std::basic_string<char, std::char_traits<char>, std::allocator<char> >,bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x81ade48, _M_left = 0x81c2310, _M_right = 0x81ae900}, _M_node_count = 8}}},
        data=0x81c1a20 "v=0\r\no=50 2890844526 2890842807 IN IP4 192.168.1.245\r\ns=SDP seminar\r\nc=IN IP4 192.168.1.245\r\nt= 0 0\r\nm=audio 9092 RTP/AVP 8 18\r\n", dest=ONEP_SIP) at PMData.cpp:23
    #6  0x080b3a52 in UserCall::process_initialization (this=0x81c2630, packet=0x81ad128) at UserCall.cpp:505
    #7  0x080b056f in UserCall::process (this=0x81c2630, packet=0x81ad128) at UserCall.cpp:132
    #8  0x080791d7 in ONEPPacketManager::processPacket () at ActionNotAllowException.h:15
    #9  0x080aa159 in onep_processing_thread (arg=0x8127e88) at CordApplication.cpp:1317
    #10 0xfec34672 in _thr_setup () from /lib/libc.so.1
    #11 0xfec34960 in L3_doit () from /lib/libc.so.1
    #12 0xfe7e2400 in ?? ()
    #13 0x00000000 in ?? ()

    A crash in malloc in multi-threaded code could be a bug in the system malloc or a failure to use a thread-safe malloc. The default Solaris malloc in /usr/lib/libc.so.* is thread-safe.
    A crash in malloc can also be caused by a heap corruption. Probably the most common causes of heap corruption are
    - writing beyond the bounds of a buffer or variable (off by one, for example)
    - deleting the same object more than once
    - using an invalid pointer:
    --- uninitialized
    --- pointing to a deleted object
    --- pointing to an out-of-scope object
    - failure to guard a critical region
    - failing to declare shared objects as volatile

  • 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 on program exit

    Hallo to everybody
    To whoever could help me, I wish to describe a big problem I am facing on my SOLARIS 9 server (UltraSparc III+).
    I am porting some C applications (without multithread) from UNIX SCO to Solaris 9 (I am using Sun Studio 10.),
    but all the executables generated end with a Segmentation Fault(coredump).
    For instance, when using dbx with my ua_wait executable, going step by step I can see the program execution without any error
    till the end of the program (the last closing brackets): after that, the program crashes.
    Additionally, when launching dbx with the following command:
    dbx -C -I /usr1/source/UA605/UTOOLS bin/ua_wait
    I get the following output:
    Reading ua_wait
    Reading ld.so.1
    Reading rtcapihook.so
    Reading libma.so
    Reading libm.so.1
    Reading libc.so.1
    Reading libdl.so.1
    Reading libc_psr.so.1
    Reading rtcaudit.so
    Reading libmapmalloc.so.1
    Reading libgen.so.1
    Reading rtcboot.so
    Reading librtc.so
    After setting the RTC features issuing the following command:
    (dbx) check -all
    and launching the execution with:
    (dbx) run
    I get the following output:
    Running: ua_wait
    (process id 10907)
    RTC: Enabling Error Checking...
    signal SEGV (no mapping at the fault address) in evfind at 0xf35148f4
    0xf35148f4: evfind+0x001c: ld &#91;%i1&#93;, %i5
    dbx: Stopped within call to '__rtc_init'. Starting new command interpreter
    Is there anyone who can help me to understand what's going on?
    Please note that all the executables must be 32 bit ones, as they have to link to a 32 bit shared library (libma.so) previously installed by another software.
    The output of the command
    file libma.so
    is:
    libma.so: ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped
    Additional information about the generation of the executables:
    In order to generate the ua_wait executable, I first compiled the object files in this way:
    cc -g -G -c <source-file> -DSun -xtarget=ultra3 -xarch=v8plus -xcode=pic32 -features=no%extinl
    then I compiled the static libraries this way:
    ar -c -r -u <static library> <object list>
    and then I built the executable through the LD command this way:
    ld -o ua_wait ua_wait.o staticlib1.a staticlib2.a staticlib3.a staticlib4.a libma.so -lm -lc
    The output of the
    file ua_wait
    command is
    ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
    Thanks in advance,
    Diego Curti

    Wouldn't this be more appropriate in one of the Sun Studio forums?
    http://forum.sun.com/index.jspa
    ... particularly for 32bit programming in a 64bit environment, on 64bit hardware ?
    This is actually a "how do I install my OS from CD media" forum.

  • Segmentation Fault

    Hi-
    I've experienced a segmentation fault from Berkeley DB XML Java bindings running in a web application (Tomcat). I'm not able to reproduce the error myself, but it's particularly troubling becasue it brought down the entire JVM that was running the web site. I'm not at all proficient with JNI, so maybe I'm not able to properly diagnose the problem from the logs. Below is the seg fault error that was logged by the JVM:
    # An unexpected error has been detected by Java Runtime Environment:
    #  SIGSEGV (0xb) at pc=0x063966c3, pid=20961, tid=1839516576
    # Java VM: Java HotSpot(TM) Server VM (11.3-b02 mixed mode linux-x86)
    # Problematic frame:
    # V  [libjvm.so+0x3966c3]
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    ---------------  T H R E A D  ---------------
    Current thread (0x08822c00):  JavaThread "http-8080-6" daemon [_thread_in_vm, id=21027, stack(0x6da2c000,0x6da4d000)]
    siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x00000000
    Registers:
    EAX=0x00000000, EBX=0x08b598d8, ECX=0x0006da4b, EDX=0x08822c00
    ESP=0x6da4b6d4, EBP=0x6da4b738, ESI=0x00000ffc, EDI=0x6db77880
    EIP=0x063966c3, CR2=0x00000000, EFLAGS=0x00010216
    Top of Stack: (sp=0x6da4b6d4)
    0x6da4b6d4:   00000000 67c9ecf8 67c9ece3 08b598d8
    0x6da4b6e4:   6db77880 6db77888 6db77c74 08822c00
    0x6da4b6f4:   00000000 00c5a1e3 6da4b718 08822c00
    0x6da4b704:   6e000048 00000011 67d0b11c 08822c00
    0x6da4b714:   0000001d 6da4b738 67c92fa4 08822d14
    0x6da4b724:   08a64cb4 08c4cddc 67d0b11c 00000000
    0x6da4b734:   0000001d 6da4b7f8 67c732db 08822d14
    0x6da4b744:   00000000 00000000 67c9ece3 6da4b7d0
    Instructions: (pc=0x063966c3)
    0x063966b3:   ac 8b 43 08 89 45 b0 8b 43 0c 89 45 b4 8b 45 0c
    0x063966c3:   8b 00 50 e8 35 02 fe ff 83 ec 0c 89 c6 50 e8 72
    Stack: [0x6da2c000,0x6da4d000],  sp=0x6da4b6d4,  free space=125k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V  [libjvm.so+0x3966c3]
    C  [libdbxml_java-2.4.so+0x2612db]  _Z17createCPPXmlValueP7JNIEnv_P8_jobjectPb+0xd3
    C  [libdbxml_java-2.4.so+0x26bbcd]  _Z24createCPPXmlQueryContextP7JNIEnv_P8_jobjectP7_jclass+0x969
    C  [libdbxml_java-2.4.so+0x27f2ff]  Java_com_sleepycat_dbxml_dbxml_1javaJNI_XmlManager_1prepare_1_1SWIG_10+0xe7
    j  com.sleepycat.dbxml.dbxml_javaJNI.XmlManager_prepare__SWIG_0(JLcom/sleepycat/dbxml/XmlManager;Ljava/lang/String;Lcom/sleepycat/dbxml/XmlQueryContext;)J+0
    j  com.sleepycat.dbxml.XmlManager.prepare(Ljava/lang/String;Lcom/sleepycat/dbxml/XmlQueryContext;)Lcom/sleepycat/dbxml/XmlQueryExpression;+7
    j  com.mycompany.dao.xml.XmlDao.executeQuery(Ljava/lang/String;Lcom/sleepycat/dbxml/XmlQueryContext;)Ljava/util/List;+14
    j  com.mycompany.dao.xml.XMLArticleDAO.getArticleId(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;+91
    j  com.mycompany.service.impl.DefaultArticleService.getArticleIdFromUrl(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;+7
    j  com.mycompany.controller.Level3Controller.handleRequestInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/springframework/web/servlet/ModelAndView;+236
    j  org.springframework.web.servlet.mvc.AbstractController.handleRequest(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/springframework/web/servlet/ModelAndView;+62
    j  org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/Object;)Lorg/springframework/web/servlet/ModelAndView;+6
    j  org.springframework.web.servlet.DispatcherServlet.doDispatch(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+224
    j  org.springframework.web.servlet.DispatcherServlet.doService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+219
    j  org.springframework.web.servlet.FrameworkServlet.processRequest(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+10
    j  org.springframework.web.servlet.FrameworkServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3
    j  javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+35
    j  javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30
    j  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+374
    j  org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101
    j  org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+804
    j  org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+365
    j  org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+64
    j  org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6
    j  org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+42
    j  org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+157
    j  org.apache.coyote.http11.Http11Processor.process(Ljava/net/Socket;)V+432
    j  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ljava/net/Socket;)Z+82
    j  org.apache.tomcat.util.net.JIoEndpoint$Worker.run()V+41
    j  java.lang.Thread.run()V+11
    v  ~StubRoutines::call_stub
    V  [libjvm.so+0x375c9d]
    V  [libjvm.so+0x5057f8]
    V  [libjvm.so+0x3755b0]
    V  [libjvm.so+0x37563d]
    V  [libjvm.so+0x3e5ca5]
    V  [libjvm.so+0x5cde5d]
    V  [libjvm.so+0x506929]
    C  [libpthread.so.0+0x53cc]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j  com.sleepycat.dbxml.dbxml_javaJNI.XmlManager_prepare__SWIG_0(JLcom/sleepycat/dbxml/XmlManager;Ljava/lang/String;Lcom/sleepycat/dbxml/XmlQueryContext;)J+0
    j  com.sleepycat.dbxml.XmlManager.prepare(Ljava/lang/String;Lcom/sleepycat/dbxml/XmlQueryContext;)Lcom/sleepycat/dbxml/XmlQueryExpression;+7
    j  com.mycompany.dao.xml.XmlDao.executeQuery(Ljava/lang/String;Lcom/sleepycat/dbxml/XmlQueryContext;)Ljava/util/List;+14
    j  com.mycompany.dao.xml.XMLArticleDAO.getArticleId(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;+91
    j  com.mycompany.service.impl.DefaultArticleService.getArticleIdFromUrl(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;+7
    j  com.mycompany.controller.Level3Controller.handleRequestInternal(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/springframework/web/servlet/ModelAndView;+236
    j  org.springframework.web.servlet.mvc.AbstractController.handleRequest(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/springframework/web/servlet/ModelAndView;+62
    j  org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/Object;)Lorg/springframework/web/servlet/ModelAndView;+6
    j  org.springframework.web.servlet.DispatcherServlet.doDispatch(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+224
    j  org.springframework.web.servlet.DispatcherServlet.doService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+219
    j  org.springframework.web.servlet.FrameworkServlet.processRequest(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+10
    j  org.springframework.web.servlet.FrameworkServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3
    j  javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+35
    j  javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30
    j  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+374
    j  org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101
    j  org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+804
    j  org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+365
    j  org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+64
    j  org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6
    j  org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+42
    j  org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+157
    j  org.apache.coyote.http11.Http11Processor.process(Ljava/net/Socket;)V+432
    j  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ljava/net/Socket;)Z+82
    j  org.apache.tomcat.util.net.JIoEndpoint$Worker.run()V+41
    j  java.lang.Thread.run()V+11
    v  ~StubRoutines::call_stub
    ---------------  P R O C E S S  ---------------
    Java Threads: ( => current thread )
      0x088d4800 JavaThread "http-8080-8" daemon [_thread_blocked, id=21029, stack(0x66e7d000,0x66e9e000)]
      0x08b3d400 JavaThread "http-8080-7" daemon [_thread_blocked, id=21028, stack(0x6da0b000,0x6da2c000)]
    =>0x08822c00 JavaThread "http-8080-6" daemon [_thread_in_vm, id=21027, stack(0x6da2c000,0x6da4d000)]
      0x08823400 JavaThread "http-8080-5" daemon [_thread_blocked, id=21022, stack(0x65cdf000,0x65d00000)]
      0x0881e000 JavaThread "http-8080-4" daemon [_thread_blocked, id=21019, stack(0x6da4d000,0x6da6e000)]
      0x08d75400 JavaThread "pool-2-thread-1" [_thread_blocked, id=21018, stack(0x660df000,0x66100000)]
      0x08976400 JavaThread "http-8080-3" daemon [_thread_blocked, id=21017, stack(0x6da6e000,0x6da8f000)]
      0x08976000 JavaThread "http-8080-2" daemon [_thread_blocked, id=21011, stack(0x6da8f000,0x6dab0000)]
      0x08c4c000 JavaThread "http-8080-1" daemon [_thread_blocked, id=21006, stack(0x6dd9d000,0x6ddbe000)]
      0x08b65000 JavaThread "TP-Monitor" daemon [_thread_blocked, id=21005, stack(0x6ddbe000,0x6dddf000)]
      0x08c5ec00 JavaThread "TP-Processor4" daemon [_thread_in_native, id=21004, stack(0x6dddf000,0x6de00000)]
      0x08c62c00 JavaThread "TP-Processor3" daemon [_thread_blocked, id=21003, stack(0x6df41000,0x6df62000)]
      0x08b66800 JavaThread "TP-Processor2" daemon [_thread_blocked, id=21002, stack(0x6df62000,0x6df83000)]
      0x08eab000 JavaThread "TP-Processor1" daemon [_thread_blocked, id=21001, stack(0x6df83000,0x6dfa4000)]
      0x08c53800 JavaThread "http-8080-Acceptor-0" daemon [_thread_in_native, id=21000, stack(0x6dfa4000,0x6dfc5000)]
      0x08c5d000 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=20999, stack(0x6df1c000,0x6df3d000)]
      0x08c9e400 JavaThread "pool-1-thread-1" [_thread_blocked, id=20998, stack(0x66ea5000,0x66ec6000)]
      0x08684800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=20996, stack(0x6e1e0000,0x6e201000)]
      0x08683000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=20995, stack(0x6e201000,0x6e282000)]
      0x0867e800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=20994, stack(0x6e282000,0x6e303000)]
      0x0867d000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=20993, stack(0x6e303000,0x6e324000)]
      0x0867b800 JavaThread "Surrogate Locker Thread (CMS)" daemon [_thread_blocked, id=20992, stack(0x6e324000,0x6e345000)]
      0x08668000 JavaThread "Finalizer" daemon [_thread_blocked, id=20991, stack(0x6e545000,0x6e566000)]
      0x08666c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=20990, stack(0x6e566000,0x6e587000)]
      0x08058800 JavaThread "main" [_thread_in_native, id=20962, stack(0xb7fc9000,0xb7fea000)]
    Other Threads:
      0x08663400 VMThread [stack: 0x6e587000,0x6e608000] [id=20989]
      0x08686800 WatcherThread [stack: 0x6e15f000,0x6e1e0000] [id=20997]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    par new generation   total 471872K, used 261897K [0x70490000, 0x90490000, 0x90490000)
      eden space 419456K,  60% used [0x70490000, 0x7fb7eb48, 0x89e30000)
      from space 52416K,  17% used [0x89e30000, 0x8a703c70, 0x8d160000)
      to   space 52416K,   0% used [0x8d160000, 0x8d160000, 0x90490000)
    concurrent mark-sweep generation total 524288K, used 0K [0x90490000, 0xb0490000, 0xb0490000)
    concurrent-mark-sweep perm gen total 22400K, used 22275K [0xb0490000, 0xb1a70000, 0xb4490000)
    ***DYNAMIC LIBRARIES TRUNCATED (POST TOO LONG)***
    VM Arguments:
    jvm_args: -Xmx1024m -Xms1024m -Xmn512m -Xss128k
    -XX:ParallelGCThreads=20 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8
    -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    -Djava.util.logging.config.file=/opt/apps/tomcat-6.0.18/conf/logging.properties -Djava.endorsed.dirs=/opt/apps/tomcat-6.0.18/endorsed
    -Dcatalina.base=/opt/apps/tomcat-6.0.18 -Dcatalina.home=/opt/apps/tomcat-6.0.18 -Djava.io.tmpdir=/opt/apps/tomcat-6.0.18/temp
    java_command: org.apache.catalina.startup.Bootstrap start
    Launcher Type: SUN_STANDARD
    Environment Variables:
    PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/opt/apps/php/bin:/opt/apps/apache2/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
    LD_LIBRARY_PATH=/usr/java/jdk1.6.0_13/jre/lib/i386/server:/usr/java/jdk1.6.0_13/jre/lib/i386:/usr/java/jdk1.6.0_13/jre/../lib/i386:/opt/dbxml/lib
    SHELL=/bin/bash
    Signal Handlers:
    SIGSEGV: [libjvm.so+0x6071f0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGBUS: [libjvm.so+0x6071f0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGFPE: [libjvm.so+0x5048b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGPIPE: [libjvm.so+0x5048b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGXFSZ: [libjvm.so+0x5048b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGILL: [libjvm.so+0x5048b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGUSR2: [libjvm.so+0x506d80], sa_mask[0]=0x00000000, sa_flags=0x10000004
    SIGHUP: [libjvm.so+0x506b20], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGTERM: [libjvm.so+0x506b20], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGQUIT: [libjvm.so+0x506b20], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    ---------------  S Y S T E M  ---------------
    OS:Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
    uname:Linux 2.6.9-89.ELsmp #1 SMP Mon Apr 20 10:34:33 EDT 2009 i686
    libc:glibc 2.3.4 NPTL 2.3.4
    rlimit: STACK 10240k, CORE 0k, NPROC 32742, NOFILE 1024, AS infinity
    load average:0.00 0.00 0.00
    CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 15 stepping 11, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3
    Memory: 4k page, physical 2073300k(27792k free), swap 5197384k(1995648k free)
    vm_info: Java HotSpot(TM) Server VM (11.3-b02) for linux-x86 JRE (1.6.0_13-b03), built on Mar  9 2009 01:16:42 by "java_re" with gcc 3.2.1-7a (J2SE release)
    time: Mon Jul  27 01:51:01 2009
    elapsed time: 11252 secondsI see some "thread blocked" statements, one of them being on the "Low Memory Detector" daemon. Not sure what to make of that.
    This is the method chain (from what I can tell) that caused the error:
    public String getArticleId(String type, String category, String normalizedTitle)
              throws DAOException, DataNotFoundDAOException {
              XmlQueryContext context = null;
              try{
                   context = this.getXmlManager().createQueryContext();
                   context.setEvaluationType(context.Eager);
                   context.setVariableValue("type", new XmlValue(type));
                   context.setVariableValue("category", new XmlValue(category));
                   context.setVariableValue("normalizedTitle", new XmlValue(normalizedTitle));
                   context.setVariableValue("containerName", new XmlValue(this.getContainer().getName()));
                   List<String> results = executeQuery(articleIdQuery, context);
                   if(results.size()>1){
                        logger.warn(String.format("more than one article found for type:%s, category:%s, normalized-title:%s", type, category, normalizedTitle));
                   }else if(results.size()==0){
                        throw new DataNotFoundDAOException(String.format("unable to find an article that matches type:%s, category:%s, normalized-title:%s", type, category, normalizedTitle));
                   /* dbxml returns query values far xml attributes in this format: {}id="this_is_the_id_we_want"
                    * we must extract the id before returning
                   String idString = results.get(0);
                   return idString.substring(idString.indexOf("\"")+1, idString.length()-1);
              }catch (XmlException e) {
                   throw new DAOException("there was a problem querying the database", e);
              } finally{
                   context.delete();
         protected List<String> executeQuery(String query, XmlQueryContext context)
                   throws DAOException {
              // Prepare (compile) the query
              List<String> xmlNodes = new ArrayList<String>();
              XmlQueryExpression qe = null;
              XmlResults results = null;
              try {
                   qe = xmlManager.prepare(query, context);
                   logger.debug("about to perform query: " + qe.getQuery());
                   results = qe.execute(context);
                   while (results.hasNext()) {
                        xmlNodes.add(results.next().asString());
              } catch (XmlException e) {
                   throw new DAOException("Unable to retrieve Page from db", e);
              } finally{
                   if(results != null){
                        results.delete();
                   if(qe != null){
                        qe.delete();
              return xmlNodes;
         }And this is the query that was passed into the method:
    collection($containerName)/article[type=$type and category=$category and normalized-title=$normalizedTitle]/@idSince this happened in a running web application, I unfortunately can't determine exactly which values were set for the query variables in this instance. However, by the nature of this application, those values are NOT taken from user input, so it would be safe to assume that the input comes from a valid, finite set of values.
    Any help would be greatly appreciated.
    Thanks
    Edited by: eric44 on Jul 27, 2009 2:34 PM

    Thanks Lauren.
    I have not yet applied the patch. I will do so shortly. However, I was able to do a bit more tracing, and I think I've gotten to the root of the problem. The seg fault is happening when a null value is used in a query. That is, a Java variable whose value is null is used as the constructor argument to new XmlValue(String s), and then that value is used in the query. I don't know exactly where the error is happening; the log seems a tad ambiguous. Again, I'm not really comfortable at the low-level, but it seems that the stack trace is rooted in the "prepare" java method, but then there seems to be some native trace directly referencing the creation of XmlValue
    Stack: [0x6da2c000,0x6da4d000],  sp=0x6da4b6d4,  free space=125k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V  [libjvm.so+0x3966c3]
    C  [libdbxml_java-2.4.so+0x2612db]  _Z17createCPPXmlValueP7JNIEnv_P8_jobjectPb+0xd3
    C  [libdbxml_java-2.4.so+0x26bbcd]  _Z24createCPPXmlQueryContextP7JNIEnv_P8_jobjectP7_jclass+0x969
    C  [libdbxml_java-2.4.so+0x27f2ff]  Java_com_sleepycat_dbxml_dbxml_1javaJNI_XmlManager_1prepare_1_1SWIG_10+0xe7
    j  com.sleepycat.dbxml.dbxml_javaJNI.XmlManager_prepare__SWIG_0(JLcom/sleepycat/dbxml/XmlManager;Ljava/lang/String;Lcom/sleepycat/dbxml/XmlQueryContext;)J+0
    j  com.sleepycat.dbxml.XmlManager.prepare(Ljava/lang/String;Lcom/sleepycat/dbxml/XmlQueryContext;)Lcom/sleepycat/dbxml/XmlQueryExpression;+7thanks again

  • Segmentation fault with apache plug-in

    The debug flag is on with apache.Getting the following message and core dump.wl 6.0, jdk 1.3, Solaris 2.6 105181-21, apache 1.3.12, gcc 2.8(FSF), make(3.7.6)os patch 10559-09 installed.[Fri Dec 29 14:57:11 2000] [notice] child pid 27661 exit signal Segmentation Fault (11), possible coredump in /usr/local/apache

    The debug flag is on with apache.Getting the following message and core dump.wl 6.0, jdk 1.3, Solaris 2.6 105181-21, apache 1.3.12, gcc 2.8(FSF), make(3.7.6)os patch 10559-09 installed.[Fri Dec 29 14:57:11 2000] [notice] child pid 27661 exit signal Segmentation Fault (11), possible coredump in /usr/local/apache

  • Set_thread_id Segmentation fault

    Hello,
    I want to use set_thread_it to do some multi-process work,but i always got a Segmentation fault when open a database after i use the set_thread_id function.
    the code is:
    static void thread_id(DB_ENV *, pid_t *, db_threadid_t *);
    int main(int argc, char *argv[])
    int ret = 0;
    DB_ENV *envp = NULL;
    DB *dbp = NULL;
    ret = db_env_create(&envp, 0);
    ret = envp->set_thread_count(envp, 16);
    ret = envp->open(envp, "master", DB_CREATE|DB_INIT_MPOOL|DB_THREAD|DB_INIT_TXN|DB_INIT_LOG|DB_RECOVER, 0);
    ret = envp->set_thread_id(envp, thread_id);
    ret = db_create(&dbp, envp, 0);
    printf("before dbopen %d.\n", pthread_self());
    ret = dbp->open(dbp, NULL, "test.db", NULL, DB_BTREE, DB_CREATE, 0);
    printf("after dbopen.\n");
    disconnection(&envp, &dbp);
    getchar();
    return 0;
    static void thread_id(DB_ENV dbenv, pid_t pid, db_threadid_t *tid)
    *pid = getpid();
    *tid = (unsigned int)pthread_self();
    printf("pid is %d, tid is %ld.\n", pid, tid);
    then i will got:
    pid is 4545, tid is -1208727872.
    before dbopen -1208727872.
    pid is 4545, tid is -1208727872.
    pid is 4545, tid is -1208727872.
    pid is 4545, tid is -1208727872.
    pid is 4545, tid is -1208727872.
    pid is 4545, tid is -1208727872.
    Segmentation fault
    but if i'm not use the set_thread_id func ,everything is ok.
    does anyone has ideas on that?
    BTW:system status is Linux xxx 2.6.9-42.10AXsmp #1 SMP Tue Mar 13 10:34:18 EDT 2007 i686 i686 i386 GNU/Linux

    Michael,
    Thanks for your reply.
    in above codes, if I change this line:
    *tid = (unsigned int)pthread_self();
    into :
    tid = & ((unsigned int)pthread_self());
    the Segmentation fault will not occur. But I dont know whether the actual function will achieved this way.
    You mention that if the system has POSIX, we dont have to setup this callback, our codes will run on Solaris/Linux, does this mean we can call the Env->failchk(0) directly without setting up "set_thread_id" and "set_is_alive" ?
    Thanks very much.

  • Apache - Weblogic plug-in - Segmentation fault. Please Help me!

    Hi all,
    Im trying to set up Apache weblogic plug-in, and im having problems with
    that.
    Im running Solaris 9 with Apache/1.3.26 (Unix) and Weblogic 7 with sp2.
    Here is what i did:
    I copied mod_wl_ssl.so from
    /bea/weblogic700/server/lib/solaris/mod_wl_ssl.so to /usr/apache/libexec
    Added entries in httpd.conf as
    LoadModule weblogic_module /usr/apache/libexec/mod_wl_ssl.so
    AddModule mod_weblogic.c
    <LocationMatch "\.jsp$">
    SetHandler weblogic-handler
    StatPath false
    </LocationMatch>
    <LocationMatch "/(service1|service2|service3)/">
    SetHandler weblogic-handler
    StatPath false
    </LocationMatch>
    <IfModule mod_weblogic.c>
    WebLogicHost 127.0.0.1
    WebLogicPort 7001
    HungServerRecoverSecs 300
    ConnectTimeoutSecs 5
    </IfModule>
    When i access the url with out specifying port 7001 it's not working.
    I checked the /var/apache/logs/error_log file. Im getting the error as
    child pid 805 exit signal Segmentation Fault (11)
    Am i missing anything here?
    Thank you
    Raja

    You may want to check the certifications for Solaris 9 and the Apache plug-in at
    http://e-docs.bea.com/wls/certifications/certifications/sun_solaris9.html#40366.
    It looks like you will have to upgrade to at least Apache 2.0.39. We had to do
    this on Solaris 8 as well.
    "Raja Balasubramanian" <[email protected]> wrote:
    Thank you Eric,
    I will do that
    Raja
    "Eric Gross" <[email protected]> wrote in message
    news:[email protected]...
    I believe this is going to require more debugging such as attachinga
    debugger(gdb) to Apache and getting a backtrace.
    I suggest opening up a support case.
    Regards,
    Eric
    "Raja Balasubramanian" <[email protected]> wrote in message
    news:[email protected]...
    Hi Eric,
    Thank you for the replies.
    I tried with the same test as you specified. Still im getting the
    same
    problem.
    [Mon Mar 10 13:57:21 2003] [notice] child pid 1184 exit signal
    Segmentation Fault (11)
    Im running Solaris 9 in SPARC platform. It's a Sun E450 server.
    Im using the default apache package which comes with Solaris 9. Ididn't
    do
    anything with apache.
    Bea website says that Weblogic 7 sp2 is certified for Soalris 9.
    That's
    y
    i
    installed Solaris 9.
    I tested the same on a Linux Machine (Redhat Linux 7.1 on IA). It
    works
    fine
    without any problem.
    How can i make things work?
    Thank you for your kind replies
    Raja
    "Eric Gross" <[email protected]> wrote in message
    news:[email protected]...
    Looks like it should work.
    Let's simplify your test:
    <Location /test>
    WebLogicHost 127.0.0.1
    WebLogicPort 7001
    Debug ALL
    DebugConfigInfo ON
    SetHandler weblogic-handler
    </Location>
    Try with just that.
    Another thing is that I am unsure as to whether we have tested
    with
    Solaris
    9. This is SPARC right? Also, can you outline the steps you took
    when
    building apache? Did you use GCC?
    Thanks,
    Eric
    "Raja Balasubramanian" <[email protected]> wrote
    in
    message
    news:[email protected]...
    Hi,
    Now i changed to mod_wl_ssl.so.
    And i changed the httpd.conf as
    LoadModule weblogic_module libexec/mod_wl_ssl.so
    <IfModule mod_weblogic.c>
    WebLogicHost 127.0.0.1
    WebLogicPort 7001
    Debug ALL
    DebugConfigInfo ON
    StatPath true
    HungServerRecoverSecs 300
    ConnectTimeoutSecs 5
    </IfModule>
    But im getting the same error. NO wlproxy.log file is created
    in my
    server.
    I tried Debug ON also. Still the same.
    Am i doing anything wrong?
    Please help me...
    Thank you
    Raja
    "Eric Gross" <[email protected]> wrote in message
    news:[email protected]...
    That means that your apache instance is compiled with -DEAPI
    and
    should
    use
    the mod_wl_ssl.so.
    Can you please try to set Debug ALL and get the log in
    /tmp/wlproxy.log
    and
    share that?
    Thanks,
    Eric
    "Raja Balasubramanian" <[email protected]> wrote
    in
    message
    news:[email protected]...
    Hi Eric,
    When im using mod_wl.so im getting warning from Apache as
    [Mon Mar 10 12:41:15 2003] [warn] Loaded DSO
    libexec/mod_wl.so
    uses
    plain Apache 1.3 API, this module might crash under
    EAPI!
    (please
    recompile it with -DEAPI)
    Thank you
    Raja
    "Eric Gross" <[email protected]> wrote in message
    news:[email protected]...
    Are you using modssl or any apache with EAPI compiled in?
    Otherwise, you should be using the mod_wl.so.
    As well, please set Debug ALL to see if we can get more
    debug.
    Thanks,
    Eric
    "Raja Balasubramanian" <[email protected]>
    wrote
    in
    message
    news:[email protected]...
    Hi all,
    Im trying to set up Apache weblogic plug-in, and im having
    problems
    with
    that.
    Im running Solaris 9 with Apache/1.3.26 (Unix) and Weblogic
    7
    with
    sp2.
    Here is what i did:
    I copied mod_wl_ssl.so from
    /bea/weblogic700/server/lib/solaris/mod_wl_ssl.so to/usr/apache/libexec
    Added entries in httpd.conf as
    LoadModule weblogic_module/usr/apache/libexec/mod_wl_ssl.so
    AddModule mod_weblogic.c
    <LocationMatch "\.jsp$">
    SetHandler weblogic-handler
    StatPath false
    </LocationMatch>
    <LocationMatch "/(service1|service2|service3)/">
    SetHandler weblogic-handler
    StatPath false
    </LocationMatch>
    <IfModule mod_weblogic.c>
    WebLogicHost 127.0.0.1
    WebLogicPort 7001
    HungServerRecoverSecs 300
    ConnectTimeoutSecs 5
    </IfModule>
    When i access the url with out specifying port 7001 it's
    not
    working.
    I checked the /var/apache/logs/error_log file. Im getting
    the
    error
    as
    child pid 805 exit signal Segmentation Fault
    (11)
    Am i missing anything here?
    Thank you
    Raja

  • Segmentation Fault(coredump) ...please  help me

    I have an application running under C / Pro C in Solaris and I have a program, it insertes rows automatically into a database (oracle) and generes a file in /tmp whith the information inserted, but whit some users the program sends an error message "Segmentation Fault(coredump)". what is the reason for this error messages...?
    the reason is user privileges or other reason?

    The problem could be a bug in your code or in our compiler. You will need to get a stack trace under dbx to see what caused the SEG-FAULT.

  • Weblogic segmentation fault on AIX

    My client has managed to find a bug in the JVM - version 1.4 for AIX. A coredump is available on request. The error is given by weblogic below:
    JVMDG217: Dump Handler is Processing Signal 11 - Please Wait.
    JVMDG303: JVM Requesting Java core file
    JVMDG304: Java core file written to /weblogic/user_projects/domains/mccdomain/javacore71260.1131115420.txt
    JVMDG215: Dump Handler has Processed Exception Signal 11.
    /weblogic/user_projects/domains/mccdomain/startWebLogic.sh[67]: 71260 Segmentation fault(coredump)
    java full version "J2RE 1.4.2 IBM AIX build ca142sr1a-20050209"
    Thanks and Regards
    Joseph.

    Sorry, I misunderstood the original question. I thought it was the C compiler (not the C++ compiler) that you were using. The problem you're seeing (I believe) is due to the fact that you're trying to modify static data. The initialization of the character pointer variable 's' creates a pointer to read only (static) data. When you try to change that data with the assignment, you get a segmentation violation.
    If, instead, you were to initialize the 's' variable as follows:
    #include <stdio.h>
    #include <ctype.h>
    #include <stdlib.h>
    #include <string.h>
    main() {
       char* r ;
       char s[] = "NONE,SITE,PANEL";
    /*   char *s = "NONE,SITE,PANEL"; */
       if(r = strchr(s, ',' )) {
          *r = '\0' ; //segmentation fault here, how to solve
    }The program would work as expected. This is because 's' now points at writeable data. You can see this by compiling the source into assembly with the -S option:
    % CC -S forum.cc
    % cat forum.s
    .section ".data",#alloc,#write
    .LI5:
    .ascii "NONE,SITE,PANEL\000"

  • Help needed on passwd segmentation fault

    Hi,
    I'm a newbie to Solaris and my question is in regards to Solaris 5.8, the binary for passwd has been corrupted as i overwrote it accidentally. I tried to copy the binary from the installaion CD, however, it is still giving me segmentation fault.
    passwd x
    New password:
    Re-enter new Password:
    Segmentation Fault - core dumped
    What are the solutions to this problem without going through the installation process again. Is the binary signed by any program for integrity? Or is there any website in sun that i can use to get the old binary?
    Thanks in advance.

    Use Solaris Native LDAP Client library and SUN's original nss_ldap.so.1 and pam_ldap.so.1.
    Do not use OpenLDAP Client library and PADL's libs, SUN never wants to support them, and you are on your own destiny.
    Gary

Maybe you are looking for