Segfault after trying to create cyclic dependency in table and doing select from this table in same connection --------------------------------------------------------------------------------------------------------------
Key: CORE-4254 URL: http://tracker.firebirdsql.org/browse/CORE-4254 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 2.5.2 Update 1, 2.5.3 Environment: Ubuntu 13.10 x86_64 RHEL 5.4 x86 Reporter: Artyom Smirnov Cyclic dependency will not appear, as expected, but query compilation will segfault. Stacktrace have ton of CMP_pass1 (like cyclic dependency actually exist). On next connection crash can not be reproduced. Reproducing query for isql: create database 'test.fdb'; create table t ( n integer, n1 computed by (n), n2 computed by (n1) ); commit; alter table t alter n1 computed by (n2); commit; select * from t; Stacktrace: (gdb) bt #0 0x0040ec3a in mcount () from /lib/libc.so.6 #1 0x083d3008 in Firebird::Array<void const*, Firebird::EmptyStorage<void const*> >::find (this=0xb7fe7418, item=@0x4656080, pos=@0x4656050) at ../src/include/../common/classes/array.h:358 #2 0x083d308d in Firebird::Array<void const*, Firebird::EmptyStorage<void const*> >::exist (this=0xb7fe7418, item=@0x4656080) at ../src/include/../common/classes/array.h:372 #3 0x083d2c1f in Firebird::PublicHandle::isKnownHandle (this=0xb7deb084) at ../src/common/classes/PublicHandle.cpp:70 #4 0x0809d40d in Jrd::Database::checkHandle (this=0xb7deb084) at ../src/dsql/../dsql/../jrd/Database.h:357 #5 0x0809d53c in CHECK_TDBB (tdbb=0x5054780) at ../src/dsql/../jrd/jrd.h:963 #6 0x0809d5c4 in SET_TDBB (tdbb=@0x4656500) at ../src/dsql/../jrd/jrd.h:1002 #7 0x08170d6c in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226794) at ../src/jrd/cmp.cpp:3653 #8 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb72267d4) at ../src/jrd/cmp.cpp:3967 #9 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226814) at ../src/jrd/cmp.cpp:3967 #10 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226854) at ../src/jrd/cmp.cpp:3967 #11 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226894) at ../src/jrd/cmp.cpp:3967 #12 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb72268d4) at ../src/jrd/cmp.cpp:3967 #13 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226914) at ../src/jrd/cmp.cpp:3967 #14 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226954) at ../src/jrd/cmp.cpp:3967 #15 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226994) at ../src/jrd/cmp.cpp:3967 #16 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb72269d4) at ../src/jrd/cmp.cpp:3967 #17 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226a14) at ../src/jrd/cmp.cpp:3967 #18 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226a54) at ../src/jrd/cmp.cpp:3967 #19 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226a94) at ../src/jrd/cmp.cpp:3967 #20 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226ad4) at ../src/jrd/cmp.cpp:3967 #21 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226b14) at ../src/jrd/cmp.cpp:3967 #22 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226b54) at ../src/jrd/cmp.cpp:3967 #23 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226b94) at ../src/jrd/cmp.cpp:3967 #24 0x08172032 in CMP_pass1 (tdbb=0x5054780, csb=0xb73a87f8, node=0xb7226bd4) at ../src/jrd/cmp.cpp:3967 Here ~10000 of exactly same frames. -- 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 ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel