Re: [sqlite] segmentation violation in fulltest on Mac OS X

2009-01-20 Thread Jens Miltner

Am 19.01.2009 um 18:42 schrieb D. Richard Hipp:

>
> On Jan 19, 2009, at 3:50 AM, Jens Miltner wrote:
>
>> Hello,
>>
>> I just upgraded to sqlite 3.6.10 and keep getting a segmentation
>> violation when running the full tests on Mac OS X:
>> The last test completed is consistently thread001.1.3.
>>
>
> This was a problem in the testing logic, not in the SQLite library
> itself.  The test logic was trying to run a threading test with some
> of the mutexes disabled.  Everything works correctly once mutexes are
> enabled properly.


Thanks for the info - I applied the changes from checkin #6193 and the  
seg violations disappeared.
However, I now get another bus error in perm-no_mutex_try.thread003.2

Do you need additional information?

-jens


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] segmentation violation in fulltest on Mac OS X

2009-01-19 Thread Eric Minbiole
> Of course, I wasted 4 hours tracking the problem down.  This is  
> yet another episode that demonstrates how threads are a pernicious  
> evil that should be studiously avoided in any program that you  
> actually want to work.  Threads cause hard-to-trace bugs.  Threads  
> result in non-deterministic behavior.  Threads make programs run  
> slower.  Just say "No" to threads...

Let me start by saying that I have a great respect for SQLite and its 
developers.  I'm extremely pleased with the code itself as well as with 
the great support community. :)

However, I'm a bit surprised by the "threads are evil" mantra. 
Certainly, threads can cause "hard-to-trace bugs" when used improperly. 
  However the same can be said for many other language constructs, such 
as pointers, dynamic allocation, goto statements, etc.  Any tool can get 
you into trouble if abused.

No matter how you slice it, concurrent programing can be tricky.  While 
  multi-thread and multi-process approaches each have pros and cons, the 
dangers are the same: The programmer must take cautions to ensure that 
any shared resource is accessed safely.  When used properly, either 
approach can work reliably.

I have no doubt that there are many cases where the multi-process 
approach has clear benefits.  Indeed, if one prefers the multi-process 
approach, then by all means use it.  However, a multi-threaded approach 
can have benefits as well.  Advocating a "one size fits all" approach 
for everyone, without knowing the details of a particular application, 
just seems an oversimplification to me.

Sorry for my rant :)

~Eric
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] segmentation violation in fulltest on Mac OS X

2009-01-19 Thread Martin Engelschalk
Hello,

Threads: use them, but don't abuse them
Threads don't kill programs, programmers do ;-)

Martin

D. Richard Hipp wrote:
> On Jan 19, 2009, at 3:50 AM, Jens Miltner wrote:
>
>   
>> Hello,
>>
>> I just upgraded to sqlite 3.6.10 and keep getting a segmentation
>> violation when running the full tests on Mac OS X:
>> The last test completed is consistently thread001.1.3.
>>
>> 
>
> This was a problem in the testing logic, not in the SQLite library  
> itself.  The test logic was trying to run a threading test with some  
> of the mutexes disabled.  Everything works correctly once mutexes are  
> enabled properly.
>
> Of course, I wasted 4 hours tracking the problem down.  This is  
> yet another episode that demonstrates how threads are a pernicious  
> evil that should be studiously avoided in any program that you  
> actually want to work.  Threads cause hard-to-trace bugs.  Threads  
> result in non-deterministic behavior.  Threads make programs run  
> slower.  Just say "No" to threads...
>
> D. Richard Hipp
> d...@hwaci.com
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>   
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] segmentation violation in fulltest on Mac OS X

2009-01-19 Thread jose isaias cabrera

"D. Richard Hipp" said,
> slower.  Just say "No" to threads...

Can I quote you on that? :-)

josé 

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] segmentation violation in fulltest on Mac OS X

2009-01-19 Thread D. Richard Hipp

On Jan 19, 2009, at 3:50 AM, Jens Miltner wrote:

> Hello,
>
> I just upgraded to sqlite 3.6.10 and keep getting a segmentation
> violation when running the full tests on Mac OS X:
> The last test completed is consistently thread001.1.3.
>

This was a problem in the testing logic, not in the SQLite library  
itself.  The test logic was trying to run a threading test with some  
of the mutexes disabled.  Everything works correctly once mutexes are  
enabled properly.

Of course, I wasted 4 hours tracking the problem down.  This is  
yet another episode that demonstrates how threads are a pernicious  
evil that should be studiously avoided in any program that you  
actually want to work.  Threads cause hard-to-trace bugs.  Threads  
result in non-deterministic behavior.  Threads make programs run  
slower.  Just say "No" to threads...

D. Richard Hipp
d...@hwaci.com



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users