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

Unaligned Memory Access in MET_format [CORE5233] #5512

Closed
firebird-automations opened this issue May 9, 2016 · 5 comments
Closed

Unaligned Memory Access in MET_format [CORE5233] #5512

firebird-automations opened this issue May 9, 2016 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: James Clarke (jrtc27)

Votes: 1

When building employee.fdb on sparc64, a bus error (unaligned memory access) is produced:

sh -x -c "lockfile -1 ../../gen/Release/firebird/bin/build-db.lock && ./empbuild ../../gen/examples/employee.fdb; res=\$?; rm -f ../../gen/Release/firebird/bin/build-db.lock; exit \$res"
+ lockfile -1 ../../gen/Release/firebird/bin/build-db.lock
ERROR: http://ld.so: object 'http://libeatmydata.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
+ ./empbuild ../../gen/examples/employee.fdb
creating database ../../gen/examples/employee.fdb
Turning forced writes off
Creating tables
Turning off indices and triggers
Bus error
Couldn't turn off indices and triggers
+ res=44
+ rm -f ../../gen/Release/firebird/bin/build-db.lock
+ exit 44
Makefile.examples:125: recipe for target '../../gen/examples/employee.fdb' failed

This was introduced in 218f419, as the additional descriptors are placed back-to-back without any alignment. From gdb:

Program received signal SIGBUS, Bus error.
MET_format (tdbb=tdbb@entry=0x7feffff8c88, relation=relation@entry=0xfff8000104652448, number=<optimized out>) at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/temp/Release/jrd/met.cpp:5514
5514 dsc desc = *odsDflDesc;
(gdb) bt
#⁠0 MET_format (tdbb=tdbb@entry=0x7feffff8c88, relation=relation@entry=0xfff8000104652448, number=<optimized out>) at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/temp/Release/jrd/met.cpp:5514
#⁠1 0xfff80001026c098c in make_format (tdbb=tdbb@entry=0x7feffff8c88, relation=relation@entry=0xfff8000104652448, version=version@entry=0x7feffff7de8, stack=<optimized out>, stack@entry=0xfff8000107ef9ad8)
at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/temp/Release/jrd/dfw.cpp:9543
#⁠2 0xfff80001026c2588 in make_version (tdbb=0x7feffff8c88, phase=<optimized out>, work=0xfff8000107446f68, transaction=0xfff8000107445bf0) at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/temp/Release/jrd/dfw.cpp:10220
#⁠3 0xfff80001026b9710 in DFW_perform_work (tdbb=tdbb@entry=0x7feffff8c88, transaction=transaction@entry=0xfff8000107445bf0) at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/temp/Release/jrd/dfw.cpp:4513
#⁠4 0xfff800010264c15c in TRA_commit (tdbb=tdbb@entry=0x7feffff8c88, transaction=transaction@entry=0xfff8000107445bf0, retaining_flag=retaining_flag@entry=false)
at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/src/jrd/tra.cpp:376
#⁠5 0xfff800010267b94c in commit (tdbb=tdbb@entry=0x7feffff8c88, transaction=transaction@entry=0xfff8000107445bf0, retaining_flag=retaining_flag@entry=false) at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/src/jrd/jrd.cpp:5458
#⁠6 0xfff800010267c090 in JRD_commit_transaction (tdbb=tdbb@entry=0x7feffff8c88, transaction=0xfff8000107445bf0) at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/src/jrd/jrd.cpp:7670
#⁠7 0xfff8000102687bf0 in Jrd::JTransaction::commit (this=this@entry=0xfff80001000dbf88, user_status=user_status@entry=0x7feffff8e90) at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/src/jrd/jrd.cpp:2178
#⁠8 0xfff800010269a400 in Firebird::ITransactionBaseImpl<Jrd::JTransaction, Firebird::CheckStatusWrapper, Firebird::IReferenceCountedImpl<Jrd::JTransaction, Firebird::CheckStatusWrapper, Firebird::Inherit<Firebird::IVersionedImpl<Jrd::JTransaction, Firebird::CheckStatusWrapper, Firebird::InheritFirebird::ITransaction\ > > > >::cloopcommitDispatcher (self=0xfff80001000dbf90, status=0x7feffff9048)
at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/src/include/firebird/IdlFbInterfaces.h:7045
#⁠9 0xfff800010028ef00 in Firebird::ITransaction::commitFirebird::CheckStatusWrapper\ (status=0x7feffff9040, this=0xfff80001000dbf90) at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/src/include/firebird/IdlFbInterfaces.h:1107
#⁠10 Why::YTransaction::commit (this=this@entry=0xfff8000100041068, status=status@entry=0x7feffff9040) at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/src/yvalve/why.cpp:4750
#⁠11 0xfff80001002acd80 in Firebird::ITransactionBaseImpl<Why::YTransaction, Firebird::CheckStatusWrapper, Firebird::IReferenceCountedImpl<Why::YTransaction, Firebird::CheckStatusWrapper, Firebird::Inherit<Firebird::IVersionedImpl<Why::YTransaction, Firebird::CheckStatusWrapper, Firebird::InheritFirebird::ITransaction\ > > > >::cloopcommitDispatcher (self=0xfff8000100041070, status=0x1000018a440 <fbStatusObj+8>)
at /build/firebird3.0-dW50KH/firebird3.0-3.0.0.32483.ds4/src/include/firebird/IdlFbInterfaces.h:7045
#⁠12 0x000001000001c7e4 in commit_trans(Firebird::ITransaction**) ()
#⁠13 0x0000010000028d90 in process_statement(char const*) ()
#⁠14 0x000001000002ac74 in do_isql() ()
#⁠15 0x000001000002d778 in ISQL_main(int, char**) ()
#⁠16 0xfff800010100602c in __libc_start_main () from /lib/sparc64-linux-gnu/libc.so.6
#⁠17 0x000001000000a52c in _start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) p odsDflDesc
$1 = (const Ods::Descriptor *) 0x7feffff7803

Commits: dc2718a

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Version: 4.0 Initial [ 10621 ]

@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: @asfernandes

Fix Version: 3.0.1 [ 10730 ]

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