isql crashes when lot of autonomous transactions have been started and finished 
in TIL = SNAPSHOT
-------------------------------------------------------------------------------------------------

                 Key: CORE-3908
                 URL: http://tracker.firebirdsql.org/browse/CORE-3908
             Project: Firebird Core
          Issue Type: Bug
          Components: ISQL
    Affects Versions: 2.5.2
            Reporter: Pavel Zotov
            Priority: Minor


SQL> create database 't0.fdb'; commit;
SQL> set term ;^
SQL> set term ^;
SQL> execute block as
CON> declare v int;
CON> begin
CON> while (1=1) do in autonomous transaction do select 1 from rdb$database 
into v;
CON> end^

After working about 18 hours isql has outputed  this messages:
Statement failed, SQLSTATE = HY000
operating system directive munmap failed
-Cannot allocate memory

Attempt to quit from isql leads to:
--------------------------------------------
SQL> quit;
CON> Expected end of statement, encountered EOF -- это потому что не дошло до 
set term ;^
Statement failed, SQLSTATE = HY000
operating system directive munmap failed
-Cannot allocate memory
terminate called after throwing an instance of 'Firebird::system_call_failed'
Aborted (core dumped)

Firebird's log:
-------------------
bash-3.2$ cat -n firebird.log
     1
     2  reservdb        Sat Aug 25 09:51:57 2012
     3          Operating system call munmap failed. Error code 12
     4
     5
     6  reservdb        Sat Aug 25 09:51:57 2012
     7          Operating system call munmap failed. Error code 12
     8
     9
    10  reservdb        Sat Aug 25 12:49:47 2012
    11          Operating system call munmap failed. Error code 12
    12
    13
    14  reservdb        Sat Aug 25 12:49:47 2012
    15          Operating system call munmap failed. Error code 12
    16
    17
    18  reservdb        Sat Aug 25 12:49:47 2012
    19          Operating system call munmap failed. Error code 12
    20
    21
    22  reservdb        Sat Aug 25 12:49:47 2012
    23          Operating system call pthread_mutex_destroy failed. Error code 
16
    24
    25
    26  reservdb        Sat Aug 25 12:49:47 2012
    27          Error in isc_detach_database() API call when working with 
security database
    28          operating system directive pthread_mutex_destroy failed
    29          Device or resource busy
    30
    31
    32  reservdb        Sat Aug 25 12:49:47 2012
    33          Operating system call pthread_mutex_destroy failed. Error code 
16

Backtrace of core brings error messages:
[root@reservdb .debug]#  gdb -q -x ./gdb_backtrace_batch.txt 
/opt/firebird/bin/.debug/isql.debug /tmp/core-isql-354 1>isql-354.txt

warning: core file may not match specified executable file.
Failed to read a valid object file image from memory.
Cannot access memory at address 0x40b8dc68
Cannot access memory at address 0x429a7ff8
Cannot access memory at address 0x4158ef80
Cannot access memory at address 0x41f8ff80
Cannot access memory at address 0x7fff8c0017f8

But log "isql-354.txt" was filled with some useful(?) info:

[root@reservdb .debug]# cat isql-354.txt
Reading symbols from /opt/firebird/bin/.debug/isql.debug...done.
[New Thread 354]
[New Thread 358]
[New Thread 357]
[New Thread 356]
[New Thread 355]
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Core was generated by `isql t0.fdb'.
Program terminated with signal 6, Aborted.
#0  0x000000302f630265 in ?? ()

Thread 5 (Thread 355):

Thread 4 (Thread 356):

Thread 3 (Thread 357):

Thread 2 (Thread 358):

Thread 1 (Thread 354):


PS.
ISQL Version: LI-V2.5.2.26448 Firebird 2.5
Server version:
Firebird/linux AMD64 (access method), version "LI-V2.5.2.26448 Firebird 2.5"
on disk structure version 11.2

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to