Subject Re: [firebird-support] Re: How to detect a dead-lock?
Author Magicloud Wang
Dear,
Thanks for help.

On 2007年12月24日Monday 18:54:56 Helen Borrie wrote:
> At 08:22 PM 24/12/2007, you wrote:
> >Dear,
> > It seems like not a dead-lock.
>
> You are not giving us any useful information.
I am not sure what information to give. I looked
into /var/log/firebird2.0.log, it seems nothing wrong.
Any suggestion?
>
> >I can not shut the database with fbmgr,
> >either.
>
> The fbmgr tool is not used for managing Classic processes. It provides an
> interface for stopping/starting/restarting the executable program fbserver,
> that is the server component of the Superserver model.
I was using super server.
>
> >Just hung.
>
> We cannot tell what "hung" means.
By hung, I mean the clients have no response. The two clients I mentioned, one
is flamerobin, which I did not debug, so I do not know where exactly it
stoped. While the other is made by myself, and I found out that it stoped
just on the query line.
All I did is using flamerobin to query all of TOPICS table in help.fdb, then
(after finishing the query, but not closing the query window) using my
program to read the table, my program hang, I had to kill it. The same time,
the GUI of flamerobin could not response, too. I had to kill it, too.
>
> Some background information (assumng Linux, from your email header):
>
> 1. The "Classic" model (on Linux) consists of one instance of the
> executable process fb_inet_server that will be started by the xinetd daemon
> if a client succeeds in making a connection to a database. -- You cannot
> make this type of connection if you do not supply a network path to the
> database. -- You can use either libfbclient.so or libfbembed.so as your
> client here. libfbclient.so is the generic client-only client component.
> libfbembed.can be used for this style of connection if you use the TCP/IP
> local loopback server (localhost, or IP 127.0.0.1). In this context, only
> the client part of libfbembed.so is used.
>
> 2. Alternatively, an *embedded* Classic process on Linux can be created by
> using the libfbembed.so component as both client and server, by providing a
> local path to the database, i.e., with no IP address or servername in the
> connection string. In this context, a Classic process is started within
> the libfbembed.so component that connects directly AND EXCLUSIVELY to the
> database file.
>
> This is not a "deadlock": it is a device lock. A database is a device.
> It can be connected to by only one server. While active, the embedded
> server has a device lock that prevents xinetd or another embedded server
> instance from making a connection. To end this lock, detach this
> connection. Then, xinetd will be able to make connections for your network
> client requests.
>
> Please study the Quick Start Guide.
>
> ./heLen