Subject Re: Re-2: [firebird-support] Engine crash on gds_free
Author Phil Shrimpton
On Thursday 10 June 2004 09:32, bl@... wrote:

Hi,

> > We have a problem with one of our apps that produced very simlar log file
> > entries (including the 100054 errors), and it turned out that some of the
> > code was not as thread safe as it could be (one connection being accessed
> > by more than one thread).
>
> I will have a look and see if there are any two DB operations sharing a
> thread that should not.

In our case, the problem was with one thread accessing a connection created
in the main application 'thread'. This bit of code was protected with a
critical section, so no two threads would ever access the code at the same
time, but it seems FB did not like the fact the connection was being accessed
by a thread other than the one that created it, even if it was protected by a
critcal section. Looking through our bug tracker shows this problem caused
almost the same log entries as your issue.

> Actually the app has been running in several
> installations 24/7 for more that 2 years now and never had this type of
> crash before. But well this might be the curse of mulithreading ...

Same here. Our app worked fine at a number of sites with single and dual
processors, but only started to show up on systems with 2 or more HT cpu's.

Phil

--
Discover a lost art - play Marbles
May 2004
www.marillion.com
ICQ: 760757 | AIM: pjshrimpton | Y!: pjshrimpton | pjshrimpton@...