Libcurl/libxml2 segfault

I have been working on a library for a while now (http://bbing.codeplex.com/) and that you actually want to release (officially). But I hit a few roadblocks. The remaining list of todos I have are:

  1. Make sure that it works
  2. Search for memory leaks
  3. Release

He has the ability to define customized memory managers. Prior to their introduction, I had random segfaults. After their implementation. I still get random segfaults. I hope it's something that I've done, but whenever I get them, they are located in libcurl and libxml2.

When I do #1, I get segfaults. When I do #2, I get segfaults.

The source code is already high it there to see and check.

Test code:

bing_request_t request = NULL;
bing_response_t response;
bing_result_t* results;
int c;
int i;
enum SOURCE_TYPE t;
unsigned int bingID;

bingID = create_bing("Bing app ID goes here!!");

if(request_create_request(BING_SOURCETYPE_WEB, &request))
{
    response = search_sync(bingID, "Bing API", request);
    if(response)
    {
        c = response_get_results(response, NULL);
        results = calloc(c, sizeof(bing_result_t));
        if(results)
        {
            response_get_results(response, results);
            for(i = 0; i < c; i++)
            {
                t = result_get_source_type(results[i]);
            }
            free(results);
        }
        free_response(response);
    }
    free_request(request);
}

free_bing(bingID);

Note: If you need an ID application to test Bing, PM me.

You can run with default handlers (AKA, doing nothing, just compile), or you can try the "follow-up" to the memory managers by adding the "BING_MEM_TRACK" symbol to the project and compilation.

When I use the memory of follow-up, errors generally occur in 'free_dbg_track' to the free call. The stack trace is usually along the lines of '..., curl_do, curl_http, curl_safefree, xml_curl_free, free_dbg_track, __free.

As mentioned in the title, I also got when I try to release the context of the (search.c, search_cleanup) XML parser that has seems-like-a-fix, if the statement that can or should not cause a memory leak (do not know because I keep segfault-ing). For this stack trace is usually "..., xmlFreeParserCtxt, xmlFree, xml_curl_free, free_dbg_track, __free.

Tested only on the device (rebooted a couple of times to free memory).

This post seems to scatter brained and unorganized, but I can't seem to figure in any other way then put excuses from the outset for this. If you have any ideas, need more details (or Bing ID application, although it is free to do and to register [because you are even ready to approach Bing]), etc. Do not hesitate to ask.

Yep, analysis of memory did the trick. He kept complaining about what I thought to be code perfectly well, but something must have been going wrong (somewhere) and it caused the random segfaults and strange behavior.

Tags: BlackBerry Developers

Similar Questions

  • deterministic segfault in DAQmx libs after 49 days of operations with 6110 OR Linux

    I have a program using a 6110 Council OR through 8.04 DAQmx Linux (Suse 11) of 32 bits. After 49 days of operation at 1 MHz (during which the program sometimes stopped and restarted), a segmentation fault occurs inside certain DAQmx libs, as follows:

     kernel: [4286583.578738] nimxs [940]: Segfault at 11 0053af14 sp 017d00a0 error ip 6 to libnidsadd.so [587000 + 37000]

    or

     kernel: [4286589.134512] nimxs [1134]: Segfault at 11 00561f14 sp 015970a 0 error ip 6 to libmxssvr.so [50d000 + 99000]

    It happened 4 times on two different machines, each time with the same availability of machine.

    After the segmentation fault, the cards can no longer be used and are not displayed in nilsdev.

    Is this a known problem of DAQmx on linux and is there a way to recover the other than restart error machine?

    ... and finally:

    before doing what I did in my last post (stopping services and unloading nation, then by restarting the services), restart the nimxs daemon with

    / usr/local/natinst/Max/sbin/nimxs /usr/local/natinst/max/libmxssvr.so

    does everything works again.

    (if the daemon restarts after modules are reloaded, cards OR do not appear with nilsdev but can not be used).

  • Error 'the procedure entry point xmlTextReaderConstName' not found in the dynamic link library libxml2.dll when you connect to the computer

    Original title:

    I get this pop-up when I connect: 'the procedure entry point not found xmlTextReaderConstName in the dynamic link library libxml2.dll.'  What should I do to fix this?

    Hello

    1. are you able to connect next to this error?

    2. are you aware of any changes made to the computer, before the show?

    Method 1:

    Step 1: Safe Mode

    Start your computer in safe mode and check the number.

    Start your computer in safe mode

    http://Windows.Microsoft.com/en-us/Windows7/start-your-computer-in-safe-mode

    Step 2: Clean boot

    If you are not facing the problem in safe mode, and then put your computer in a clean boot and search for the question.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: When you have finished the clean boot procedure, follow step 7 in the article to restore your computer to normal startup.

    Method 2:

    Run a SFC system analysis and control for the issue.

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    http://support.Microsoft.com/kb/929833

    Method 3:

    Follow these steps.

    a. open windows Explorer, navigate to the following location:

    For 64-bit.

    C:\Program Files (x 86) \Common Files\Apple\Apple Application Support

    For 32 bit,

    C:\Program Files \Common Files\Apple\Apple Application Support

    b. copy the file "libxml2.dll.

    c. open new windows Explorer, navigate to the following location:

    For 64-bit.

    C:\Program Files (x 86) \Common Files\Apple\Mobile Device Support

    For 32 bit,

    C:\Program Files \Common Files\Apple\Mobile Device Support

    d. Paste the file 'libxml2.dll' at the location.

    e. restart your computer.

    I hope this helps.

  • the procedure entry point readerconstname xml text could not be located in dynamic link library libxml2.dll

    I found the following message in my laptop computer startup sequence, after I login to my account.

    the procedure entry point readerconstname xml text could not be located in dynamic link library libxml2.dll

    Does anyone know what I did wrong in order to get this particular message.

    THX

    Hi Flavio Ferrando,

    ·         Did you do changes on the computer before the show?

    Follow the suggestions below for a possible solution:

    Step 1: Start in safe mode and check if the problem persists.

    Start your computer in safe mode

    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

    Step 2: If the problem does not occur in safe mode, you can put your system to boot (in normal mode) to solve the problem.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: After troubleshooting, be sure to set the computer to start as usual as mentioned in step 7 in the above article.

    Hope this information helps.

  • Segfault on ~ SceneCover() / ~ AbstractCover()

    I use a custom file of qml Frame active.

    When I go out of my application, it cracks seg:

    The implementation of my class ~ ActiveFrameQML() is empty:

    ActiveFrameQML::~ActiveFrameQML()
    {
    }

    Not surprisingly, I'm baffled why close the application should be at the origin of segfault in this way, and because the segmentation fault that happens on the BB code, I feel a little at a loss for would be how to debug the problem.

    I looked back at:

    https://developer.BlackBerry.com/native/documentation/Cascades/UI/active_frames/index.html

    ... and compared to my implementation, and I noticed that, for some reason, I had Dale away from:

    ActiveFrameQML * activeFrame = new ActiveFrameQML();

    ... and has been rather set:

    ActiveFrameQML activeFrame.

    ... as a member of my class variable.

    And yet once, strangely, my name:

    Application::instance()-> setCover (activeFrame);

    ... from the inside:

    ActiveFrameQML::update()

    Anyway, I tried to make my implementation as close as possible to the reference implementation, and that seems to fix the problem. (and my Active Frame still works as expected, as far as I can tell)

    Not sure why I fired of the reference implementation at the time where I've implemented it.

  • Need help to add the libcurl library in QNX momentics IDE

    Hello

    I am new to the native SDK development for Tablet OS, I'm working on an application that were a part of the user interface, we need to manage the HTTP connections and also need to run in the background.

    I tried, but was unable to download the library libcurl to handle HTTP connections. Can someone give me the link to download the file to library for QNX momentics IDE and a source code example of the use of this library for manipulation of HTTP requests analysis JSON ?

    Also, I need to find a way to run my application in the background. So I'm looking for something to do.

    Thanks in advance .

    libcurl is integrated in the NDK. Simply import the headers in the file "curl" such as . Be sure to refer to the library (curl) in your project.

  • BBM SP recording segfault

    I'm trying one of the github BBM (BBMQtRegistration) samples.  It seems to work very well on the 'happy' way, but if I deny BBM connect permissions get segfault when trying to create the new bb:latform::bbm:Context. I would expect signal normal registrationStateUpdated with the State BlockedByUser in this case?

    It is a known problem in the current 10.0.9 setting listed in the Release Notes.

  • segfault in mapview

    Hey people,

    Recently, I noticed that after adding a few things to my application whenever I type now map my program crashes.  It is 10.1 and I ran a diff on an older version there is no change in the card in my code.  Even more bizarre, it of that I can check this older version, build and cards work fine.

    No idea how to understand this?  Track of the stack in the IDE has nothing as the sagfault goes with the mapview, not my code.  I disabled all the places and simply create the map, give him lat, lon and alt and view it and still get the crash (in the old version of the application, it still works very well with themselves).

    It's probably something I did but I wonder if there is a way to get more information when it segfaults, some newspapers or something (a link to the documentation describing how to get the balls or more information is cool, I have not found a yet, but more than happy to make the R of M F'in)

    Thank you

    Matt M

    Hahaha, that he fixed.

    I made a tag in my application after you have added a big news.  In my tests, I noticed that I could build that and the map was very good.  I decided that I wouldn't waste time trying to figure what was breaking and just re - implement everything until it crashed and I would know.

    So, I check the label and build and of course the card is fine.  I have check the trunk and take a diff of the source files, so that I can go on it all step by step.

    Then, because it's a long weekend, I'm outside and having a beer, I decide to copy the trunk source files in the workspace replace those that checked in the tag.

    Build the map and it is very well will all my features, french, etc..

    In other words, if you use a plan:

    If it's buggy, but you had a version that was not, discover the old one and replace the source files.  Something must have become corrupted in my project, something which is not not being rebuilt, etc.

    See you soon,.

    Matt M

  • libcurl return not CURLMSG_DONE

    Hello

    I have a libcurl section in our game who publishes on our server. Same libcurl routines are used in the Android/iOS and the PC version of the great game of the Big war.

    After posting an HTTP request, I get the correct answer from the server through the writedata callback, but I don't get the message CURLMSG_DONE of curvature to tell me it's the end of the packet. All other versions work in this way, is it something I am special I have to do?

    Mant thanks,

    Steve

    Repaired error, n00b. Move along, nothing to see here...

  • LibCurl Mac

    Hello

    Is it safe to make a link to LibCurl.dylib? Also that we should I use LibCurl, LibCurl.3 or LibCurl. 4. Is it static LibCurl.lib

    Thank you.

    P.

    I don't know what 'safe' means here.

    But, Yes, you can link to these dylibs for your plugin for InDesign projects.

    There is no need to explicitly create a library libcurl.

    Use the libcurl alias (without version), what may be done to the last. (check to view Original)

  • Cannot download file .vmx using libcurl

    Hello

    I'm trying to download the ESXi over HTTPS configuration file. I have to use libcurl, because the whole project written in c ++. My code:

    #include <curl/curl.h>
    
         static size_t CurlWriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp);
    int main() { 
         CURL *curl;  
         CURLcode res;           
     
         CurlMemoryStruct chunk;           
     
         chunk.size=0;          
         chunk.memory=new char[5300];            
     
         curl_global_init(CURL_GLOBAL_ALL);          
         curl = curl_easy_init();          
     
         if(curl)          
         {              
               res=curl_easy_setopt(curl, CURLOPT_URL,"https://192.168.179.131/folder/Deus Ex Machina/Deus Ex Machina.vmx?dcPath=ha-datacenter&dsName=datastore1");               
     
               /* we pass our 'chunk' struct to the callback function */              
               res=curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)&chunk);               
     
               /* send all data to this function  */              
               res=curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,CurlWriteMemoryCallback);               
     
               /* some servers don't like requests that are made without a user-agent field, so we provide one */              
               res=curl_easy_setopt(curl, CURLOPT_USERAGENT,"libcurl-agent/1.0");               
     
               //Set type of the authentication              
               res=curl_easy_setopt(curl, CURLOPT_HTTPAUTH,CURLAUTH_BASIC);               
     
               //Login for authentication              
               res=curl_easy_setopt(curl, CURLOPT_USERNAME, "root");               
     
               //Password for authentication              
               res=curl_easy_setopt(curl, CURLOPT_PASSWORD, "master");               
     
               //Don't verify the certificate              
               res=curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);               
     
               //Same thing with host verifying              
               res=curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);                
               res = curl_easy_perform(curl);               
     
               /* always cleanup */              
               curl_easy_cleanup(curl);  
     }   
     
    static size_t CurlWriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)  
    {      
         size_t realsize = size * nmemb;
         CurlMemoryStruct *mem = (CurlMemoryStruct *)userp;
         mem->memory =(char*) realloc(mem->memory, mem->size+realsize+1);
         if (mem->memory == NULL)
         {
               /* out of memory! */
               printf("not enough memory (realloc returned NULL)\n");
               exit(EXIT_FAILURE);
         }       
         memcpy(&(mem->memory[mem->size]), contents, realsize);      
         mem->size += realsize;      
         mem->memory[mem->size] = 0;       
         return realsize;  
     }
    

    When I type this address ( https://192.168.179.131/folder/Deus Ex Machina / Deus Ex Machina.vmx? dcPath = ha-datacenter & dsName = datastore1 ) in the browser, the file is downloaded.

    My program work even not hollow CurlWriteMemoryCallback() function - breakpoint does not work. The same code with the url "https://192.168.179.131" works quite well.

    I don't understand what the problem is.

    Hello!

    Have you tried a virtual machine name not containing not places? Disorders of hade VMware to escape characters in the URL all the time.

    If not try esacping spaces in the way http...

    Tos2k

  • Semi-aleatoire segfaults when returning to snapshots

    I have a set of ESX 4.0.0 boxes where I am under some highly automated processes that require me to return frequently to snapshot. After beating my head against the wall for awhile on the fact that every third day or more, dies of VMware in such a way that I have to restart so that I can connect to my guests of the VIX Perl API, I decided to solve the problem by automating a daily reboot of those systems. Now, I ran into a snag even one really, really basic piece of code--my script to return to travellers in the snapshot is segfaulting (throwing a SIGSEGV) to semi random intervals, using the Perl API and the C API.

    The code for the C version of my script (I moved so that it is easier to debug this kind of thing in c) is as simple as it gets, largely copied from the sample file snapshot.c for the API version 1.8.1 (which is what I am running):

    #include <stdio.h>
    #include <strings.h>
    #include <vmware-vix/vix.h>
    
    #define CONNTYPE VIX_SERVICEPROVIDER_VMWARE_VI_SERVER
    #define HOSTPORT 0
    #define USERNAME "root"
    #define PASSWORD "yourefunnyifyouthinkimpostingithere"
    #define VMPOWEROPTIONS VIX_VMPOWEROP_NORMAL
    
    int main(int argc, char **argv) {
            VixError err;
            char *vmxPath;
            char *hostname;
            VixHandle hostHandle = VIX_INVALID_HANDLE;
            VixHandle jobHandle = VIX_INVALID_HANDLE;
            VixHandle vmHandle = VIX_INVALID_HANDLE;
            VixHandle snapshotHandle = VIX_INVALID_HANDLE;
            int numSnapshots;
            int firstHost = 0;
            int lastHost = 0;
            int x;
            char vmName[45];
    
            if (argc > 1) {
                    hostname = argv[1];
            }
            if (argc > 2) {
                    firstHost = atoi(argv[2]);
            }
            if (argc > 3) {
                    lastHost = atoi(argv[3]);
            }
    
            if (firstHost == 0) {
                    firstHost = 2;
            }
            if (lastHost == 0) {
                    lastHost = 30;
            }
    
            jobHandle = VixHost_Connect(VIX_API_VERSION,
                                            CONNTYPE,
                                            hostname,
                                            HOSTPORT,
                                            USERNAME,
                                            PASSWORD,
                                            0,
                                            VIX_INVALID_HANDLE,
                                            NULL,
                                            NULL);
            err = VixJob_Wait(jobHandle,                                 VIX_PROPERTY_JOB_RESULT_HANDLE,
                                    &hostHandle,
                                    VIX_PROPERTY_NONE);
            if (VIX_FAILED(err)) {
                    dieGracefully(jobHandle, vmHandle, snapshotHandle, hostHandle);
            }
            Vix_ReleaseHandle(jobHandle);
    
            printf("Successfully connected to host %s\n", hostname);
    
            for (x = firstHost; x <= lastHost; x++) {
                    bzero(vmName, 45);
                    sprintf(vmName, "[Storage1] Virus Clone %d/Virus Clone %d.vmx", x, x);
                    jobHandle = VixVM_Open(hostHandle,
                                            vmName,
                                            NULL,
                                            NULL);
                    err = VixJob_Wait(jobHandle,
                                            VIX_PROPERTY_JOB_RESULT_HANDLE,
                                            &vmHandle,
                                            VIX_PROPERTY_NONE);
                    if (VIX_FAILED(err)) {
                            dieGracefully(jobHandle, vmHandle, snapshotHandle, hostHandle);
                    }
                    Vix_ReleaseHandle(jobHandle);
                    printf("Connected to VM %d\n", x);
    
                    err = VixVM_GetRootSnapshot(vmHandle, 0, &snapshotHandle);
                    if (VIX_FAILED(err)) {
                            dieGracefully(jobHandle, vmHandle, snapshotHandle, hostHandle);
                    }
    
                    jobHandle = VixVM_RevertToSnapshot(vmHandle,
                                                            snapshotHandle,
                                                            VMPOWEROPTIONS,
                                                            VIX_INVALID_HANDLE,
                                                            NULL,
                                                            NULL);
    
                    err = VixJob_Wait(jobHandle, VIX_PROPERTY_NONE);
                    if (VIX_FAILED(err)) {
                            dieGracefully(jobHandle, vmHandle, snapshotHandle, hostHandle);
                    }
                    printf("Reverted VM %d to snapshot\n", x);
            }
    
            return 0;
    }
    
    int dieGracefully(VixHandle j, VixHandle v, VixHandle s, VixHandle h) {
            Vix_ReleaseHandle(j);
            Vix_ReleaseHandle(v);
            Vix_ReleaseHandle(s);
            VixHost_Disconnect(h);
    
            return -1;
    }
    

    My Makefile is just too basic; the only real difference of the sample, is that I am a pthreads link manually in my binary, so the GDB can debug correctly:

    WRAPPER = -lvixAllProducts -ldl
    SERVER11 = /usr/lib/vmware-vix/server-1/64bit/libvix.so
    WORKST60 = /usr/lib/vmware-vix/ws-3/64bit/libvix.so
    SERVER20 = /usr/lib/vmware-vix/VIServer-2.0.0/64bit/libvix.so
    WORKST65 = /usr/lib/vmware-vix/Workstation-6.5.0/64bit/libvix.so
    WRAPORNOT = $(WRAPPER)
    VIXH = -I/usr/include/vmware-vix
    
    all: eventPump startup
    
    eventPump: eventPump.c
            gcc $(VIXH) eventPump.c -o eventPump -lpthread $(WRAPORNOT)
    
    startup: startup.c
            gcc $(VIXH) startup.c -o startup -lpthread $(WRAPORNOT)
    
    clean:
            rm -f eventPump startup
    

    I use this script on a 64 bit Ubuntu 9.10 system, gcc 4.4.1 Installing enough vanilla.

    When I ran my script in GDB, after venerating the first invited several successfully, I got the following:

    Program received signal SIGSEGV, Segmentation fault.
    0x00007ffff5193084 in ?? () from /usr/lib/vmware-vix/VSphere-4.0/64bit/libgvmomi.so.0
    (gdb) bt
    #0  0x00007ffff5193084 in ?? () from /usr/lib/vmware-vix/VSphere-4.0/64bit/libgvmomi.so.0
    #1  0x00007ffff5193f94 in ?? () from /usr/lib/vmware-vix/VSphere-4.0/64bit/libgvmomi.so.0
    #2  0x00007ffff52fd5eb in ?? () from /usr/lib/vmware-vix/VSphere-4.0/64bit/libgvmomi.so.0
    #3  0x00007ffff5e3b282 in g_object_get_valist () from /usr/lib/vmware-vix/VSphere-4.0/64bit/libgobject-2.0.so.0
    #4  0x00007ffff5e3b57a in g_object_get () from /usr/lib/vmware-vix/VSphere-4.0/64bit/libgobject-2.0.so.0
    #5  0x00007ffff48fd353 in ?? () from /usr/lib/vmware-vix/VSphere-4.0/64bit/libvix.so
    #6  0x00007ffff48d4cee in VixVM_GetRootSnapshot () from /usr/lib/vmware-vix/VSphere-4.0/64bit/libvix.so
    #7  0x0000000000400ca1 in main ()
    

    I am at a total loss here - this should be something incredibly basic, simple, and it is apparently not. Anyone has an idea why something so simple would break?

    What Vix do you use?

    Track suggests its a ugly race dealing with updates of the snapshot - related make a snapshot operation, while the snapshot tree is being filled could hit freed memory.  Its possible that your code might be tripping over it.   This is fixed in the current version of the 1.10 beta

    (http://www.vmware.com/support/developer/vix-api/)

    You could also do a DIY quick test with a sleep() before and after snapshot operations.

  • What version of openssl and libcurl to use?

    We are Member of the VMware TAP alliance and so are bulking VDDK components with our linux application. But since

    our application also needs to dynamically bind with openssl and libcurl (for other reasons) I do not know what exact version of openssl and libcurl

    to use. We want to build libcurl and openssl source, also want to know what options to build should be used for the same, that we

    you want to collect only one pair of openssl and libcurl with our application libraries. Any help/ideas in this direction will be appreciated.

    Hello

    If there are patches for the opensource libs, we will keep the patches in 'Open Source' download VDDK downloads section. Otherwise, the procedure of compiler options is the same as that recommended by the package open source.

    I guess you want to build for debugging/internal purposes and redistribute to those you get with VDDK, is that correct?

    HTH,

    Annick

  • Python segfault

    Hello

    Following is a test program that I wrote. I'm trying to make the inserts multiprocessues. Sometimes, the program seems impasse and any other time, when it ends, it segfaults in the end, complaining to manage a database is still in use. I'm opening and remove the container from the parent process and using the multiprocessing module to manage the fork and the CPI for me.

    from bsddb3.db import *.
    from dbxml import *.
    time of import

    multiprocessing import process, pool, queue

    numberOfItems = 100000

    «"XML =" "" < item > < type / > < / item >»»»

    def strAsDocument (mgr, str):
    doc = mgr.createDocument)
    doc.setContent (str)
    return doc

    def insertDoc (container, environment, mgr, number):
    xtxn = mgr.createTransaction)
    UC = mgr.createUpdateContext)
    name = [];
    Print 'inserting' + str (number) + "records".
    because I in xrange (number):
    name = container.putDocument ("item", xtxn, uc, DBXML_GEN_NAME, xml)
    Names.Append (Name)
    xtxn.Commit)
    Print "done."
    CPU led
    del xtxn

    def getCurrentCard:
    environment = DBEnv()
    Environment.set_CacheSize (0, 25 * 1024 * 1024)
    Environment.Open ("env", DB_CREATE |) DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_TXN | DB_RECOVER | DB_THREAD, 0)
    Try:
    config = XmlContainerConfig()
    config.setAllowCreate (True)
    config.setTransactional (True)
    Mgr = XmlManager (environment, 0)
    UC = mgr.createUpdateContext)

    Try:
    mgr.removeContainer ("test.dbxml")
    except:
    Pass
    container = mgr.openContainer ("test.dbxml", config)
    container.setAutoIndexing (False, CPU)

    before = time.time)
    PS =]
    I'm in range (5):
    p = process (target = insertDoc, args = (container, environment, mgr, 2000))
    p.Start)
    PS. Append (p)

    for p PS:
    p.Join)

    print time.time () - front

    del container
    Bishop del
    CPU led

    the XmlException exception, inst:
    Print "XmlException (', inst.exceptionCode, '): ', inst.what»»
    If inst.exceptionCode is DATABASE_ERROR:
    Print "Database error code:", inst.dbError "»

    Environment.Close (0)

    I'm in range (5):
    getCurrentCard



    gives me:

    [root@vladivar python] # python test.py
    Insert records 2000
    Insert records 2000
    Insert records 2000
    Insert records 2000
    Insert records 2000
    fact
    fact
    fact
    fact
    fact
    2.8827149868
    Traceback (most recent call changed):
    File "test.py", line 72, < module >
    getCurrentCard
    File "test.py", line 69, in time
    Environment.Close (0)
    bsddb3.DB.DBInvalidArgError: (22, ' Invalid argument - handle Open database: test.dbxml/secondary_configuration "")
    Segmentation fault

    Thank you.

    sigh Yes, the opening must be serialized and done by a running process. the reason is that she must be atomic in the creation of the environment. It is because the environment is on the disc - these __db files. If several processes creates or retrieves and environment at the same time - kaboom!

    It gets more interesting. If a transaction fails or something rough happens, the environment must be removed and recovered. This means that if you have several processes using the same environment, they need to communicate to eachother when this scenario occurs, all but one have to stop and give up all operations, wait for a single process to recover, and then retry transactions. If you're just messing around don't you worry about this, but if you build a scalable application that should play in your immediate design. If you plan this route I'll spend some time to find a "Manual of application design" which I happenstanced around a while ago. I can also spend some time talking about my app, but if you're not here I will keep 1 million words.

    Your blocking occurs probably the munging eachother operations. When I ran your code else I could invoke blockages sometimes as well so I would not spend too much time to think about it.

    Let me know if you need this info - I have a large library for python that is unfortunately closed in bla IP, but I had intended to write a manual of survival for someone who needs python + xmldb.

    eleddy

  • upgrade to lucid lynx-amd64, firefox is no longer starts, even in safe mode, segfault of the final reports.

    Upgrade to Ubuntu lucid lynx, Firefox 64-bit platform will start is no longer, even in SafeMode terminal - terminal reports attempt to load the system libmoon Segmentation fault. Thunderbird works fine. Non-installed/re-installed without success.

    User Agent

    Mozilla/5.0 (X 11; U; Linux x86_64; Chrome/5.0.342.9 en-US) AppleWebKit/533,2 (KHTML, like Gecko) Safari/533,2

    I completely everything related to firefox in synaptic package manager uninstalled, then reinstalled the latest version of firefox again.
    One of the Add - ons obviously prevented firefox from opening, not sure that one well. I hope it helps someone else. Firefox now works.

Maybe you are looking for

  • Other unable to download Update July 2016, anyone?

    If the Podcast app appears in iTunes on the update tab.  However, when I click on download, I get an error message with: Podcasts is available only on iOS. To get podcasts, search for it on the App Store on your iOS device. of course, which is an emp

  • Swollen battery will replace free Apple?

    I have an iPhone 5 s, which is about 2 years old now and the screen was lifted upwards in the last days. After doing some research, I decided that it is very probably an inflated, some sites said that apple would replace the phone for free is - anyon

  • Why the last Satellite L850-138 display driver is older?

    Last June, Toshiba update the display drivers for my laptop to 9.0... But a few days ago they just pulled out an older version. Why? Look at this: 18/06 / 13--> 9.012 - 121219 a-15688 24/09 / 13--> 8.932.5.3 - 120120 a WTF?

  • Windows Media Player playback speed problem - static...

    I play an MP3 to an audio book on WMP file and when I go on it 2 X normal playback speed, suddenly the sound produces a static noise. The audio is always readable, but static electricity is super annoying. Do you know what causes this and how to fix

  • How to get to double line spacing in Word Pad.

    I can't find the button space Douple in Word Pad