Subject Re: DROP table statement hangs Firebird Server process with 100% CPU usage
Author
Please disregard my comment about the python code (it was wrong anyway, I don't use the "finally" clause, I only commit at the end of the entire loop). Mark Rotteveel answered my question there: https://dba.stackexchange.com/questions/210010

My database got corrupted in the past (for an unknown reason) and I thought gfix completely fixed the problem back then, but perhaps it did not, which is the reason why dropping a table is not working now.

Here is an excerpt from old logs around the time the DB got corrupted:

hostname (Client)     Thu May 10 17:30:26 2018
        /usr/sbin/fbguard: /usr/sbin/fbserver normal shutdown.

hostname (Client)     Thu May 10 17:31:30 2018
        INET/inet_error: connect errno = 111

hostname (Client)     Thu May 10 17:31:32 2018
        INET/inet_error: connect errno = 111

hostname (Client)     Thu May 10 17:39:45 2018
        /usr/sbin/fbguard: guardian starting /usr/sbin/fbserver

hostname (Client)     Thu May 10 17:48:55 2018
        /usr/sbin/fbguard: /usr/sbin/fbserver normal shutdown.

hostname (Client)     Thu May 10 17:58:19 2018
        /usr/sbin/fbguard: guardian starting /usr/sbin/fbserver

hostname (Server)     Fri May 11 11:58:06 2018
        INET/inet_error: read errno = 110

hostname (Server)     Fri May 11 15:54:27 2018
        Database: /home/firebird/my_db.fdb
        database file appears corrupt (/home/firebird/my_db.fdb)
        wrong page type
        page 305659 is of wrong type (expected 7, found 109)
        internal Firebird consistency check (error during savepoint backout (290), file: exe.cpp line: 4056)

hostname (Server)     Fri May 11 16:12:31 2018
        INET/inet_error: read errno = 104

hostname (Server)     Fri May 11 18:02:55 2018
        Database: my_db.fdb_corrupted.fix
        Relation has 4 orphan backversions (0 in use) in table RDB$RELATIONS (6)

hostname (Server)     Fri May 11 18:02:55 2018
        Database: my_db.fdb_corrupted.fix
        Relation has 3 orphan backversions (0 in use) in table RDB$PROCEDURES (26)

hostname (Server)     Fri May 11 18:02:55 2018
        Database: my_db.fdb_corrupted.fix
        Index 2 misses node on page 215 level 1 in table BLOGS (128)

hostname (Server)     Fri May 11 18:02:55 2018
        Database: my_db.fdb_corrupted.fix
        Relation has 1 orphan backversions (0 in use) in table BLOGS (128)

hostname (Server)     Fri May 11 18:03:07 2018
        Database: my_db.fdb_corrupted.fix
        Index 1 is corrupt on page 254720 level 1 at offset 4131. File: ../src/jrd/validation.cpp, line: 2181
         in table URLS (131)

hostname (Server)     Fri May 11 18:03:07 2018
        Database: my_db.fdb_corrupted.fix
        Index 1 misses node on page 156755 level 1 in table URLS (131)

hostname (Server)     Fri May 11 18:03:09 2018
        Database: my_db.fdb_corrupted.fix
        Page 428865 is an orphan

hostname (Server)     Fri May 11 18:03:09 2018
        Database: my_db.fdb_corrupted.fix
        Page 428866 is an orphan