Re: [firebird-support] Re: lock denied...

2017-12-08 Thread ehmmm.fireb...@seznam.cz [firebird-support]
Anyway thank you for your effort.
Do you think the problem might be caused more likely by embedded clients vs.
SuperClient or just by "heavy load"?

(Meanwhile FB3.0 SuperServer runs already two days without any trouble.)

Here are the version numbers but I'm not any linux guru so I hope that's 
what you expected:

firebird -z
Firebird TCP/IP server version LI-V3.0.3.32796 Firebird 3.0
(I downloaded it couple months ago from built snapshots. I didn't compile it
myself.)

uname -a
Linux z3 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux
(It should be some ordinary Debian Stretch.)

libc-2.24.so
GNU C Library (Debian GLIBC 2.24-11+deb9u1) stable release version 2.24, by 
Roland McGrath et al.
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 6.3.0 20170516.
Available extensions:
    crypt add-on version 2.1 by Michael Glad and others
    GNU Libidn by Simon Josefsson
    Native POSIX Threads Library by Ulrich Drepper et al
    BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.

gcc --version
gcc (Debian 6.3.0-18) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22

Jakub

-- Původní e-mail --
Od: peshk...@mail.ru [firebird-support] 
Komu: firebird-support@yahoogroups.com
Datum: 8. 12. 2017 11:36:34
Předmět: [firebird-support] Re: lock denied... 
" 
  



Unfortunately dump happened to be useless. It confirmed that problem is with
database lock and type of the problem, but that was rather clear from log 
records, and unfortunately nothing about the reasons.

As the next step please first of all provide OS info - kernel, libc, gcc and
libstdc++ versions.




"

[firebird-support] Re: lock denied...

2017-12-08 Thread peshk...@mail.ru [firebird-support]
Unfortunately dump happened to be useless. It confirmed that problem is with 
database lock and type of the problem, but that was rather clear from log 
records, and unfortunately nothing about the reasons.

As the next step please first of all provide OS info - kernel, libc, gcc and 
libstdc++ versions.

Re: [firebird-support] Re: lock denied...

2017-12-06 Thread ehmmm.fireb...@seznam.cz [firebird-support]
Hi,
here is the link:
https://ulozto.net/!wM4fFP0Kpnuq/fb-lock-table-dump
There are options "Fast download" and "Slow download".
If you don't want to register then you must use "Slow download" and type 
captcha code.

Jakub


-- Původní e-mail --
Od: peshk...@mail.ru [firebird-support] 
Komu: firebird-support@yahoogroups.com
Datum: 6. 12. 2017 10:48:27
Předmět: Re: [firebird-support] Re: lock denied... 
" 
  



First of all regarding yesterday file. Unfortunately "Non-text portions of 
thAT message have been removed". So please upload that file to any public 
file-sharing you better like (except yandex & mail.ru). Sorry for 
inconveniences - that's not me who invited yahoo interface...

> But you should write me what and where must be configured to obtain some 
error dumps when it falls down.

Install appropriate debug info (in our builds it's always placed as a pair 
for binary package). After it adding BugcheckAbort=1 to firebird.conf should
be enough. And get ready that this may be a long process - may be I will 
have to send you some special builds with additional debugging.

> Because firebird didn't restarted itself since yesterday afternoon then I'
ll have to restart it manually to enable legacy authentication.

That's bad solution but that's your solution. That backward compatibility 
feature was kept in firebird for such cases.

>Together with this change I'm thinking about moving firebird temp dir to 
tmpfs because I've read on some IBSurgeon pages that it might improve 
perfomance.
>(In my Debian Stretch directory /run seems suitable for this.)
>Do you think it's really worth it?

That highly depends upon RAM usage on your box. If you have enough RAM - 
that's useful, if not - may cause performance degradation.

Also please provide info about your kernel, libc and libstdc++ versions.




"

Re: [firebird-support] Re: lock denied...

2017-12-06 Thread peshk...@mail.ru [firebird-support]
First of all regarding yesterday file. Unfortunately "Non-text portions of thAT 
message have been removed". So please upload that file to any public 
file-sharing you better like (except yandex & mail.ru). Sorry for 
inconveniences - that's not me who invited yahoo interface...

> But you should write me what and where must be configured to obtain some 
> error dumps when it falls down.

Install appropriate debug info (in our builds it's always placed as a pair for 
binary package). After it adding BugcheckAbort=1 to firebird.conf should be 
enough. And get ready that this may be a long process - may be I will have to 
send you some special builds with additional debugging.

> Because firebird didn't restarted itself since yesterday afternoon then I'll 
> have to restart it manually to enable legacy authentication.

That's bad solution but that's your solution. That backward compatibility 
feature was kept in firebird for such cases.

 >Together with this change I'm thinking about moving firebird temp dir to 
 >tmpfs because I've read on some IBSurgeon pages that it might improve 
 >perfomance.
>(In my Debian Stretch directory /run seems suitable for this.)
 >Do you think it's really worth it?

That highly depends upon RAM usage on your box. If you have enough RAM - that's 
useful, if not - may cause performance degradation.

Also please provide info about your kernel, libc and libstdc++ versions.

Re: [firebird-support] Re: lock denied...

2017-12-06 Thread ehmmm.fireb...@seznam.cz [firebird-support]
It's me again.
FB3 in SuperServer mode seems to run without any trouble for almost the 
whole day.

Anyway, if you are interested I offer you that I might prepare second test 
server with almost the same SW and very similar load and FB in SuperClient 
mode.
But you should write me what and where must be configured to obtain some 
error dumps when it falls down.
I would like to give you enough information to fix the "lock denied" 
problems.

And another question:
Because firebird didn't restarted itself since yesterday afternoon then I'll
have to restart it manually to enable legacy authentication.
(I have to enable this due to some old clients which I'm not going to 
upgrade.)
Together with this change I'm thinking about moving firebird temp dir to 
tmpfs because I've read on some IBSurgeon pages that it might improve 
perfomance.
(In my Debian Stretch directory /run seems suitable for this.)
Do you think it's really worth it?

Best regards,
Jakub



-- Původní e-mail --
Od: ehmmm.fireb...@seznam.cz [firebird-support] 
Komu: firebird-support@yahoogroups.com
Datum: 5. 12. 2017 13:50:30
Předmět: Re: [firebird-support] Re: lock denied... 
" 
  



Well, I'll try to answer myself about the C and SuperServer.
It seems that the only problem is in:
EXEC SQL SET DATABASE DB = '/var/lib/firebird/2.5/data/xxx.fdb';
When add ip adress and I change it to:
EXEC SQL SET DATABASE DB = '127.0.0.1:/var/lib/firebird/2.5/data/xxx.fdb';
then it seems to work even in SuperServer (if Firebird really runs in 
SuperServer after changing /opt/firebird/firebird.conf)

This brings another question - how can I recognize in which mode is Firebird
running?

Best regards,
Jakub



-- Původní e-mail --
Od: ehmmm.fireb...@seznam.cz [firebird-support] 
Komu: firebird-support@yahoogroups.com
Datum: 5. 12. 2017 10:44:48
Předmět: Re: [firebird-support] Re: lock denied... 
" 
  



Thank you for your response.
Compared to you I'm just a beginner so I have other questions.

> i see no relation between such services and requirement to use 
SuperClassic

I din't investigate it much but I think it is becuase the C programs it is 
historically written something like this:

int dbConnect()
{
    EXEC SQL
    SET DATABASE DB = '/var/lib/firebird/2.5/data/xxx.fdb';
    EXEC SQL
    CONNECT DB USER 'xxx' PASSWORD 'xxx';
    ...

(Don't get confused by the "2.5" subdirectory, I did "gbak -r" to 3.0 
version but I put it in the old dir.)
I think that in this case the C programs access somehow more directly and 
they can't cooperate with SuperServer.
But I promise I'll lokk at it.

> Try to lower load on lock manager.
Please how? Make less connections?

> Switch to Super
Discussed above.

> or try to increase linger on security3.fdb(it is 60 sec by default).
Please how?
I've found some: "ALTER DATABASE SET LINGER TO"
I guess I'll have to do it via isql and not by Flamerobin. (?)
How can I check how much is it right now?
(I've found some tip "gstat -h" which I use for sweeping monitor. But I can'
t see there any "linger".)
I've found some presentation that this "linger functionality" has effect 
whene there are no connections.
But I think that I have there new attachments almost every second. (?)

> If there was coredump produced by crash, you may provide us with 
backtraces of all stacks. 
How can I get this dump?
I've found some document from 2008 mentioning BugcheckAbort=1 in the 
firebird.conf.
That's it?





Jakub


-- Původní e-mail --
Od: hv...@users.sourceforge.net [firebird-support] 
Komu: firebird-support@yahoogroups.com
Datum: 5. 12. 2017 10:15:00
Předmět: [firebird-support] Re: lock denied... 
" 
  



---In firebird-support@yahoogroups.com,  wrote :




> last weekend we switched from FB 2.5.x to  FB V3.0.3.32796
> 
> We have couple databases, the biggest has around 12 GB.
> About 100-200 clients are connecting to this DB via PHP approximately 
twice per minute to see some data.
> Some services on server are writing data into this DB.


> We are using FB in SuperClassic mode, because some services are written in
C and compiled via gpre/gcc.





  Hmm... i see no relation between such services and requirement to use 
SuperClassic.

Сould you try Super mode ? SuperClassic in FB3 is legacy and not recommended
mode.





> In firebird log I can see messages like this:
> 
> z3  Sun Dec  3 01:43:15 2017
>     Database: /opt/firebird/security3.fdb
>     page 0, page type 1 lock denied (216)


...
> Could you please explain me, what do this messages mean?



  It looks like bug due to race condition when lock manager initialized 
shared memory while another 


instance (attachment) is deinitialized it (i

Re: [firebird-support] Re: lock denied...

2017-12-05 Thread ehmmm.fireb...@seznam.cz [firebird-support]
Thank you for your response.

You are right, the /tmp/firebird/fb_lock_table.dump is really there.
I've attached it.

It has the same timestamp like the "Fatal lock manager error" event, ie. 00:
11.

I'm quite interested what you will find inside.

Jakub


-- Původní e-mail --
Od: peshk...@mail.ru [firebird-support] 
Komu: firebird-support@yahoogroups.com
Datum: 5. 12. 2017 14:52:24
Předmět: [firebird-support] Re: lock denied... 
" 
  



Yes, minimum requirement to let your program talk to SS is to avoid embedded
connections, and one of the ways to do it is to add hostname/ip-address 
before database name.

Is there /tmp/firebird/fb_lock_table.dump on your box? If yes please upload 
it here - it can give an idea what's wrong with SC in your case.




"

[Non-text portions of this message have been removed]



[firebird-support] Re: lock denied...

2017-12-05 Thread peshk...@mail.ru [firebird-support]
Yes, minimum requirement to let your program talk to SS is to avoid embedded 
connections, and one of the ways to do it is to add hostname/ip-address before 
database name.

Is there /tmp/firebird/fb_lock_table.dump on your box? If yes please upload it 
here - it can give an idea what's wrong with SC in your case.

Re: [firebird-support] Re: lock denied...

2017-12-05 Thread ehmmm.fireb...@seznam.cz [firebird-support]
Well, I'll try to answer myself about the C and SuperServer.
It seems that the only problem is in:
EXEC SQL SET DATABASE DB = '/var/lib/firebird/2.5/data/xxx.fdb';
When add ip adress and I change it to:
EXEC SQL SET DATABASE DB = '127.0.0.1:/var/lib/firebird/2.5/data/xxx.fdb';
then it seems to work even in SuperServer (if Firebird really runs in 
SuperServer after changing /opt/firebird/firebird.conf)

This brings another question - how can I recognize in which mode is Firebird
running?

Best regards,
Jakub


-- Původní e-mail --
Od: ehmmm.fireb...@seznam.cz [firebird-support] 
Komu: firebird-support@yahoogroups.com
Datum: 5. 12. 2017 10:44:48
Předmět: Re: [firebird-support] Re: lock denied... 
" 
  



Thank you for your response.
Compared to you I'm just a beginner so I have other questions.

> i see no relation between such services and requirement to use 
SuperClassic

I din't investigate it much but I think it is becuase the C programs it is 
historically written something like this:

int dbConnect()
{
    EXEC SQL
    SET DATABASE DB = '/var/lib/firebird/2.5/data/xxx.fdb';
    EXEC SQL
    CONNECT DB USER 'xxx' PASSWORD 'xxx';
    ...

(Don't get confused by the "2.5" subdirectory, I did "gbak -r" to 3.0 
version but I put it in the old dir.)
I think that in this case the C programs access somehow more directly and 
they can't cooperate with SuperServer.
But I promise I'll lokk at it.

> Try to lower load on lock manager.
Please how? Make less connections?

> Switch to Super
Discussed above.

> or try to increase linger on security3.fdb(it is 60 sec by default).
Please how?
I've found some: "ALTER DATABASE SET LINGER TO"
I guess I'll have to do it via isql and not by Flamerobin. (?)
How can I check how much is it right now?
(I've found some tip "gstat -h" which I use for sweeping monitor. But I can'
t see there any "linger".)
I've found some presentation that this "linger functionality" has effect 
whene there are no connections.
But I think that I have there new attachments almost every second. (?)

> If there was coredump produced by crash, you may provide us with 
backtraces of all stacks. 
How can I get this dump?
I've found some document from 2008 mentioning BugcheckAbort=1 in the 
firebird.conf.
That's it?





Jakub


-- Původní e-mail --
Od: hv...@users.sourceforge.net [firebird-support] 
Komu: firebird-support@yahoogroups.com
Datum: 5. 12. 2017 10:15:00
Předmět: [firebird-support] Re: lock denied... 
" 
  



---In firebird-support@yahoogroups.com,  wrote :




> last weekend we switched from FB 2.5.x to  FB V3.0.3.32796
> 
> We have couple databases, the biggest has around 12 GB.
> About 100-200 clients are connecting to this DB via PHP approximately 
twice per minute to see some data.
> Some services on server are writing data into this DB.


> We are using FB in SuperClassic mode, because some services are written in
C and compiled via gpre/gcc.





  Hmm... i see no relation between such services and requirement to use 
SuperClassic.

Сould you try Super mode ? SuperClassic in FB3 is legacy and not recommended
mode.





> In firebird log I can see messages like this:
> 
> z3  Sun Dec  3 01:43:15 2017
>     Database: /opt/firebird/security3.fdb
>     page 0, page type 1 lock denied (216)


...
> Could you please explain me, what do this messages mean?



  It looks like bug due to race condition when lock manager initialized 
shared memory while another 


instance (attachment) is deinitialized it (it is simplified and far from 
exact description). It could be 


something else - i need to reproduce the issue to make correct conclusion.



> How can I avoid them?




  Try to lower load on lock manager. Switch to Super, or try to increase 
linger on security3.fdb

(it is 60 sec by default).





> What shall I look at?




  If there was coredump produced by crash, you may provide us with 
backtraces of all stacks. 




Regards,

Vlad










"





"

Re: [firebird-support] Re: lock denied...

2017-12-05 Thread ehmmm.fireb...@seznam.cz [firebird-support]
Thank you for your response.
Compared to you I'm just a beginner so I have other questions.

> i see no relation between such services and requirement to use 
SuperClassic

I din't investigate it much but I think it is becuase the C programs it is 
historically written something like this:

int dbConnect()
{
    EXEC SQL
    SET DATABASE DB = '/var/lib/firebird/2.5/data/xxx.fdb';
    EXEC SQL
    CONNECT DB USER 'xxx' PASSWORD 'xxx';
    ...

(Don't get confused by the "2.5" subdirectory, I did "gbak -r" to 3.0 
version but I put it in the old dir.)
I think that in this case the C programs access somehow more directly and 
they can't cooperate with SuperServer.
But I promise I'll lokk at it.

> Try to lower load on lock manager.
Please how? Make less connections?

> Switch to Super
Discussed above.

> or try to increase linger on security3.fdb(it is 60 sec by default).
Please how?
I've found some: "ALTER DATABASE SET LINGER TO"
I guess I'll have to do it via isql and not by Flamerobin. (?)
How can I check how much is it right now?
(I've found some tip "gstat -h" which I use for sweeping monitor. But I can'
t see there any "linger".)
I've found some presentation that this "linger functionality" has effect 
whene there are no connections.
But I think that I have there new attachments almost every second. (?)

> If there was coredump produced by crash, you may provide us with 
backtraces of all stacks. 
How can I get this dump?
I've found some document from 2008 mentioning BugcheckAbort=1 in the 
firebird.conf.
That's it?




Jakub


-- Původní e-mail ------
Od: hv...@users.sourceforge.net [firebird-support] 
Komu: firebird-support@yahoogroups.com
Datum: 5. 12. 2017 10:15:00
Předmět: [firebird-support] Re: lock denied... 
" 
  



---In firebird-support@yahoogroups.com,  wrote :




> last weekend we switched from FB 2.5.x to  FB V3.0.3.32796
> 
> We have couple databases, the biggest has around 12 GB.
> About 100-200 clients are connecting to this DB via PHP approximately 
twice per minute to see some data.
> Some services on server are writing data into this DB.


> We are using FB in SuperClassic mode, because some services are written in
C and compiled via gpre/gcc.





  Hmm... i see no relation between such services and requirement to use 
SuperClassic.

Сould you try Super mode ? SuperClassic in FB3 is legacy and not recommended
mode.





> In firebird log I can see messages like this:
> 
> z3  Sun Dec  3 01:43:15 2017
>     Database: /opt/firebird/security3.fdb
>     page 0, page type 1 lock denied (216)


...
> Could you please explain me, what do this messages mean?



  It looks like bug due to race condition when lock manager initialized 
shared memory while another 


instance (attachment) is deinitialized it (it is simplified and far from 
exact description). It could be 


something else - i need to reproduce the issue to make correct conclusion.



> How can I avoid them?




  Try to lower load on lock manager. Switch to Super, or try to increase 
linger on security3.fdb

(it is 60 sec by default).





> What shall I look at?




  If there was coredump produced by crash, you may provide us with 
backtraces of all stacks. 




Regards,

Vlad








"

[firebird-support] Re: lock denied...

2017-12-05 Thread hv...@users.sourceforge.net [firebird-support]
---In firebird-support@yahoogroups.com,  wrote :
 
 > last weekend we switched from FB 2.5.x to  FB V3.0.3.32796
> 
> We have couple databases, the biggest has around 12 GB.
> About 100-200 clients are connecting to this DB via PHP approximately twice 
> per minute to see some data.
> Some services on server are writing data into this DB.

 > We are using FB in SuperClassic mode, because some services are written in C 
 > and compiled via gpre/gcc.

 

   Hmm... i see no relation between such services and requirement to use 
SuperClassic.
 Сould you try Super mode ? SuperClassic in FB3 is legacy and not recommended 
mode.
 

 
> In firebird log I can see messages like this:
> 
> z3  Sun Dec  3 01:43:15 2017
> Database: /opt/firebird/security3.fdb
> page 0, page type 1 lock denied (216)

 ...
> Could you please explain me, what do this messages mean?
 

  It looks like bug due to race condition when lock manager initialized shared 
memory while another 

 instance (attachment) is deinitialized it (it is simplified and far from exact 
description). It could be 

 something else - i need to reproduce the issue to make correct conclusion.


 > How can I avoid them?
 

   Try to lower load on lock manager. Switch to Super, or try to increase 
linger on security3.fdb
 (it is 60 sec by default).

 

 > What shall I look at?
 

   If there was coredump produced by crash, you may provide us with backtraces 
of all stacks. 
 

 Regards,
 Vlad