Howard,

First I installed gdb for MinGW64 and I took your advice and added tests
for rc in the many calls to start the database. I never got a non-zero
return code. And running with gdb I have not been able to reproduce the
problem even when running as:" while true ; do gdb -ex run mtest -ex quit ;
done ;" which I killed after about 25 runs.

I then added a bunch of printf, starting before the call to rand() and when
I get a seg fault, I see none of the messages. Also a bit strange, it seems
that it's getting harder to get the issue to happen and the "wait time" to
retry is shorter. Really looks like a timing issue.

Cheers,
Alain


On Sun, Sep 29, 2013 at 8:11 AM, Alain <[email protected]> wrote:

> Howard,
>
> Thanks for the reply. See below
>
> On Sat, Sep 28, 2013 at 9:44 PM, Howard Chu <[email protected]> wrote:
>
>> Alain wrote:
>>
>>> I am not an expert at this, so I might be doing things incorrectly.
>>>
>>> I used Mingw x86_64 to build LMDB (just changed the CC in the Makefile).
>>> I had
>>> an issue with srandom and random in the test programs and switch to rand
>>> instead. Now I can build successfully and make test runs mtest
>>> successfully.
>>>
>>> Now if I try one of the other mtest[2-5] or mtest itself, I get sporadic
>>> segmentation fault. If I wait long enough it will always work, but
>>> running the
>>> programs in a kind of loop guarantees a seg fault error.
>>>
>>
>> That's pretty normal. The test programs don't do any error checking.
>> You're welcome to submit a patch adding the requisite error checking.
>>
>> When you run the tests repeatedly eventually the DB grows to its maxsize
>> limit and a write request fails. After that things crash because the
>> library is returning failure codes that the test programs ignore.
>
> This is surely not the case here. As I noted, "if I wait long enough it
> will always work". I was not trying to run the test programs hundreds of
> times, but simply like once or twice each. Again, if it fails, wait about
> 30 secs, and try again and it will work.
>
>>
>>
>>  I wanted to try running with gdb but it seems that it doesn't ship with
>>> cygwin
>>> for Mingw. Using standard gdb gives me a 193 error. Again this is
>>> getting past
>>> my expertise here.
>>>
>>
>> The test programs are actually only intended to be used with gdb, but
>> yes, it's a pain finding a working gdb for MinGW64. The one I'm currently
>> using is 7.1.90.20100730-cvs
>>
>> http://sourceforge.net/**projects/mingw-w64/files/**
>> External%20binary%20packages%**20%28Win64%20hosted%29/gdb/<http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/gdb/>
>
>
> Great will use it.
>
>>
>>
>>  Has anyone successfully build LMDB for Windows and can help here.
>>>
>>> Cheers,
>>> Alain
>>>
>>
>>
>> --
>>   -- Howard Chu
>>   CTO, Symas Corp.           http://www.symas.com
>>   Director, Highland Sun     http://highlandsun.com/hyc/
>>   Chief Architect, OpenLDAP  
>> http://www.openldap.org/**project/<http://www.openldap.org/project/>
>>
>
>

Reply via email to