FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.23k stars 213 forks source link

gfix -v -full hangs without message "Resource temporarily unavailable" when .fdb is opened by some attach (only in SuperCLASSIC) [CORE4560] #4877

Open firebird-automations opened 9 years ago

firebird-automations commented 9 years ago

Submitted by: @pavel-zotov

Attachments: gdb-hanged-gfix-v-full-on-sc.zip

If some attach will be established to database in SuperServer and attempt to validate database at the same time than we will see in gfix screen: --- I/O error during "lock" operation for file "/var/db/fb30/oltp30.fdb" -Error while trying to open file -Resource temporarily unavailable ---

No such message in SuperClassic - gfix simply hangs without any output (i.e. it waits for detach from .fdb).

SQL> show version; ISQL Version: WI-V2.5.3.26730 Firebird 2.5 Server version: Firebird/linux AMD64 (access method), version "LI-T3.0.0.31309 Firebird 3.0 Alpha 2" Firebird/linux AMD64 (remote server), version "LI-T3.0.0.31309 Firebird 3.0 Alpha 2/tcp (oel64)/P12" Firebird/x86/Windows NT (remote interface), version "WI-V2.5.3.26730 Firebird 2.5/tcp (csprog)/P12" on disk structure version 12.0

firebird-automations commented 9 years ago

Commented by: @hvlad

Validation should report "Secondary attachment can't validate database" in this case. Could you check on Windows also ?

firebird-automations commented 9 years ago

Commented by: @pavel-zotov

On windows BOTH in SS and SC gfix -v -full displays: ---- I/O error during "CreateFile (open)" operation for file "oltp30" -Error while trying to open file --<national characters here in output - translated as: "process can not access the file because this file is used by another process." ----

Checked on: ISQL Version: WI-T3.0.0.31334 Firebird 3.0 Alpha 2 Server version: Firebird/Windows/Intel/i386 (access method), version "WI-T3.0.0.31334 Firebird 3.0 Alpha 2" Firebird/Windows/Intel/i386 (remote server), version "WI-T3.0.0.31334 Firebird 3.0 Alpha 2/tcp (IT_test)/P13:C" Firebird/Windows/Intel/i386 (remote interface), version "WI-T3.0.0.31334 Firebird 3.0 Alpha 2/tcp (IT_test)/P13:C" on disk structure version 12.0

PS.

>Validation should report "Secondary attachment can't validate database" in this case.

BTW: I do NOT see this message on windows.

firebird-automations commented 9 years ago

Commented by: @dyemanov

In SS/SC, you should be validating "localhost:oltp30"`, not "oltp30".

firebird-automations commented 9 years ago

Commented by: @pavel-zotov

When trying like you've showed than - yes, get this (on windows): --- C:\1INSTALL\FB30SNAP>gfix.exe -v -full localhost/3330:oltp30 bad parameters on attach or create database -secondary server attachments cannot validate databases ---

On linux gfix hangs ( when issued similar command: /opt/fb30trnk/bin/gfix -v -full localhost/3330:oltp30 )

firebird-automations commented 9 years ago

Commented by: @pavel-zotov

PS. Furthermore, it seems that after I issued gfix command and it stay in such hanged state, I can NOT establish any subsequent attachments using ISQL (neither using client 2.5 nor 3.0).

Can create stacktrace - but for what process: gdb or firebird ?

firebird-automations commented 9 years ago

Commented by: @pavel-zotov

And one else thing: if start trace it also hungs. But if kill gfix process than trace starts OK and begin work.

firebird-automations commented 9 years ago
Modified by: @dyemanov Regression: 3\.0 Alpha 2 \[ 10560 \]
firebird-automations commented 9 years ago
Modified by: @dyemanov Fix Version: 3\.0 RC 1 \[ 10584 \]
firebird-automations commented 8 years ago
Modified by: @dyemanov Fix Version: 3\.0\.0 \[ 10048 \] Fix Version: 3\.0 RC 1 \[ 10584 \] =\>
firebird-automations commented 8 years ago

Commented by: @hvlad

Could it be the same as CORE5056 ?

firebird-automations commented 8 years ago

Commented by: @hvlad

Pavel, could you test it again, please ?

firebird-automations commented 8 years ago

Commented by: @pavel-zotov

Checked on LI-V3.0.0.32268, with one ISQL attachment, connected to database using TCP. Then run gfix -v -full and get following results:

1. SuperServer:

⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠

[root@oel64 17:01:45 /var/db/fb30]$ /opt/fb30ss/bin/gfix -v -full /3333:/var/db/fb30/oltp30.fdb bad parameters on attach or create database -secondary server attachments cannot validate databases

[root@oel64 17:01:56 /var/db/fb30]$ /opt/fb30ss/bin/gfix -v -full localhost/3333:/var/db/fb30/oltp30.fdb bad parameters on attach or create database -secondary server attachments cannot validate databases [root@oel64 17:02:13 /var/db/fb30]$ /opt/fb30ss/bin/gfix -v -full /var/db/fb30/oltp30.fdb I/O error during "lock" operation for file "/var/db/fb30/oltp30.fdb" -Database already opened with engine instance, incompatible with current

2. SuperClassic:

⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠

[root@oel64 17:07:27 /var/db/fb30]$ /opt/fb30sc/bin/gfix -v -full localhost/3330:/var/db/fb30/oltp30.fdb ==> hangs, stacktrace see in attached .zip, file = "gdb-hanged-gfix-v-full-on-sc-remote.txt" [root@oel64 17:09:56 /var/db/fb30]$ /opt/fb30sc/bin/gfix -v -full /var/db/fb30/oltp30.fdb ==> hangs, stacktrace see in attached .zip, file = "gdb-hanged-gfix-v-full-on-sc-embedded.txt"

3. Classic Server:

⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠

[root@oel64 17:16:11 /var/db/fb30]$ /opt/fb30cs/bin/gfix -v -full localhost/3329:/var/db/fb30/oltp30.fdb bad parameters on attach or create database -secondary server attachments cannot validate databases

[root@oel64 17:16:54 /var/db/fb30]$ /opt/fb30cs/bin/gfix -v -full /var/db/fb30/oltp30.fdb bad parameters on attach or create database -secondary server attachments cannot validate databases

(reply in both cases appeared instantly, as in SuperServer).

firebird-automations commented 8 years ago
Modified by: @pavel-zotov Attachment: gdb\-hanged\-gfix\-v\-full\-on\-sc\.zip \[ 12868 \]
firebird-automations commented 8 years ago
Modified by: @dyemanov Fix Version: 3\.0 RC2 \[ 10048 \] =\>