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."

Similar Messages

  • Segmentation fault when using snapshot isolation with Berkeley DB 6.1.19 and 5.1.29

    Hello,
    I have been experimenting with snapshot isolation with Berkeley DB, but I find that it frequently triggers a segmentation fault when write transactions are in progress.  The following test program reliably demonstrates the problem in Linux using either 5.1.29 or 6.1.19. 
    https://anl.app.box.com/s/3qq2yiij2676cg3vkgik
    Compilation instructions are at the top of the file.  The test program creates a temporary directory in /tmp, opens a new environment with the DB_MULTIVERSION flag, and spawns 8 threads.  Each thread performs 100 transactional put operations using DB_TXN_SNAPSHOT.  The stack trace when the program crashes generally looks like this:
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7ffff7483700 (LWP 11871)]
    0x00007ffff795e190 in __memp_fput ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    (gdb) where
    #0  0x00007ffff795e190 in __memp_fput ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #1  0x00007ffff7883c30 in __bam_get_root ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #2  0x00007ffff7883dca in __bam_search ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #3  0x00007ffff7870246 in ?? () from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #4  0x00007ffff787468f in ?? () from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #5  0x00007ffff79099f4 in __dbc_iput ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #6  0x00007ffff7906c10 in __db_put ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #7  0x00007ffff79191eb in __db_put_pp ()
       from /usr/lib/x86_64-linux-gnu/libdb-5.1.so
    #8  0x0000000000400f14 in thread_fn (foo=0x0)
        at ../tests/transactional-osd/bdb-snapshot-write.c:154
    #9  0x00007ffff7bc4182 in start_thread (arg=0x7ffff7483700)
        at pthread_create.c:312
    #10 0x00007ffff757f38d in clone ()
        at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
    I understand that this test program, with 8 concurrent (and deliberately conflicting) writers, is not an ideal use case for snapshot isolation, but this can be triggered in other scenarios as well.
    You can disable snapshot isolation by toggling the value of the USE_SNAP #define near the top of the source, and the test program then runs fine without it.
    Can someone help me to identify the problem?
    many thanks,
    -Phil

    Hi Phil,
       We have taken a look at this in more detail and there was a bug in the code.   We have fixed the bug.     We will roll it into our next 6.1 release that we do.   If you would like an early patch that will go on top of 6.1.19, please email me at [email protected], reference this forum post and I can get a patch sent out to you.   It will be a .diff file that apply on the source code and then rebuild the library.  Once again thanks for finding the issue, and providing a great test program which tremendously helped in getting this resolved.
    thanks
    mike

  • Segmentation fault with just one user

    Hi,
    When I try to close a toolwindow in an application (it's iViewMediaPro), the app crashes. Console says, there's a segmentation fault. This happens only with one useraccount (adminrights). I deleted .pref-files, reinstalled the software, emptied the preferencesfolder in the users library and started the app then, nothing helps.
    Any ideas to solve the problem?
    Thanks for help
    Wolfgang

    Are you implying that you can run that app in other accounts without any problems? If so, then there's corruption or a conflict within the original account, usually associated with preference files. See my response in http://discussions.apple.com/message.jspa?messageID=8664734 on how to resolve those.

  • Any workarounds for the X11 apps segmentation faults on intel with 10.4.8 ?

    Hi,
    We've an X11 application, compiled for PPC, which runs fine with a G5 iMac on 10.4.8. However, it crashes with a segmentation fault on a MacBook Pro with 10.4.8 (running through Rosetta).
    Searching the web, we found that this seems to be a widespread problem for X11 apps running on Intel Macs with 10.4.8.
    Has this been submitted as an important bug to Apple?
    Are there any workarounds for it?
    Is the problem specific to PPC-only builds, or does it also happen with Universal builds?
    Thank you for any hints you could give about this,
    cesar
      Mac OS X (10.4.8)  

    A powerpc-binary program running under Rosetta can only load powerpc-binary modules...can't cross in and out of emulation within a single process. Perhaps your program is trying to load a module from X11 that is present as an intel-only binary? Rosetta is certainly no future-looking cure-all, just a stop-gap to allow one to keep using older stuff, and it is kinda fragile sometimes. If your target audience is both powerpc and intel machines, compile as a universal binary so it's native for everyone.

  • Segmentation fault when using jni application

    Hi I have a segmentation fault whe i use jni with a c++ program, i don't know how to read hs_err_pid....log, can someone help me to analyse this file
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # SIGSEGV (0xb) at pc=0x9704e824, pid=15092, tid=2983283632
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_15-b04 mixed mode, sharing)
    # Problematic frame:
    # C 0x9704e824
    --------------- T H R E A D ---------------
    Current thread (0x08379000): JavaThread "Xxxxxxxx main loop #1 (machine)" [_thread_in_native, id=15101]
    siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x9704e824
    Registers:
    EAX=0xb1f9c030, EBX=0xb1edafa0, ECX=0x48411fc8, EDX=0x08377218
    ESP=0xb1d13bfc, EBP=0xb1d13c18, ESI=0xb1f1020a, EDI=0xb1edc5a8
    EIP=0x9704e824, CR2=0x9704e824, EFLAGS=0x00010286
    Top of Stack: (sp=0xb1d13bfc)
    0xb1d13bfc: b1e78eb5 b1f9c030 48411fc8 b1e78e2b
    0xb1d13c0c: b1f9b494 b1d13c50 b0786e50 b1d13c78
    0xb1d13c1c: b1f6a332 b0786e50 48411fc8 b1d13c48
    0xb1d13c2c: b7bca34c 083790c0 b1d13c40 08410e58
    0xb1d13c3c: 00a0b574 b1f9c030 0838b2e0 b074ed18
    0xb1d13c4c: b1fca214 b1f9c360 0838b2e0 b072e2d8
    0xb1d13c5c: b1fb761c 08373ce8 b1d13c94 b1f6a16f
    0xb1d13c6c: b1f9b494 08373c08 00000001 b1d13cc8
    Instructions: (pc=0x9704e824)
    0x9704e814:
    [error occurred during error reporting, step 100, id 0xb]
    Stack: [0xb1c94000,0xb1d15000), sp=0xb1d13bfc, free space=510k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C 0x9704e824
    C [libxxxxxxxxxx.so.1.6+0x7d332] _ZN10MyApplication12Route4tickEj+0x1ce
    C [libxxxxxxxxxx.so.1.6+0x34248] _ZN10MyApplication4Core8workEj+0x34
    C [libyyyyyy.so+0x15457] ZN5CCore8mainLoopEP7JNIEnv+0x17f
    C [libyyyyyy.so+0x1f299] Java_com_xx_xxxxxxxx_xxxxxxxximpl_jni_JCore_run+0x35
    j com.xx.xxxxxxxx.xxxxxxxximpl.jni.JCore.run()V+0
    v ~StubRoutines::call_stub
    V [libjvm.so+0x17b2bc]
    V [libjvm.so+0x28fed8]
    V [libjvm.so+0x17ab15]
    V [libjvm.so+0x17abae]
    V [libjvm.so+0x1f2b15]
    V [libjvm.so+0x2f9933]
    V [libjvm.so+0x290ae8]
    C [libpthread.so.0+0x5371]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j com.xx.xxxxxxxx.xxxxxxxximpl.jni.JCore.run()V+0
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    =>0x08379000 JavaThread "Xxxxxxxx main loop #1 (machine)" [_thread_in_native, id=15101]
    0x083634d8 JavaThread "Thread-0" [_thread_in_native, id=15100]
    0x080a5c60 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=15098]
    0x080a47a8 JavaThread "CompilerThread0" daemon [_thread_blocked, id=15097]
    0x080a3850 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=15096]
    0x0809dbe8 JavaThread "Finalizer" daemon [_thread_blocked, id=15095]
    0x0809bdb8 JavaThread "Reference Handler" daemon [_thread_blocked, id=15094]
    0x0805caa0 JavaThread "main" [_thread_in_native, id=15092]
    Other Threads:
    0x0809a940 VMThread [id=15093]
    0x080a71d0 WatcherThread [id=15099]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 576K, used 515K [0x88bc0000, 0x88c60000, 0x890a0000)
    eden space 512K, 95% used [0x88bc0000, 0x88c3a560, 0x88c40000)
    from space 64K, 40% used [0x88c40000, 0x88c46888, 0x88c50000)
    to space 64K, 0% used [0x88c50000, 0x88c50000, 0x88c60000)
    tenured generation total 1408K, used 918K [0x890a0000, 0x89200000, 0x8cbc0000)
    the space 1408K, 65% used [0x890a0000, 0x89185850, 0x89185a00, 0x89200000)
    compacting perm gen total 8192K, used 500K [0x8cbc0000, 0x8d3c0000, 0x90bc0000)
    the space 8192K, 6% used [0x8cbc0000, 0x8cc3d110, 0x8cc3d200, 0x8d3c0000)
    ro space 8192K, 68% used [0x90bc0000, 0x91142e10, 0x91143000, 0x913c0000)
    rw space 12288K, 48% used [0x913c0000, 0x91991640, 0x91991800, 0x91fc0000)
    Dynamic libraries:
    00113000-00121000 r-xp 00000000 03:01 6292457 /lib/tls/libpthread-2.3.4.so
    00121000-00123000 rwxp 0000d000 03:01 6292457 /lib/tls/libpthread-2.3.4.so
    00123000-00125000 rwxp 00123000 00:00 0
    0022c000-0023b000 r-xp 00000000 03:01 6292459 /lib/libresolv-2.3.4.so
    0023b000-0023d000 rwxp 0000f000 03:01 6292459 /lib/libresolv-2.3.4.so
    0023d000-0023f000 rwxp 0023d000 00:00 0
    002be000-002c5000 r-xp 00000000 03:01 6292458 /lib/libgcc_s-3.4.6-20060404.so.1
    002c5000-002c6000 rwxp 00007000 03:01 6292458 /lib/libgcc_s-3.4.6-20060404.so.1
    002e8000-003a8000 r-xp 00000000 03:01 10722848 /usr/lib/libstdc++.so.6.0.3
    003a8000-003ad000 rwxp 000bf000 03:01 10722848 /usr/lib/libstdc++.so.6.0.3
    003ad000-003b3000 rwxp 003ad000 00:00 0
    0087d000-0088f000 r-xp 00000000 03:01 6292465 /lib/libnsl-2.3.4.so
    0088f000-00891000 rwxp 00011000 03:01 6292465 /lib/libnsl-2.3.4.so
    00891000-00893000 rwxp 00891000 00:00 0
    00b99000-00bae000 r-xp 00000000 03:01 6292453 /lib/ld-2.3.4.so
    00bae000-00baf000 r-xp 00015000 03:01 6292453 /lib/ld-2.3.4.so
    00baf000-00bb0000 rwxp 00016000 03:01 6292453 /lib/ld-2.3.4.so
    00bb7000-00cdc000 r-xp 00000000 03:01 6292454 /lib/tls/libc-2.3.4.so
    00cdc000-00cdd000 r-xp 00124000 03:01 6292454 /lib/tls/libc-2.3.4.so
    00cdd000-00ce0000 rwxp 00125000 03:01 6292454 /lib/tls/libc-2.3.4.so
    00ce0000-00ce2000 rwxp 00ce0000 00:00 0
    00ce4000-00d05000 r-xp 00000000 03:01 6292455 /lib/tls/libm-2.3.4.so
    00d05000-00d07000 rwxp 00020000 03:01 6292455 /lib/tls/libm-2.3.4.so
    00d09000-00d0b000 r-xp 00000000 03:01 6292456 /lib/libdl-2.3.4.so
    00d0b000-00d0d000 rwxp 00001000 03:01 6292456 /lib/libdl-2.3.4.so
    08048000-08057000 r-xp 00000000 03:01 11715142 /usr/java/jdk1.5.0_15/bin/java
    08057000-08059000 rwxp 0000e000 03:01 11715142 /usr/java/jdk1.5.0_15/bin/java
    08059000-086b9000 rwxp 08059000 00:00 0
    88bc0000-88c60000 rwxp 88bc0000 00:00 0
    88c60000-890a0000 rwxp 88c60000 00:00 0
    890a0000-89200000 rwxp 890a0000 00:00 0
    89200000-8cbc0000 rwxp 89200000 00:00 0
    8cbc0000-8d3c0000 rwxp 8cbc0000 00:00 0
    8d3c0000-90bc0000 rwxp 8d3c0000 00:00 0
    90bc0000-91143000 r-xs 00001000 03:01 11698348 /usr/java/jdk1.5.0_15/jre/lib/i386/client/classes.jsa
    91143000-913c0000 rwxp 91143000 00:00 0
    913c0000-91992000 rwxp 00584000 03:01 11698348 /usr/java/jdk1.5.0_15/jre/lib/i386/client/classes.jsa
    91992000-91fc0000 rwxp 91992000 00:00 0
    91fc0000-92090000 rwxp 00b56000 03:01 11698348 /usr/java/jdk1.5.0_15/jre/lib/i386/client/classes.jsa
    92090000-923c0000 rwxp 92090000 00:00 0
    923c0000-923c4000 r-xs 00c26000 03:01 11698348 /usr/java/jdk1.5.0_15/jre/lib/i386/client/classes.jsa
    923c4000-927c0000 rwxp 923c4000 00:00 0
    b0500000-b0521000 rwxp b0500000 00:00 0
    b0521000-b0600000 --xp b0521000 00:00 0
    b0600000-b0636000 rwxp b0600000 00:00 0
    b0636000-b0700000 --xp b0636000 00:00 0
    b0700000-b0800000 rwxp b0700000 00:00 0
    b0873000-b0874000 --xp b0873000 00:00 0
    b0874000-b1c74000 rwxp b0874000 00:00 0
    b1c74000-b1c78000 r-xp 00000000 03:01 6291503 /lib/libnss_dns-2.3.4.so
    b1c78000-b1c7a000 rwxp 00003000 03:01 6291503 /lib/libnss_dns-2.3.4.so
    b1c94000-b1c97000 --xp b1c94000 00:00 0
    b1c97000-b1d15000 rwxp b1c97000 00:00 0
    b1d15000-b1d1b000 r-xs 00000000 03:01 10748120 /usr/lib/gconv/gconv-modules.cache
    b1fcb000-b1fdd000 r-xp 00000000 03:01 11603256 /usr/java/jdk1.5.0_15/jre/lib/i386/libnet.so
    b1fdd000-b1fde000 rwxp 00011000 03:01 11603256 /usr/java/jdk1.5.0_15/jre/lib/i386/libnet.so
    b1fde000-b1fe1000 --xp b1fde000 00:00 0
    b1fe1000-b205f000 rwxp b1fe1000 00:00 0
    b2089000-b214f000 r-xs 00000000 03:01 11698359 /usr/java/jdk1.5.0_15/jre/lib/ext/localedata.jar
    b214f000-b2152000 r-xs 00000000 03:01 11698358 /usr/java/jdk1.5.0_15/jre/lib/ext/dnsns.jar
    b2152000-b217d000 r-xs 00000000 03:01 11698357 /usr/java/jdk1.5.0_15/jre/lib/ext/sunpkcs11.jar
    b217d000-b21a4000 r-xs 00000000 03:01 11698356 /usr/java/jdk1.5.0_15/jre/lib/ext/sunjce_provider.jar
    b21a4000-b21a5000 --xp b21a4000 00:00 0
    b21a5000-b2225000 rwxp b21a5000 00:00 0
    b2225000-b2228000 --xp b2225000 00:00 0
    b2228000-b22a6000 rwxp b2228000 00:00 0
    b22a6000-b22a9000 --xp b22a6000 00:00 0
    b22a9000-b2327000 rwxp b22a9000 00:00 0
    b2327000-b232a000 --xp b2327000 00:00 0
    b232a000-b23a8000 rwxp b232a000 00:00 0
    b23a8000-b25a8000 r-xp 00000000 03:01 10717357 /usr/lib/locale/locale-archive
    b25a8000-b25ab000 --xp b25a8000 00:00 0
    b25ab000-b2629000 rwxp b25ab000 00:00 0
    b2629000-b262c000 --xp b2629000 00:00 0
    b262c000-b26aa000 rwxp b262c000 00:00 0
    b26aa000-b26ab000 --xp b26aa000 00:00 0
    b26ab000-b273c000 rwxp b26ab000 00:00 0
    b273c000-b2758000 rwxp b273c000 00:00 0
    b2758000-b2759000 rwxp b2758000 00:00 0
    b2759000-b2776000 rwxp b2759000 00:00 0
    b2776000-b2777000 rwxp b2776000 00:00 0
    b2777000-b2778000 rwxp b2777000 00:00 0
    b2778000-b277a000 rwxp b2778000 00:00 0
    b277a000-b2796000 rwxp b277a000 00:00 0
    b2796000-b279a000 rwxp b2796000 00:00 0
    b279a000-b27b6000 rwxp b279a000 00:00 0
    b27b6000-b27c5000 rwxp b27b6000 00:00 0
    b27c5000-b2841000 rwxp b27c5000 00:00 0
    b2841000-b2941000 rwxp b2841000 00:00 0
    b2941000-b4841000 rwxp b2941000 00:00 0
    b4841000-b50b0000 r-xs 00000000 03:01 11603318 /usr/java/jdk1.5.0_15/jre/lib/charsets.jar
    b50b0000-b50c5000 r-xs 00000000 03:01 11603283 /usr/java/jdk1.5.0_15/jre/lib/jce.jar
    b50c5000-b514a000 r-xs 00000000 03:01 11603316 /usr/java/jdk1.5.0_15/jre/lib/jsse.jar
    b514a000-b51b3000 rwxp b514a000 00:00 0
    b51b3000-b77db000 r-xs 00000000 03:01 11603320 /usr/java/jdk1.5.0_15/jre/lib/rt.jar
    b77db000-b77ea000 r-xp 00000000 03:01 11603253 /usr/java/jdk1.5.0_15/jre/lib/i386/libzip.so
    b77ea000-b77ec000 rwxp 0000e000 03:01 11603253 /usr/java/jdk1.5.0_15/jre/lib/i386/libzip.so
    b77ec000-b780d000 r-xp 00000000 03:01 11603251 /usr/java/jdk1.5.0_15/jre/lib/i386/libjava.so
    b780d000-b780f000 rwxp 00020000 03:01 11603251 /usr/java/jdk1.5.0_15/jre/lib/i386/libjava.so
    b780f000-b7818000 r-xp 00000000 03:01 6291506 /lib/libnss_files-2.3.4.so
    b7818000-b781a000 rwxp 00008000 03:01 6291506 /lib/libnss_files-2.3.4.so
    b7820000-b782b000 r-xp 00000000 03:01 11603250 /usr/java/jdk1.5.0_15/jre/lib/i386/libverify.so
    b782b000-b782c000 rwxp 0000b000 03:01 11603250 /usr/java/jdk1.5.0_15/jre/lib/i386/libverify.so
    b782c000-b7834000 rwxs 00000000 03:01 6619137 /tmp/hsperfdata_myname/15092
    b7834000-b783a000 r-xp 00000000 03:01 11603246 /usr/java/jdk1.5.0_15/jre/lib/i386/native_threads/libhpi.so
    b783a000-b783b000 rwxp 00006000 03:01 11603246 /usr/java/jdk1.5.0_15/jre/lib/i386/native_threads/libhpi.so
    b783b000-b783c000 rwxp b783b000 00:00 0
    b783c000-b783d000 r-xp b783c000 00:00 0
    b783d000-b7baf000 r-xp 00000000 03:01 11698345 /usr/java/jdk1.5.0_15/jre/lib/i386/client/libjvm.so
    b7baf000-b7bcd000 rwxp 00372000 03:01 11698345 /usr/java/jdk1.5.0_15/jre/lib/i386/client/libjvm.so
    b7bcd000-b7fe6000 rwxp b7bcd000 00:00 0
    bfe00000-bfe03000 --xp bfe00000 00:00 0
    bfe03000-c0000000 rwxp bfe03000 00:00 0
    ffffe000-fffff000 ---p 00000000 00:00 0
    VM Arguments:
    jvm_args: -Xcheck:jni -XX:+PrintCompilation
    java_command: myapplication
    Launcher Type: SUN_STANDARD
    Environment Variables:
    PATH=/home/myname/XXXXXXXX_PERF/bin:/usr/java/jdk1.5.0_15/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/myname/bin
    LD_LIBRARY_PATH=/usr/java/jdk1.5.0_15/jre/lib/i386/client:/usr/java/jdk1.5.0_15/jre/lib/i386:/usr/java/jdk1.5.0_15/jre/../lib/i386:/home/myname/XXXXXXXX/lib
    SHELL=/bin/bash
    DISPLAY=XXX.XXX.X.XXX:0.0
    Signal Handlers:
    SIGSEGV: [libjvm.so+0x32b740], sa_mask[0]=0x7ffbfeff, sa_flags=0x14000004
    SIGBUS: [libjvm.so+0x32b740], sa_mask[0]=0x7ffbfeff, sa_flags=0x14000004
    SIGFPE: [libjvm.so+0x28ef10], sa_mask[0]=0x7ffbfeff, sa_flags=0x14000004
    SIGPIPE: [libjvm.so+0x28ef10], sa_mask[0]=0x7ffbfeff, sa_flags=0x14000004
    SIGILL: [libjvm.so+0x28ef10], sa_mask[0]=0x7ffbfeff, sa_flags=0x14000004
    SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGUSR2: [libjvm.so+0x291360], sa_mask[0]=0x00000000, sa_flags=0x14000004
    SIGHUP: [libjvm.so+0x290d90], sa_mask[0]=0x7ffbfeff, sa_flags=0x14000004
    SIGINT: [libjvm.so+0x290d90], sa_mask[0]=0x7ffbfeff, sa_flags=0x14000004
    SIGQUIT: [libjvm.so+0x290d90], sa_mask[0]=0x7ffbfeff, sa_flags=0x14000004
    SIGTERM: [libjvm.so+0x290d90], sa_mask[0]=0x7ffbfeff, sa_flags=0x14000004
    --------------- S Y S T E M ---------------
    OS:Red Hat Enterprise Linux WS release 4 (Nahant Update 4)
    uname:Linux 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686
    libc:glibc 2.3.4 NPTL 2.3.4
    rlimit: STACK 20480k, CORE 0k, NPROC 16375, NOFILE 1024, AS infinity
    load average:3.46 1.36 0.50
    CPU:total 2 (cores per cpu 1, threads per core 2) family 15 model 4 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ht
    Memory: 4k page, physical 1034096k(389000k free), swap 0k(0k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_15-b04) for linux-x86, built on Feb 9 2008 01:37:00 by java_re with gcc 3.2.1-7a (J2SE release)
    Regards
    Fr�d�ric

    Simple - something is wrong with your C/C++ code.
    You have a pointer/memory bug.

  • Speex - Segmentation Fault

    During fresh archlinux installation I get below error:
    installing speex
    error: segmentation fault
    Please submit bug report with --debug if appropriate
    It is a dependency for gnome-shell.
    Eventhough I am at black&white terminal, whole screen becomes green and unreable.
    Any idea?

    During fresh archlinux installation I get below error:
    installing speex
    error: segmentation fault
    Please submit bug report with --debug if appropriate
    It is a dependency for gnome-shell.
    Eventhough I am at black&white terminal, whole screen becomes green and unreable.
    Any idea?

  • Ruby-enterprise 1.8.7-12: timeout.rb:60: [BUG] Segmentation fault

    Something in timeout.rb is making gem segfault.  There's discussion around the Internet about glibc 2.14 giving ruby a hard time, so perhaps this is relavant to the issue, being that we're on 2.15 now?
    $ sudo gem update --system
    /opt/ruby-enterprise/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault
    ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2012.02
    Where line 60 lives:
    52 def timeout(sec, klass = nil)
    53 return yield if sec == nil or sec.zero?
    54 raise ThreadError, "timeout within critical session" if Thread.critical
    55 exception = klass || Class.new(ExitException)
    56 begin
    57 x = Thread.current
    58 y = Thread.start {
    59 begin
    60 sleep sec
    61 rescue => e
    62 x.raise e
    63 else
    64 x.raise exception, "execution expired" if x.alive?
    65 end
    66 }
    67 yield sec
    68 # return true
    69 rescue exception => e
    70 rej = /\A#{Regexp.quote(__FILE__)}:#{__LINE__-4}\z/o
    71 (bt = e.backtrace).reject! {|m| rej =~ m}
    72 level = -caller(CALLER_OFFSET).size
    73 while THIS_FILE =~ bt[level]
    74 bt.delete_at(level)
    75 level += 1
    76 end
    77 raise if klass # if exception class is specified, it
    78 # would be expected outside.
    79 raise Error, e.message, e.backtrace
    80 ensure
    81 if y and y.alive?
    82 y.kill
    83 y.join # make sure y is dead.
    84 end
    85 end
    86 end

    Yeah! Solved!
    Install gcc45 from the AUR, compile and install it, then download the ruby-enterprise from the AUR and compile it like so:
    CC=gcc-4.5 makepkg
    Install the compiled Ruby EE package, and wham, it works.

  • Segment fault in concurrent access to BDB

    Hi, All
    I am extending a single thread BDB application to allow concurrent
    access to the DB from 2 threads, transaction is not needed.
    The environment is opened with the flag (DB_CREATE | DB_INIT_MPOOL | DB_INIT_LOCK).
    Then I open a new DB under the same directory in each thread, and
    modify the DB simultaneously.  my expectation was that each thread
    will not conflict with each other and in turn improve the
    throughput. While the program constantly crashed because of segment
    fault in file (src/lock/lock.c:832, both threads crashed on this
    line).
    I inspected the back trace, the only suspecious thing I found is that
    the 2 threads are using the same locker object[1], so I'm wondering if
    anyone has similar experience implementing concurrent BDB
    applications? And what's possible cause of my problem and possible
    fixes? Thanks.
    [1]
    thread 1: #0  0x00002aaab3651a7f in __lock_get_internal (lt=0x13cbda0, sh_locker=0x2aab0119f258, flags=4, obj=0x1c55650, lock_mode=DB_LOCK_WRITE, timeout=0, lock=0x2aab449fe8a0)
        at ../src/lock/lock.c:832
    thread 2: #0  0x00002aaab3651a7f in __lock_get_internal (lt=0x13cbda0, sh_locker=0x2aab0119f258, flags=4, obj=0x13da640, lock_mode=DB_LOCK_WRITE, timeout=0, lock=0x2aab3ffc78a0)
        at ../src/lock/lock.c:832

    Hi, Mike
    Thanks for the timely reply!
    I referred to the Berkeley DB Transaction Guide, while the doc does not mention the consequence if you violate the scenario requirement. 
    1. I choose the default Data Store model, and my program will allow multiple writers, what's the expected behavior? 2 threads using the same locker compete different locks is supposed to segment fault?  I'm also curious about how a put(key, data) correspond to a locker, keys in the memory page map to the same locker?
    2. I try to enable concurrent reader & writer without transaction, while the guide assumes transaction is enable, is Data Store able to achieve this? Or at least Concurrent Data Store is required?
    Thank you very much!

  • Conduit crashes with segmentation fault

    I just installed a fresh install of Arch Linux with xfce installed. Everything is up and running. I wanted conduit to synchronize evolution data with my desktop. I was using Xubuntu and everything was fine. But Arch is 2x faster than xubuntu...
    The compilation of conduit went right, reported no error.
    I run XFCE but I tried to run it from gnome also just if it was an dependency error... Didn't work. I tried to install firefox from sources since it was an run-mozilla.sh segmentation error. Didn't work.
    Here's my rc.conf
    # /etc/rc.conf - Main Configuration for Arch Linux
    # LOCALIZATION
    # LOCALE: available languages can be listed with the 'locale -a' command
    # HARDWARECLOCK: set to "UTC" or "localtime"
    # USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
    # TIMEZONE: timezones are found in /usr/share/zoneinfo
    # KEYMAP: keymaps are found in /usr/share/kbd/keymaps
    # CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
    # CONSOLEMAP: found in /usr/share/kbd/consoletrans
    # USECOLOR: use ANSI color sequences in startup messages
    LOCALE="fr_CA.utf8"
    HARDWARECLOCK="local"
    USEDIRECTISA="no"
    TIMEZONE="America/Montreal"
    KEYMAP="cf"
    CONSOLEFONT=
    CONSOLEMAP=
    USECOLOR="yes"
    # HARDWARE
    # MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
    # MOD_BLACKLIST: Prevent udev from loading these modules
    # MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
    # NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
    MOD_AUTOLOAD="yes"
    #MOD_BLACKLIST=() #deprecated
    MODULES=(uvcvideo)
    # Scan for LVM volume groups at startup, required if you use LVM
    USELVM="no"
    # NETWORKING
    # HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
    HOSTNAME="djo-laptop"
    # Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
    # Interfaces to start at boot-up (in this order)
    # Declare each interface then list in INTERFACES
    # - prefix an entry in INTERFACES with a ! to disable it
    # - no hyphens in your interface names - Bash doesn't like it
    # DHCP: Set your interface to "dhcp" (eth0="dhcp")
    # Wireless: See network profiles below
    eth0="dhcp"
    INTERFACES=(eth0)
    # Routes to start at boot-up (in this order)
    # Declare each route then list in ROUTES
    # - prefix an entry in ROUTES with a ! to disable it
    gateway="default gw 192.168.0.1"
    ROUTES=(!gateway)
    # Enable these network profiles at boot-up. These are only useful
    # if you happen to need multiple network configurations (ie, laptop users)
    # - set to 'menu' to present a menu during boot-up (dialog package required)
    # - prefix an entry with a ! to disable it
    # Network profiles are found in /etc/network.d
    # This now requires the netcfg package
    #NETWORKS=(main)
    # DAEMONS
    # Daemons to start at boot-up (in this order)
    # - prefix a daemon with a ! to disable it
    # - prefix a daemon with a @ to start it up in the background
    DAEMONS=(syslog-ng network dbus hal netfs avahi-daemon crond fam)
    When I run conduit from console, conduit opens but when I add a source provider I got the following (the last two lines):
    [djo@djo-laptop conduit]$ conduit
    INFO: FOUND FIREFOX LIBS AT /usr/lib/firefox-3.0
    [Main ][INFO ] Conduit v0.3.15 Installed: True (Main.py:99)
    [Main ][INFO ] Python: 2.6.2 (r262:71600, Apr 18 2009, 06:27:57)
    [GCC 4.3.3] (Main.py:100)
    [Main ][INFO ] Platform Implementations: GnomeVfs,gtkmozembed,GConf (Main.py:101)
    [Main ][INFO ] Using UI: gtk (Main.py:131)
    [gtkui.Canvas ][INFO ] Module Information: goocanvas v(0, 12, 0) (/usr/lib/python2.6/site-packages/goocanvasmodule.so) (Canvas.py:25)
    [modules.AVConverter ][INFO ] GStreamer transcoding disabled (AudioVideoConverterModule.py:28)
    [modules.iPod ][INFO ] iPod support disabled (iPodModule.py:46)
    [Module ][WARNING] Error loading the file: /usr/lib/conduit/modules/iPodModule/iPodModule.py
    Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/conduit/Module.py", line 173, in _load_modules_in_file
    mod = self._import_file(filename)
    File "/usr/lib/python2.6/site-packages/conduit/Module.py", line 154, in _import_file
    mods = pydoc.importfile (filename)
    File "/usr/lib/python2.6/pydoc.py", line 262, in importfile
    raise ErrorDuringImport(path, sys.exc_info())
    ErrorDuringImport: problem in /usr/lib/conduit/modules/iPodModule/iPodModule.py - <type 'exceptions.NameError'>: name 'gpod' is not defined
    (Module.py:201)
    /usr/lib/conduit/modules/BoxDotNetModule/BoxDotNetModule.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
    import md5
    [modules.Flickr ][INFO ] Module Information: flickrapi v1.1 (/usr/lib/conduit/modules/FlickrModule/flickrapi/__init__.pyc) (FlickrModule.py:26)
    [modules.Backpack ][INFO ] Module Information: backpack (/usr/lib/conduit/modules/BackpackModule/backpack/backpack.pyc) (BackpackModule.py:22)
    [modules.Feed ][INFO ] RSS Feed support disabled (FeedModule.py:53)
    [modules.Google ][INFO ] Module Information: gdata (/usr/lib/conduit/modules/GoogleModule/gdata/__init__.pyc) (GoogleModule.py:45)
    [modules.Evolution ][INFO ] Module Information: evolution v(2, 26, 0) (/usr/lib/python2.6/site-packages/gtk-2.0/evolution/__init__.pyc) (EvolutionModule.py:25)
    [modules.Facebook ][INFO ] Module Information: pyfacebook v0.1 (/usr/lib/conduit/modules/FacebookModule/pyfacebook/__init__.pyc) (FacebookModule.py:30)
    [modules.Network ][INFO ] Network support enabled (NetworkModule.py:30)
    [modules.Network ][WARNING] Error starting client (Client.py:37)
    [modules.Network ][DEBUG ] Starting AvahiAdvertiser server (Server.py:35)
    [modules.Network ][WARNING] Error starting AvahiAdvertiser server: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Avahi was not provided by any .service files (Server.py:52)
    [dataproviders.VolumeFactory][DEBUG ] Adjusted mount: file:/// (VolumeFactory.py:25)
    [dataproviders.VolumeFactory][DEBUG ] Adjusted mount: file:///home (VolumeFactory.py:25)
    [dataproviders.VolumeFactory][DEBUG ] Adjusted mount: file:///var (VolumeFactory.py:25)
    [gtkui.UI ][INFO ] Main window constructed (thread: -1211799872) (UI.py:202)
    [SyncSet ][INFO ] Restoring Sync Set from /home/djo/.config/conduit/settings.xml (SyncSet.py:195)
    [SyncSet ][INFO ] /home/djo/.config/conduit/settings.xml not present (SyncSet.py:199)
    [gtkui.UI ][DEBUG ] Presenting GUI (UI.py:227)
    [DBus ][DEBUG ] DBus Exported: / (DBus.py:127)
    [DBus ][DEBUG ] DBus Exported: /syncset/gui (DBus.py:127)
    [DBus ][DEBUG ] DBus Exported: /syncset/dbus (DBus.py:127)
    [Conduit ][DEBUG ] Adding twoway dataprovider into source position (Conduit.py:140)
    /usr/lib/firefox-3.0/run-mozilla.sh: line 131: 3081 Erreur de segmentation "$prog" ${1+"$@"}
    I also tried the SVN version of conduit. The segmentation fault is different but the program still crashes when I try to add data provider :
    [djo@djo-laptop conduit]$ ./conduit/conduit
    [Main ][INFO ] Conduit v0.3.16 Installed: False (Main.py:126)
    [Main ][INFO ] Python: 2.6.2 (r262:71600, Apr 18 2009, 06:27:57)
    [GCC 4.3.3] (Main.py:127)
    [Main ][INFO ] Platform Implementations: GIO,webkit,GConf (Main.py:128)
    [Main ][INFO ] Using UI: gtk (Main.py:158)
    [gtkui.Canvas ][INFO ] Module Information: goocanvas v(0, 12, 0) (/usr/lib/python2.6/site-packages/goocanvasmodule.so) (Canvas.py:28)
    [modules.iPod ][WARNING] iPod support disabled (python-gpod not availiable) (iPodModule.py:53)
    [modules.AVConverter ][INFO ] GStreamer transcoding disabled (AudioVideoConverterModule.py:28)
    /home/djo/.packages/conduit/conduit/modules/FacebookModule/FacebookModule.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
    import md5
    [modules.Facebook ][INFO ] Module Information: pyfacebook v0.1 (/home/djo/.packages/conduit/conduit/modules/FacebookModule/pyfacebook/__init__.pyc) (FacebookModule.py:30)
    [modules.Facebook ][INFO ] Facebook parsing using: JSON (json) (FacebookModule.py:31)
    [modules.iPod ][WARNING] iPod support disabled (python-gpod not availiable) (iPodModule.py:53)
    [modules.Evolution ][INFO ] Module Information: evolution v(2, 26, 0) (/usr/lib/python2.6/site-packages/gtk-2.0/evolution/__init__.pyc) (EvolutionModule.py:25)
    [modules.Backpack ][INFO ] Module Information: backpack (/home/djo/.packages/conduit/conduit/modules/BackpackModule/backpack/backpack.pyc) (BackpackModule.py:22)
    [modules.Feed ][INFO ] RSS Feed support disabled (FeedModule.py:54)
    [modules.Flickr ][INFO ] Module Information: flickrapi v1.1 (/home/djo/.packages/conduit/conduit/modules/FlickrModule/flickrapi/__init__.pyc) (FlickrModule.py:26)
    /home/djo/.packages/conduit/conduit/modules/GoogleModule/gdata/tlslite/utils/cryptomath.py:9: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
    import sha
    [modules.Google ][INFO ] Module Information: gdata (/home/djo/.packages/conduit/conduit/modules/GoogleModule/gdata/__init__.pyc) (GoogleModule.py:46)
    [modules.Network ][INFO ] Network support enabled (NetworkModule.py:30)
    [modules.Network ][DEBUG ] Starting AvahiAdvertiser server (Server.py:35)
    [modules.Network ][DEBUG ] Announcing avahi conduit service (Peers.py:159)
    [dataproviders.VolumeFactory][INFO ] Waiting for HAL to attempt mount (VolumeFactory.py:38)
    [dataproviders.VolumeFactory][INFO ] Waiting for HAL to attempt mount (VolumeFactory.py:38)
    [dataproviders.VolumeFactory][INFO ] Waiting for HAL to attempt mount (VolumeFactory.py:38)
    [gtkui.UI ][INFO ] Main window constructed (thread: -1210530112) (UI.py:202)
    [SyncSet ][INFO ] Restoring Sync Set from /home/djo/.config/conduit/settings.xml (SyncSet.py:198)
    [gtkui.UI ][DEBUG ] Presenting GUI (UI.py:227)
    [DBus ][DEBUG ] DBus Exported: / (DBus.py:127)
    [DBus ][DEBUG ] DBus Exported: /syncset/gui (DBus.py:127)
    [DBus ][DEBUG ] DBus Exported: /syncset/dbus (DBus.py:127)
    [modules.Network ][DEBUG ] Resolved conduit service djo-desktop on djo-desktop.local - 192.168.0.103:3400
    Extra Info: ['protocol-version=1', 'version=0.3.16'] (Peers.py:245)
    [modules.Network ][DEBUG ] Remote host 'http://djo-desktop.local' detected (Client.py:49)
    [modules.Network ][DEBUG ] Resolved conduit service djo-laptop on djo-laptop.local - 192.168.0.100:3400
    Extra Info: ['protocol-version=1', 'version=0.3.16'] (Peers.py:245)
    [modules.Network ][DEBUG ] Remote host 'http://djo-laptop.local' detected (Client.py:49)
    [dataproviders.DataProvider][DEBUG ] DataProviderFactory <TestFactory object at 0x8bb2f2c (conduit+dataproviders+DataProvider+DataProviderFactory at 0x8a0c260)>: Emitting dataprovider-added for DynamicTestSource1:Foo (DataProvider.py:606)
    [Module ][INFO ] Dynamic dataprovider (Wrapper: Dynamic Source 1 source (UID: DynamicTestSource1:Foo-None)) available by <TestFactory object at 0x8bb2f2c (conduit+dataproviders+DataProvider+DataProviderFactory at 0x8a0c260)> (Module.py:67)
    [DBus ][DEBUG ] DBus Message from /: Emmiting DBus signal DataproviderAvailable DynamicTestSource1:Foo (DBus.py:134)
    [dataproviders.DataProvider][DEBUG ] DataProviderFactory <TestFactory object at 0x8bb2f2c (conduit+dataproviders+DataProvider+DataProviderFactory at 0x8a0c260)>: Emitting dataprovider-added for DynamicTestSource2:Bar:Baz (DataProvider.py:606)
    [Module ][INFO ] Dynamic dataprovider (Wrapper: Dynamic Source 2 source (UID: DynamicTestSource2:Bar:Baz-None)) available by <TestFactory object at 0x8bb2f2c (conduit+dataproviders+DataProvider+DataProviderFactory at 0x8a0c260)> (Module.py:67)
    [DBus ][DEBUG ] DBus Message from /: Emmiting DBus signal DataproviderAvailable DynamicTestSource2:Bar:Baz (DBus.py:134)
    [dataproviders.DataProvider][DEBUG ] DataProviderFactory <TestFactory object at 0x8bb2f2c (conduit+dataproviders+DataProvider+DataProviderFactory at 0x8a0c260)>: Emitting dataprovider-added for CustomKey (DataProvider.py:606)
    [Module ][INFO ] Dynamic dataprovider (Wrapper: Preconfigured Test Source source (UID: TestSource-None)) available by <TestFactory object at 0x8bb2f2c (conduit+dataproviders+DataProvider+DataProviderFactory at 0x8a0c260)> (Module.py:67)
    [DBus ][DEBUG ] DBus Message from /: Emmiting DBus signal DataproviderAvailable TestSource (DBus.py:134)
    [dataproviders.DataProvider][DEBUG ] DataProviderFactory <TestFactory object at 0x8bb2f2c (conduit+dataproviders+DataProvider+DataProviderFactory at 0x8a0c260)>: Emitting dataprovider-removed for DynamicTestSource1:Foo (DataProvider.py:611)
    [Module ][INFO ] Dynamic dataprovider (DynamicTestSource1:Foo) unavailable by <TestFactory object at 0x8bb2f2c (conduit+dataproviders+DataProvider+DataProviderFactory at 0x8a0c260)> (Module.py:71)
    [DBus ][DEBUG ] DBus Message from /: Emiting DBus signal DataproviderUnavailable DynamicTestSource1:Foo (DBus.py:134)
    [Conduit ][DEBUG ] Adding twoway dataprovider into source position (Conduit.py:140)
    ./conduit/conduit: line 26: 3512 Erreur de segmentation `dirname $0`/conduit.real $*
    I tried to enable webkit instead of gtkmozembed but I can't see how. I really want to use conduit to sync Evolution suite between desktop/laptop
    Any help?
    Desesperate new arch user.

    I've rebuilt conduit with webkit and GIO support by patching the file defs.py.in in the source directory, however the segfault still occurs on my machine. The only difference is that the run-mozilla.sh error is not given but instead a blank line. Perhaps this is related to a specific plugin not working correctly.
    edit: this is also occuring with conduit 0.3.14 release. I may try the SVN version later today.
    Last edited by iBertus (2009-06-13 19:16:16)

  • Segmentation fault when enabling replication with SQL API

    Hi,
    I've compiled BDB 5.3.21 on Ubuntu 11.04 (x86) with the following configure options:
    ../dist/configure enable-sql enable-sql_compat enable-debug enable-tcl --with-tcl=/usr/lib
    I was able to follow the Replication Usage Examples given in "Getting Started with the SQL APIs" to set up a set of replicated master/client databases.
    However, after I exited out of the dbsql session that started replication on the master database and re-opened the master database with dbsql, executing "pragma replication_initial_master=ON;" followed by "pragma replication=ON;" led to a segmentation fault. gdb showed that the segmentation fault occurred at:
    dbsql> pragma replication=ON;
    Program received signal SIGSEGV, Segmentation fault.
    0x0032d42b in __env_ref_get (dbenv=0x8056ad8, countp=0xbfffd498)
    at ../src/env/env_region.c:772
    772          renv = infop->primary;
    (gdb) list
    767          REGENV *renv;
    768          REGINFO *infop;
    769     
    770          env = dbenv->env;
    771          infop = env->reginfo;
    772          renv = infop->primary;
    773          *countp = renv->refcnt;
    774          return (0);
    775     }
    776     
    (gdb)
    Does anybody know of a solution to this or could this be a bug? Thanks in advance.
    P.S. here's a stack trace:
    (gdb) bt
    #0 0x0032d42b in __env_ref_get (dbenv=0x8056ad8, countp=0xbfffd498)
    at ../src/env/env_region.c:772
    #1 0x001786fc in hasDatabaseConnections (p=0x8056708)
    at ../lang/sql/generated/sqlite3.c:44420
    #2 0x00178a11 in bdbsqlPragmaStartReplication (pParse=0x80648e0,
    pDb=0x80561cc) at ../lang/sql/generated/sqlite3.c:44533
    #3 0x001797f5 in bdbsqlPragma (pParse=0x80648e0,
    zLeft=0x8062e20 "replication", zRight=0x8062dc0 "ON", iDb=0)
    at ../lang/sql/generated/sqlite3.c:44812
    #4 0x001c215d in sqlite3Pragma (pParse=0x80648e0, pId1=0x8064b60,
    pId2=0x8064b70, pValue=0x8064b90, minusFlag=0)
    at ../lang/sql/generated/sqlite3.c:78941
    #5 0x001e5c83 in yy_reduce (yypParser=0x8064b20, yyruleno=256)
    at ../lang/sql/generated/sqlite3.c:96668
    #6 0x001e6761 in sqlite3Parser (yyp=0x8064b20, yymajor=1, yyminor=...,
    pParse=0x80648e0) at ../lang/sql/generated/sqlite3.c:97051
    #7 0x001e7537 in sqlite3RunParser (pParse=0x80648e0,
    zSql=0x80648b8 "pragma replication=ON;", pzErrMsg=0xbfffdba0)
    at ../lang/sql/generated/sqlite3.c:97877
    #8 0x001c730e in sqlite3Prepare (db=0x8056010,
    zSql=0x80648b8 "pragma replication=ON;", nBytes=-1, saveSqlFlag=1,
    ---Type <return> to continue, or q <return> to quit---
    pReprepare=0x0, ppStmt=0xbfffdc8c, pzTail=0xbfffdc88)
    at ../lang/sql/generated/sqlite3.c:80736
    #9 0x001c7739 in sqlite3LockAndPrepare (db=0x8056010,
    zSql=0x80648b8 "pragma replication=ON;", nBytes=-1, saveSqlFlag=1,
    pOld=0x0, ppStmt=0xbfffdc8c, pzTail=0xbfffdc88)
    at ../lang/sql/generated/sqlite3.c:80828
    #10 0x001c7a5e in sqlite3_prepare_v2 (db=0x8056010,
    zSql=0x80648b8 "pragma replication=ON;", nBytes=-1, ppStmt=0xbfffdc8c,
    pzTail=0xbfffdc88) at ../lang/sql/generated/sqlite3.c:80903
    #11 0x0804baf6 in shell_exec (db=0x8056010,
    zSql=0x80648b8 "pragma replication=ON;",
    xCallback=0x804a3c4 <shell_callback>, pArg=0xbfffde14, pzErrMsg=0xbfffdcfc)
    at ../lang/sql/sqlite/src/shell.c:1092
    #12 0x0805030e in process_input (p=0xbfffde14, in=0x0)
    at ../lang/sql/sqlite/src/shell.c:2515
    #13 0x08051453 in main (argc=2, argv=0xbffff3f4)
    at ../lang/sql/sqlite/src/shell.c:2946
    -Irving
    Edited by: snowcrash on Jan 15, 2013 2:16 PM

    Thank you for reporting this. I have been able to reproduce this crash in-house.
    You need to specify the replication_initial_master and replication pragmas as part of initially creating your SQL database. The replication_initial_master pragma is not used or needed after the initial database creation at the initial master site. The replication=on pragma is a persistent setting that we remember internally the first time you specify it. This means that after specifying replication=on for the first time on a site, we will automatically restart replication for you in future dbsql sessions when we open the underlying Berkeley DB environment.
    This gives you a very simple workaround: don't respecify replication=on when you reenter dbsql.
    Of course, we shouldn't be crashing on an unnecessary pragma. I have added this to our list of fixes to consider for the future.
    Thanks,
    Paula Bingham
    Oracle

  • Segmentation fault with xqillia when using purifyplus

    Hi friends,
    I am using BDB , xqilla /xerces interface to perform an xquery.The program works fine,but after building the program along with purifyplus,if i try to run the program a segmentation fault is raised.
    attached are the code,command used to build the program and the stack trace.
    here is some specifications-
    Rational Purifyplus 7.0
    gcc version 3.4.6
    OS-Linux(redhat);Linux 3 2.6.9-89.ELsmp
    dbxml-2.4.16
    CODE:
    #include "DbXml.hpp"
    #include <iostream>
    using namespace DbXml;
    using namespace std;
    int putxml(string filename,string docname2)
    XmlManager myManager;
    XmlContainer myContainer;
    try
    if (!myManager.existsContainer("Container.bdbxml"))
    myContainer =myManager.createContainer("Container.bdbxml");
    myContainer = myManager.openContainer("Container.bdbxml");
    XmlUpdateContext theContext = myManager.createUpdateContext();
    XmlInputStream *theStream =myManager.createLocalFileInputStream(filename);
    myContainer.putDocument(docname2,theStream,theContext,0);
    catch(XmlException &e)
    cout<<e.what()<<endl;
    /* function to get the xml file and display output */
    void getxml(string docname3)
    string query_result;
    try
    XmlManager myManager;
    XmlContainer myContainer = myManager.openContainer("Container.bdbxml");
    XmlQueryContext myContext = myManager.createQueryContext();
    myContext.setDefaultCollection("./Container.bdbxml");
    cout<<"docname3 is "<<docname3<<endl;
    std::string myQuery="for $i in doc('dbxml:/Container.bdbxml/docname') return ($i)";
    XmlQueryExpression qe = myManager.prepare(myQuery, myContext);
    XmlResults results = qe.execute(myContext);
    XmlValue my_value;
    while (results.next(my_value))
    query_result += my_value.asString(); //xml file data come in query_result
    }catch(XmlException &e){
    cout<<e.what()<<endl;
    cout<<query_result<<endl;
    /* main function */
    int main()
    string filename("XYZ.xml"),docname1("docname");
    putxml(filename,docname1);
    getxml(docname1);
    Command used:
    purify -always-use-cache-dir=yes -cache-dir=/tmp/3rdPArty/RT -chain-length=10 -static-checking=no -thread_stack_change=0x4000 -fds=57 -thread-stack-change=0x4000 -best-effort g++ -g final.cpp -I /tmp/3rdPArty/dbxml-2.4.16/dbxml/include/dbxml -L /tmp/3rdPArty/dbxml-2.4.16/install/lib/ -ldbxml -ldbxml-2.4 -lxqilla -lxerces-c -ldb -ldb_cxx
    Stack Trace:
    #0 0x01205131 in m_apm_is_integer ()
    at /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_construct.h:134
    #1 0x009d9794 in std::vector<ASTNode*, XQillaAllocator<ASTNode*> >::_M_insert_aux (this=dwarf2_read_address: Corrupted DWARF expression.
    at /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/vector.tcc:229
    #2 0x00d94dea in std::vector<ASTNode*, XQillaAllocator<ASTNode*> >::push_back (this=Could not find the frame base for "std::vector<ASTNode*, XQillaAllocator<ASTNode*> >::push_back(ASTNode* const&)".
    at /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:564
    *#3 0x01195bca in XQParser::yyparse (qp=Could not find the frame base for "*XQParser::yyparse(void*)"*.*
    *) at /tmp/3rdPArty/dbxml-2.4.16/xqilla/build/../src/parser/XQParser.y:2266*
    #4 0x00eb1c4a in XQilla::parse () at /tmp/3rdPArty/dbxml-2.4.16/xqilla/build/../include/xqilla/ast/LocationInfo.hpp:63
    #5 0x006a266a in QueryExpression (this=Not enough elements for DW_OP_rot. Need 3, have 0
    ) at QueryExpression.hpp:42
    #6 0x007d819c in DbXml::XmlManager::prepare (this=Could not find the frame base for "DbXml::XmlManager::prepare(std::string const&, DbXml::XmlQueryContext&)".
    ) at XmlManager.cpp:551
    #7 0x08086a0d in getxml (docname3=
    {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, Mp = 0x80be6e4 "docname"}}) at final.cpp:56
    #8 0x08087dae in main () at final.cpp:81
    As per my understanding my program is crashing in XQParser::yyparse(void*) which is in YACC. is there any known issue regarding compatibility between YACC and Purifyplus ?
    Kindly help me out
    Thanks.
    Edited by: user8114111 on Jul 22, 2009 11:10 PM
    Edited by: user8114111 on Jul 22, 2009 11:15 PM

    Hi. This question is better suited for the BDB XML forum, which is here:
    Berkeley DB XML
    Ben Schmeckpeper

  • 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

  • [SOLVED]Easytag Segmentation fault with kde3 (kdemod)

    (easytag:4811): Gtk-WARNING **: libbonoboui-2.so.0: cannot open shared object file: No such file or directory
    (easytag:4811): Gtk-WARNING **: libbonoboui-2.so.0: cannot open shared object file: No such file or directory
    EasyTAG 2.1.5: Abnormal exit! (PId: 4811).
    Received signal SIGSEGV (11)
    You have probably found a bug in EasyTAG. Please, send a bug report with a gdb backtrace ('gdb easytag core' then 'bt' and 'l') and informations to reproduce it to [email protected]
    Segmentation fault
    If I start up easytag while running KDE3 (kdemod), I get this problem every time. I have tried running it with openbox and it runs without a problem. I have deleted .easytag and reinstalled, but the problem continues.
    EDIT: Installing libbonoboui resolves the problem. It looks like the there is a dependency issue here, I'll file a bug.
    Last edited by alleyoopster (2008-08-02 17:18:06)

    Allan wrote:Do a "pacman -S libbonoboui" an all should be good.  I don't understand why this only occurs in KDEmod though.  Is that on two different computers.   File a bug report about the missing dependancy.
    Yeah thanks Allan, I figured it out. Bug report at http://bugs.archlinux.org/task/11094
    No it is on the same machine
    Last edited by alleyoopster (2008-08-02 17:18:28)

  • Python segmentation fault with matplotlib and opencv2

    Once again fellow archers, I am in need of your help.
    I have a file, Test1.py, which uses cv2, pylab, and numpy.
    Excluding either pylab or cv2 functions, I can make the rest of the script work, but when pylab is imported, calling cv2's imshow() function causes a "segmentation fault (core dumped)".
    By the sound of it, I thought it might come from the underlying C stuff, rather than python.
    So I ran it through gdb.
    This is where I need help. I'm not sure how to interprete the backtrace, and I probably wouldn't know what to to if I were.
    Perhaps a problem with glib or GObject?
    Below are the python script in question (it a template for a school assignment), and the gdb trace.
    Test1.py
    import sys
    sys.settrace
    import numpy as np
    import cv2
    import math
    import pylab
    #----------------------------Functions
    def show1_OpenCV(image):
    # ##This function define a window by namedWindow() and then show the image in that window
    image=np.array(image)
    # cv2.namedWindow('ByOpenCV', cv2.WINDOW_AUTOSIZE)## create a window called
    # #+'By OpenCV'Using the \nw{cv2.WINDOW_AUTOSIZE} parameter when defining a window display the image with its actual size in the window.
    cv2.imshow('ByOpenCV', image) ## show the image in 'By OpenCV' window
    # cv2.waitKey(0) ## the window will be closed with a (any)key press
    def show2_OpenCV(*image):
    ## Showing the image using OpenCV
    im=[]
    for i in image:
    im.append(array(i))
    cv2.namedWindow('1', cv2.WINDOW_AUTOSIZE)## create a window called 'By OpenCV' Using the \nw{cv2.WINDOW_AUTOSIZE} parameter when defining a window display the image with its actual size in the window.
    cv2.imshow('1', im[0]) ## show the image in 'By OpenCV' window
    cv2.namedWindow('2', cv2.WINDOW_AUTOSIZE)
    cv2.imshow('2', im[1])
    cv2.waitKey(0) ## the window will be closed with a (any)key press
    def showAll_OpenCV(**image):
    im = []
    for (k,v) in image.items():
    cv2.namedWindow(str(k), cv2.WINDOW_AUTOSIZE)
    cv2.imshow(k, np.array(v))
    cv2.waitKey()
    def show1_pylab(image):
    ## Showing the image using pylab
    figure("By pylab")## Create a figure
    gray()
    title("1"); imshow(image)
    show()
    def show2_pylab(*images):
    ## Showing the image using pylab
    figure("By pylab")## Create a figure
    gray()
    subplot(1,2,1);title("1"); imshow(images[0])## more about 'subplot()' : <http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label>
    subplot(1,2,2);title("2"); imshow(images[1])
    show()
    def grayLevelMap2(I,vector):
    I = np.copy(I)
    (x,y) = np.shape(I)
    for i in range(x):
    for j in range(y):
    I[i,j] = vector[I[i,j]]
    return I
    def grayLevelMap(I,a,b):
    I = np.copy(I)
    (x,y) = np.shape(I)
    for i in range(x):
    for j in range(y):
    I[i,j] = max(0,min(255, a* I[i,j] +b))
    return I
    def grayLevelMapF(I,f):
    I = np.copy(I)
    (x,y) = np.shape(I)
    for i in range(x):
    I[i] = map(f, I[i])
    return I
    def f(x):
    func=(255-x)*math.sqrt(100/+1)
    return func
    def displayVect(v):
    points=[]
    for i in range(len(v)):
    points.append((i,v[i]))
    bins = range(256)
    n = v
    grid(None, 'major', 'both')
    plot(bins, n, 'k-', linewidth=5)
    axis([-2, 256, -2, 256])
    show()
    ##------------------------------Main body
    # Loading an image using openCV
    I1=cv2.imread("children.tif")
    I2=cv2.imread("Eye1.jpg")
    I3=cv2.imread("Marker1.jpg")
    I4=cv2.imread("GreenTest.jpg")
    I1=cv2.cvtColor(I1, cv2.COLOR_RGB2GRAY)
    I2=cv2.cvtColor(I2, cv2.COLOR_RGB2GRAY)
    I3=cv2.cvtColor(I3, cv2.COLOR_RGB2GRAY)
    I4=cv2.cvtColor(I4, cv2.COLOR_RGB2GRAY)
    show1_OpenCV(grayLevelMapF(I4, lambda x: 2*x))
    show1_OpenCV(I4)
    gdb output:
    Reading symbols from /usr/bin/python2...(no debugging symbols found)...done.
    (gdb) run Test1.py
    Starting program: /usr/bin/python2 Test1.py
    warning: Could not load shared library symbols for linux-vdso.so.1.
    Do you need "set solib-search-path" or "set sysroot"?
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib/libthread_db.so.1".
    Traceback (most recent call last):
    File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.3400.3-gdb.py", line 9, in <module>
    from gobject import register
    File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
    ImportError: No module named backtrace
    [New Thread 0x7fffdf259700 (LWP 3981)]
    Program received signal SIGSEGV, Segmentation fault.
    0x00000036cb6bc785 in do_warn () from /usr/lib/libpython2.7.so.1.0
    (gdb) backtrace
    #0 0x00000036cb6bc785 in do_warn () from /usr/lib/libpython2.7.so.1.0
    #1 0x00000036cb6bcc4c in PyErr_WarnEx () from /usr/lib/libpython2.7.so.1.0
    #2 0x00007fffe10153b5 in ?? ()
    from /usr/lib/python2.7/site-packages/gobject/_gobject.so
    #3 0x00000036cde4ea00 in g_logv () from /usr/lib/libglib-2.0.so.0
    #4 0x00000036cde4ebf2 in g_log () from /usr/lib/libglib-2.0.so.0
    #5 0x00007fffef8e009e in gtk_disable_setlocale ()
    from /usr/lib/libgtk-x11-2.0.so.0
    #6 0x00007ffff21ca8a8 in cvInitSystem ()
    from /usr/lib/libopencv_highgui.so.2.4
    #7 0x00007ffff21cafb3 in cvNamedWindow ()
    from /usr/lib/libopencv_highgui.so.2.4
    #8 0x00007ffff352dfe4 in ?? () from /usr/lib/python2.7/site-packages/cv2.so
    #9 0x00000036cb6dc05a in PyEval_EvalFrameEx ()
    from /usr/lib/libpython2.7.so.1.0
    #10 0x00000036cb6dba83 in PyEval_EvalFrameEx ()
    from /usr/lib/libpython2.7.so.1.0
    #11 0x00000036cb6dcedd in PyEval_EvalCodeEx ()
    ---Type <return> to continue, or q <return> to quit---j
    from /usr/lib/libpython2.7.so.1.0
    #12 0x00000036cb6dcfb2 in PyEval_EvalCode () from /usr/lib/libpython2.7.so.1.0
    #13 0x00000036cb6f5eea in run_mod () from /usr/lib/libpython2.7.so.1.0
    #14 0x00000036cb6f6ce2 in PyRun_FileExFlags ()
    from /usr/lib/libpython2.7.so.1.0
    #15 0x00000036cb6f76fb in PyRun_SimpleFileExFlags ()
    from /usr/lib/libpython2.7.so.1.0
    #16 0x00000036cb7089f2 in Py_Main () from /usr/lib/libpython2.7.so.1.0
    #17 0x00007ffff7833a15 in __libc_start_main () from /usr/lib/libc.so.6
    #18 0x0000000000400741 in _start ()
    (gdb) run Test1.py
    Last edited by Bladtman242 (2013-02-12 19:30:55)

    Thank you so much!
    This (ugly) workaround might have saved me from a lot of trouble with this semester's exercises.
    Just to be clear, the solution is:
    Import opencv
    Call namedWindow
    Do the rest of the imports
    Do the rest of the script
    Corect?
    I'm hesitant to mark the thread as solved, as the problem is still very much there, this workaround just allows us to ignore it.

  • [SOLVED] Segmentation Fault with Clementine

    When I open the preferences (Ctrl+P) of Clementine it crashes with a segmentation fault.
    This is the backtrace:
    18:53:58.858 WARN unknown libpng warning: iCCP: known incorrect sRGB profile
    18:53:58.900 WARN unknown libpng warning: iCCP: known incorrect sRGB profile
    [Thread 0x7fff9ffff700 (LWP 1566) exited]
    Program received signal SIGSEGV, Segmentation fault.
    0x00007fffec8b9ba1 in ?? () from /usr/lib/libfontconfig.so.1
    (gdb) bt
    #0 0x00007fffec8b9ba1 in ?? () from /usr/lib/libfontconfig.so.1
    #1 0x00007fffec8ba03f in ?? () from /usr/lib/libfontconfig.so.1
    #2 0x00007fffec8b9cd8 in ?? () from /usr/lib/libfontconfig.so.1
    #3 0x00007fffec8ba554 in ?? () from /usr/lib/libfontconfig.so.1
    #4 0x00007fffec8ba77d in FcConfigSubstituteWithPat ()
    from /usr/lib/libfontconfig.so.1
    #5 0x00007fffec8c85cc in FcFontRenderPrepare ()
    from /usr/lib/libfontconfig.so.1
    #6 0x00007ffff32d695e in QFontDatabase::load(QFontPrivate const*, int) ()
    from /usr/lib/libQtGui.so.4
    #7 0x00007ffff32b35e9 in QFontPrivate::engineForScript(int) const ()
    from /usr/lib/libQtGui.so.4
    #8 0x00007ffff32e9252 in QTextEngine::fontEngine(QScriptItem const&, QFixed*, QFixed*, QFixed*) const () from /usr/lib/libQtGui.so.4
    #9 0x00007ffff32e9a03 in QTextEngine::shapeTextWithHarfbuzz(int) const ()
    from /usr/lib/libQtGui.so.4
    #10 0x00007ffff32eab02 in QTextEngine::shapeText(int) const ()
    from /usr/lib/libQtGui.so.4
    #11 0x00007ffff32eae25 in QTextEngine::shape(int) const ()
    from /usr/lib/libQtGui.so.4
    #12 0x00007ffff32f0a30 in QTextEngine::boundingBox(int, int) const ()
    from /usr/lib/libQtGui.so.4
    #13 0x00007ffff32c79f4 in QFontMetrics::boundingRect(QString const&) const ()
    ---Type <return> to continue, or q <return> to quit---
    from /usr/lib/libQtGui.so.4
    #14 0x00007ffff34673dd in ?? () from /usr/lib/libQtGui.so.4
    #15 0x00007ffff3467534 in QComboBox::sizeHint() const ()
    from /usr/lib/libQtGui.so.4
    #16 0x00007ffff30ce65c in QWidgetItemV2::updateCacheIfNecessary() const ()
    from /usr/lib/libQtGui.so.4
    #17 0x00007ffff30ce96d in QWidgetItemV2::maximumSize() const ()
    from /usr/lib/libQtGui.so.4
    #18 0x00007ffff30b0b55 in ?? () from /usr/lib/libQtGui.so.4
    #19 0x00007ffff30b11d6 in QBoxLayout::sizeHint() const ()
    from /usr/lib/libQtGui.so.4
    #20 0x00007ffff30caca4 in QLayout::totalSizeHint() const ()
    from /usr/lib/libQtGui.so.4
    #21 0x00007ffff30dec30 in QWidget::sizeHint() const ()
    from /usr/lib/libQtGui.so.4
    #22 0x00007ffff30ce65c in QWidgetItemV2::updateCacheIfNecessary() const ()
    from /usr/lib/libQtGui.so.4
    #23 0x00007ffff30ce96d in QWidgetItemV2::maximumSize() const ()
    from /usr/lib/libQtGui.so.4
    #24 0x00007ffff30b0b55 in ?? () from /usr/lib/libQtGui.so.4
    #25 0x00007ffff30b1206 in QBoxLayout::minimumSize() const ()
    from /usr/lib/libQtGui.so.4
    #26 0x00007ffff30cac34 in QLayout::totalMinimumSize() const ()
    ---Type <return> to continue, or q <return> to quit---
    from /usr/lib/libQtGui.so.4
    #27 0x00007ffff30dec60 in QWidget::minimumSizeHint() const ()
    from /usr/lib/libQtGui.so.4
    #28 0x00007ffff30cc8c3 in qSmartMinSize(QWidget const*) ()
    from /usr/lib/libQtGui.so.4
    #29 0x00007ffff350e4b9 in ?? () from /usr/lib/libQtGui.so.4
    #30 0x00007ffff350e897 in QScrollArea::setWidget(QWidget*) ()
    from /usr/lib/libQtGui.so.4
    #31 0x0000000000765b18 in SettingsDialog::AddPage(SettingsDialog::Page, SettingsPage*, QTreeWidgetItem*) ()
    #32 0x0000000000765e67 in SettingsDialog::SettingsDialog(Application*, BackgroundStreams*, QWidget*) ()
    #33 0x0000000000745360 in MainWindow::OpenSettingsDialog() ()
    #34 0x000000000080c1ea in ?? ()
    #35 0x00007ffff6cd7b48 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
    #36 0x00007ffff309cf82 in QAction::triggered(bool) ()
    from /usr/lib/libQtGui.so.4
    #37 0x00007ffff309e953 in QAction::activate(QAction::ActionEvent) ()
    from /usr/lib/libQtGui.so.4
    #38 0x00007ffff34c7d79 in ?? () from /usr/lib/libQtGui.so.4
    #39 0x00007ffff34cc2a9 in ?? () from /usr/lib/libQtGui.so.4
    #40 0x00007ffff30f262e in QWidget::event(QEvent*) ()
    ---Type <return> to continue, or q <return> to quit---
    from /usr/lib/libQtGui.so.4
    #41 0x00007ffff34d007b in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4
    #42 0x00007ffff30a30dc in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/libQtGui.so.4
    #43 0x00007ffff30a97dd in QApplication::notify(QObject*, QEvent*) ()
    from /usr/lib/libQtGui.so.4
    #44 0x00007ffff6cc3ebd in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/libQtCore.so.4
    #45 0x00007ffff30a8f93 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
    from /usr/lib/libQtGui.so.4
    #46 0x00007ffff311aedc in ?? () from /usr/lib/libQtGui.so.4
    #47 0x00007ffff311961c in QApplication::x11ProcessEvent(_XEvent*) ()
    from /usr/lib/libQtGui.so.4
    #48 0x00007ffff3140162 in ?? () from /usr/lib/libQtGui.so.4
    #49 0x00007ffff41b3296 in g_main_context_dispatch ()
    from /usr/lib/libglib-2.0.so.0
    #50 0x00007ffff41b35e8 in ?? () from /usr/lib/libglib-2.0.so.0
    #51 0x00007ffff41b368c in g_main_context_iteration ()
    from /usr/lib/libglib-2.0.so.0
    #52 0x00007ffff6cf0b25 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
    #53 0x00007ffff3140216 in ?? () from /usr/lib/libQtGui.so.4
    ---Type <return> to continue, or q <return> to quit---
    #54 0x00007ffff6cc2b1f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
    #55 0x00007ffff6cc2e15 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
    #56 0x00007ffff6cc7f4b in QCoreApplication::exec() ()
    from /usr/lib/libQtCore.so.4
    #57 0x00000000005db094 in main ()
    This happen every time. I searched on internet but I can't find similar issue.
    Thanks.
    Last edited by ryuzy (2014-02-06 11:30:13)

    I tried installing Infinality-bundle+fonts and it fixed the problem.
    So there was a problem with my fonts, I don't know why this happened but I'm happy to have solved.
    Last edited by ryuzy (2014-02-06 11:30:59)

Maybe you are looking for

  • Safari crashes every time I attempt to attach a file to an email through gmail.

    I am trying to send some emails for school and need to be able to attach files and pictures. Every time I try to attach something to an email, Safari immediately crashes. This is the report: Process:         WebProcess [567] Path:            /System/

  • Playlist order on burned CD

    I burn a cd from a playlist and the songs are burned on the cd in random order instead of the order shown on the playlist. How do I correct this?

  • Content is missing after I do a "Check-In All"

    Hi, I had created a folder ABC and many sub folders underneath. Many a times I had done a Check-in at the individual topic level and it was fine. Last time when I did a "Check-In all", the content disappeared. What I see now is just the folder struct

  • BPA and BPEL interaction

    Hi All, I have imported a BPA blueprint into my BPEL console, The Blueprint is residing on a Server. Now if i make any changes/save on the Bpel process, I want the change to be updated to the Blueprint on the Server. My colleague was talking about a

  • Replication (dbremote) between SA12 and ASA9

    I get a lot of syntax error while replicationg between a SA12 and ASA9 database. The consolidated db (SA12) sends SQL through passthrough to a ASA9 Remote db. It seems that the SQL Syntax sent from SA12 is not compatible with the syntax that ASA9 exp