Issue Details (XML | Word | Printable)

Key: CORE-5364
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Pavel Zotov
Votes: 0
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Firebird Core

gfix -online normal <db> (being issued in window #1) does not produce error when there is sysdba attachment in window #2

Created: 01/Oct/16 06:34 PM   Updated: 15/Apr/20 12:24 PM
Component/s: Engine
Affects Version/s: 3.0.1
Fix Version/s: 4.0 Beta 2, 3.0.6

QA Status: Done successfully


 Description  « Hide
I'm not sure is this regression or no, but:

Window 1
========

C:\MIX\firebird\fb30\isql -q -z
ISQL Version: WI-V3.0.1.32609 Firebird 3.0
SQL> create database 'localhost/3333:c:\temp\tmp1610012108_fb30.fdb';
Server version:
WI-V3.0.1.32609 Firebird 3.0
WI-V3.0.1.32609 Firebird 3.0/tcp (csprog)/P14
WI-V3.0.1.32609 Firebird 3.0/tcp (csprog)/P14
SQL> quit;

Window 2
========
C:\TEMP>C:\MIX\firebird\fb30\gfix -shut single -force 0 localhost/3333:C:\TEMP\TMP1610012108_FB30.FDB

C:\TEMP>C:\MIX\firebird\fb30\gstat -h localhost/3333:C:\TEMP\TMP1610012108_FB30.FDB | findstr /i /c:attrib
        Attributes force write, single-user maintenance

Window 1
========
C:\MIX\firebird\QA\fbt-repo\tmp>C:\MIX\firebird\fb30\isql -q
SQL> connect 'localhost/3333:c:\temp\tmp1610012108_fb30.fdb' ;
Database: 'localhost/3333:c:\temp\tmp1610012108_fb30.fdb', User: SYSDBA
SQL>

Window 2
========
C:\TEMP>C:\MIX\firebird\fb30\gfix -online normal localhost/3333:C:\TEMP\TMP1610012108_FB30.FDB --------------- [ 1 ] PASSED! NO ERRORS!

C:\TEMP>C:\MIX\firebird\fb30\gstat -h localhost/3333:C:\TEMP\TMP1610012108_FB30.FDB | findstr /i /c:attrib
        Attributes force write --------------------------------------------------------------------------------------------------------------- NO "single-user maintenance" here

C:\TEMP>C:\MIX\firebird\fb30\isql localhost/3333:C:\TEMP\TMP1610012108_FB30.FDB
Database: localhost/3333:C:\TEMP\TMP1610012108_FB30.FDB, User: SYSDBA
SQL> select d.mon$shutdown_mode, a.mon$attachment_id, a.mon$user from mon$database d, mon$attachments a where a.mon
$attachment_id<>current_connection and a.mon$remote_protocol is not null;

MON$SHUTDOWN_MODE 0
MON$ATTACHMENT_ID 11
MON$USER SYSDBA

SQL> quit;

FB 2.5.7 will issue error "database C:\MIX\FIREBIRD\QA\FBT-REPO\TMP\BUGS.CORE_4742.FDB shutdown" at point marked as [1] and not new attachment to database is allowed.

It seems to me that new behaviour (in FB 3.0) is dangerous: SYSDBA-1 that is doing something in Window-1 will not even alerted that database is online and ANY other users can make attachments because of action that just did SYSDBA-2 in Window-2.


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Zotov added a comment - 01/Oct/16 06:42 PM
PS. Problem exists only on SuperServer arch. On 3.0 SuperClassic all works fine as on 2.5.x - so I think that this is regression.

Pavel Zotov added a comment - 01/Oct/16 07:46 PM
PPS.
Problem is more general: 2.5.7 SuperServer is also affected (checked on WI-V2.5.7.27026).
So, we have different behaviour on SuperServer vs [Super]Classic architectures, both in 2.5 & 3.0.