Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISQL aborted with core dump [CORE6387] #6626

Closed
firebird-automations opened this issue Aug 12, 2020 · 6 comments
Closed

ISQL aborted with core dump [CORE6387] #6626

firebird-automations opened this issue Aug 12, 2020 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

Core was generated by `/opt/fb40/bin/isql -now -q -n -pag 9999 -i /var/tmp/logs.oltp40/sql/tmp_starter'.
Program terminated with signal 6, Aborted.
#⁠0 0x00007f2e1bbeb387 in raise () from /lib64/libc.so.6
Thread 3 (Thread 0x7f2e15447700 (LWP 15199)):
#⁠0 0x00007f2e1bf90b3b in do_futex_wait.constprop.1 ()
from /lib64/libpthread.so.0
#⁠1 0x00007f2e1bf90bcf in __new_sem_wait_slow.constprop.0 ()
from /lib64/libpthread.so.0
#⁠2 0x00007f2e1bf90c6b in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
#⁠3 0x00007f2e1d0c32d2 in Firebird::SignalSafeSemaphore::enter (
this=0x7f2e1d66eeb0)
at /usr/home/firebird/fbtrunk/firebird/src/common/classes/semaphore.cpp:163
#⁠4 0x00007f2e1cff32c5 in (anonymous namespace)::shutdownThread ()
at /usr/home/firebird/fbtrunk/firebird/src/yvalve/why.cpp:774
#⁠5 0x00007f2e1d075980 in run (this=<synthetic pointer>)
at /usr/home/firebird/fbtrunk/firebird/src/common/ThreadStart.cpp:78
#⁠6 (anonymous namespace)::threadStart (arg=0x7f2e1d66eef0)
at /usr/home/firebird/fbtrunk/firebird/src/common/ThreadStart.cpp:94
#⁠7 0x00007f2e1bf8aea5 in start_thread () from /lib64/libpthread.so.0
#⁠8 0x00007f2e1bcb38dd in clone () from /lib64/libc.so.6
Thread 2 (Thread 0x7f2e14c46700 (LWP 15200)):
#⁠0 0x00007f2e1bf90b3b in do_futex_wait.constprop.1 ()
from /lib64/libpthread.so.0
#⁠1 0x00007f2e1bf90bcf in __new_sem_wait_slow.constprop.0 ()
from /lib64/libpthread.so.0
#⁠2 0x00007f2e1bf90c6b in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
#⁠3 0x00007f2e1d0c32d2 in Firebird::SignalSafeSemaphore::enter (
this=0x7f2e1d66d130)
at /usr/home/firebird/fbtrunk/firebird/src/common/classes/semaphore.cpp:163
#⁠4 0x00007f2e1cfa37bc in Why::(anonymous namespace)::TimerEntry::timeThread
()
at /usr/home/firebird/fbtrunk/firebird/src/yvalve/MasterImplementation.cpp:297
#⁠5 0x00007f2e1d075980 in run (this=<synthetic pointer>)
at /usr/home/firebird/fbtrunk/firebird/src/common/ThreadStart.cpp:78
#⁠6 (anonymous namespace)::threadStart (arg=0x7f2e1d673000)
at /usr/home/firebird/fbtrunk/firebird/src/common/ThreadStart.cpp:94
#⁠7 0x00007f2e1bf8aea5 in start_thread () from /lib64/libpthread.so.0
#⁠8 0x00007f2e1bcb38dd in clone () from /lib64/libc.so.6
Thread 1 (Thread 0x7f2e1d67d780 (LWP 15198)):
#⁠0 0x00007f2e1bbeb387 in raise () from /lib64/libc.so.6
#⁠1 0x00007f2e1bbeca78 in abort () from /lib64/libc.so.6
#⁠2 0x00007f2e13fb8e2d in __gnu_cxx::__verbose_terminate_handler ()
at ../../../../gcc-6.4.0/libstdc++-v3/libsupc++/vterminate.cc:95
#⁠3 0x00007f2e13f51f36 in __cxxabiv1::__terminate (handler=<optimized out>)
at ../../../../gcc-6.4.0/libstdc++-v3/libsupc++/eh_terminate.cc:47
#⁠4 0x00007f2e13f51f81 in std::terminate ()
at ../../../../gcc-6.4.0/libstdc++-v3/libsupc++/eh_terminate.cc:57
#⁠5 0x00007f2e13f51f96 in __cxxabiv1::__unexpected (handler=<optimized out>)
at ../../../../gcc-6.4.0/libstdc++-v3/libsupc++/eh_terminate.cc:63
#⁠6 0x00007f2e13f52a02 in __cxxabiv1::__cxa_call_unexpected (
exc_obj_in=0xa88f10)
at ../../../../gcc-6.4.0/libstdc++-v3/libsupc++/eh_personality.cc:759
#⁠7 0x00007f2e13f05845 in transform (to=0x7f2e1d6771a0, from=0x7f2e1d665ac0,
length=936, this=<optimized out>)
at /usr/home/firebird/fbtrunk/firebird/src/plugins/crypt/chacha/ChaCha.cpp:63
#⁠8 encrypt (to=0x7f2e1d6771a0, from=0x7f2e1d665ac0, length=936,
status=<synthetic pointer>, this=0x7f2e1d62d750)
at /usr/home/firebird/fbtrunk/firebird/src/plugins/crypt/chacha/ChaCha.cpp:128
#⁠9 Firebird::IWireCryptPluginBaseImpl<(anonymous namespace)::ChaCha, Firebird::CheckStatusWrapper, Firebird::IPluginBaseImpl<(anonymous namespace)::ChaCha, Firebird::CheckStatusWrapper, Firebird::Inherit<Firebird::IReferenceCountedImpl<(anonymous namespace)::ChaCha, Firebird::CheckStatusWrapper, Firebird::Inherit<Firebird::IVersionedImpl<(anonymous namespace)::ChaCha, Firebird::CheckStatusWrapper, Firebird::InheritFirebird::IWireCryptPlugin\ > > > > > >::cloopencryptDispatcher (self=0x7f2e1d62d758, status=<optimized out>, length=936,
from=0x7f2e1d665ac0, to=0x7f2e1d6771a0)
at /usr/home/firebird/fbtrunk/firebird/src/include/firebird/IdlFbInterfaces.h:12966
#⁠10 0x00007f2e1d0172e7 in encryptFirebird::CheckStatusWrapper\ (
to=<optimized out>, from=0x7f2e1d665ac0, length=936,
status=0x7fffba66a700, this=0x7f2e1d62d758)
at /usr/home/firebird/fbtrunk/firebird/src/include/firebird/IdlFbInterfaces.h:3382
#⁠11 packet_send (port=port@entry=0x7f2e1d6654c0,
buffer=buffer@entry=0x7f2e1d665ac0 "",
buffer_length=buffer_length@entry=936)
at /usr/home/firebird/fbtrunk/firebird/src/remote/inet.cpp:3187
#⁠12 0x00007f2e1d0177ef in inet_write (xdrs=0x7f2e1d6655f0)
at /usr/home/firebird/fbtrunk/firebird/src/remote/inet.cpp:2932
#⁠13 0x00007f2e1d0246f6 in REMOTE_deflate (xdrs=xdrs@entry=0x7f2e1d6655f0,
proto_write=proto_write@entry=0x7f2e1d017770 <inet_write(XDR*)>,
packet_send=packet_send@entry=0x7f2e1d016c90 <packet_send(rem_port*, SCHAR const*, SSHORT)>, flush=flush@entry=true)
at /usr/home/firebird/fbtrunk/firebird/src/remote/remote.cpp:1468
#⁠14 0x00007f2e1d010ca7 in send_full (port=0x7f2e1d6654c0,
packet=<optimized out>)
at /usr/home/firebird/fbtrunk/firebird/src/remote/inet.cpp:2450
#⁠15 0x00007f2e1d030f8c in Remote::send_packet (port=0x7f2e1d6654c0,
packet=packet@entry=0x7f2e1d660780)
at /usr/home/firebird/fbtrunk/firebird/src/remote/client/interface.cpp:8416
#⁠16 0x00007f2e1d03d98f in Remote::Attachment::prepare (
this=this@entry=0x7f2e1d66f170, status=status@entry=0x7fffba66aae0,
apiTra=apiTra@entry=0x7f2e1d677e58, stmtLength=858, stmtLength@entry=0,
sqlStmt=sqlStmt@entry=0x7f2e1d63d040 "execute block returns ( dts varchar(24), unit varchar(50), elapsed_ms int, msg varchar(80), add_info varchar(80) ) as\nbegin\n \t\t dts = left( cast(current_timestamp as varchar(255)), 24); -- NB, 14.0"..., dialect=dialect@entry=3, flags=71)
at /usr/home/firebird/fbtrunk/firebird/src/remote/client/interface.cpp:3686
#⁠17 0x00007f2e1d04f4f6 in Firebird::IAttachmentBaseImpl<Remote::Attachment, Firebird::CheckStatusWrapper, Firebird::IReferenceCountedImpl<Remote::Attachment, Firebird::CheckStatusWrapper, Firebird::Inherit<Firebird::IVersionedImpl<Remote::Attachment, Firebird::CheckStatusWrapper, Firebird::InheritFirebird::IAttachment\ > > > >::cloopprepareDispatcher (self=0x7f2e1d66f178,
status=0x7fffba66ac28, tra=0x7f2e1d677e58, stmtLength=0,
sqlStmt=0x7f2e1d63d040 "execute block returns ( dts varchar(24), unit varchar(50), elapsed_ms int, msg varchar(80), add_info varchar(80) ) as\nbegin\n \t\t dts = left( cast(current_timestamp as varchar(255)), 24); -- NB, 14.0"..., dialect=3, flags=71)
at /usr/home/firebird/fbtrunk/firebird/src/include/firebird/IdlFbInterfaces.h:10563
#⁠18 0x00007f2e1cfe5259 in prepareFirebird::CheckStatusWrapper\ (flags=71,
dialect=3,
sqlStmt=0x7f2e1d63d040 "execute block returns ( dts varchar(24), unit varchar(50), elapsed_ms int, msg varchar(80), add_info varchar(80) ) as\nbegin\n \t\t dts = left( cast(current_timestamp as varchar(255)), 24); -- NB, 14.0"..., stmtLength=0, tra=<optimized out>, status=0x7fffba66ac20,
this=0x7f2e1d66f178)
at /usr/home/firebird/fbtrunk/firebird/src/include/firebird/IdlFbInterfaces.h:2293
#⁠19 Why::YAttachment::prepare (this=this@entry=0x7f2e1d674a20,
status=status@entry=0x7fffba66ac20,
transaction=transaction@entry=0x7f2e1d675088,
stmtLength=stmtLength@entry=0,
sqlStmt=sqlStmt@entry=0x7f2e1d63d040 "execute block returns ( dts varchar(24), unit varchar(50), elapsed_ms int, msg varchar(80), add_info varchar(80) ) as\nbegin\n \t\t dts = left( cast(current_timestamp as varchar(255)), 24); -- NB, 14.0"..., dialect=dialect@entry=3, flags=71)
at /usr/home/firebird/fbtrunk/firebird/src/yvalve/why.cpp:5479
#⁠20 0x00007f2e1d005146 in Firebird::IAttachmentBaseImpl<Why::YAttachment, Firebird::CheckStatusWrapper, Firebird::IReferenceCountedImpl<Why::YAttachment, Firebird::CheckStatusWrapper, Firebird::Inherit<Firebird::IVersionedImpl<Why::YAttachment, Firebird::CheckStatusWrapper, Firebird::InheritFirebird::IAttachment\ > > > >::cloopprepareDispatcher (self=0x7f2e1d674a28,
status=0x7bcb68 <fbStatusObj+8>, tra=0x7f2e1d675088, stmtLength=0,
sqlStmt=0x7f2e1d63d040 "execute block returns ( dts varchar(24), unit varchar(50), elapsed_ms int, msg varchar(80), add_info varchar(80) ) as\nbegin\n \t\t dts = left( cast(current_timestamp as varchar(255)), 24); -- NB, 14.0"..., dialect=3, flags=71)
at /usr/home/firebird/fbtrunk/firebird/src/include/firebird/IdlFbInterfaces.h:10563
#⁠21 0x0000000000426704 in prepareFirebird::CheckStatusWrapper\ (flags=71,
dialect=3,
sqlStmt=0x7f2e1d63d040 "execute block returns ( dts varchar(24), unit varchar(50), elapsed_ms int, msg varchar(80), add_info varchar(80) ) as\nbegin\n \t\t dts = left( cast(current_timestamp as varchar(255)), 24); -- NB, 14.0"..., stmtLength=0, tra=0x7f2e1d675088, status=0x7bcb60 <fbStatusObj>,
this=0x7f2e1d674a28)
at /usr/home/firebird/fbtrunk/firebird/src/include/firebird/IdlFbInterfaces.h:2293
#⁠22 process_statement (
str2=0x7f2e1d63d040 "execute block returns ( dts varchar(24), unit varchar(50), elapsed_ms int, msg varchar(80), add_info varchar(80) ) as\nbegin\n \t\t dts = left( cast(current_timestamp as varchar(255)), 24); -- NB, 14.0"...)
at /usr/home/firebird/fbtrunk/firebird/temp/Release/isql/isql.cpp:10196
#⁠23 0x0000000000429410 in do_isql ()
at /usr/home/firebird/fbtrunk/firebird/temp/Release/isql/isql.cpp:5800
#⁠24 0x000000000042b37d in ISQL_main (argc=<optimized out>,
argv=0x7fffba6713f8)
at /usr/home/firebird/fbtrunk/firebird/temp/Release/isql/isql.cpp:1717
#⁠25 0x00007f2e1bbd7555 in __libc_start_main () from /lib64/libc.so.6
#⁠26 0x000000000040a2cf in _start () at ../sysdeps/x86_64/start.S:123

Commits: 3989bb8 c4bd77f

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

reporter: Alexander Peshkov [ alexpeshkoff ] => Pavel Zotov [ tabloid ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Visible effect was caused by 2 separate bugs in chacha plugin.
1. Invalid throw() in methods of Cipher (CopyPaste from arc4).
2. Incorrectly chosen initial counter value which rarely, randomly may cause overflow failure in tomcrypt library.
Both fixed here, plugin is fully compatible with previous version.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 4.0 RC 1 [ 10930 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Cannot be tested

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants