cascadium / openmama-omnm Goto Github PK
View Code? Open in Web Editor NEWOpenMAMA Native Message Payload Bridge
License: MIT License
OpenMAMA Native Message Payload Bridge
License: MIT License
Support of opaque data fields should be easy to implement and will fix a fair few OpenMAMA unit tests.
Hi Frank:
I'm running into some issues with omnm that appear to be related to large fields/messages, and I've gotten a stack trace using clang's Address Sanitizer that may help provide a clue. If you can take a moment to look this over, perhaps the light-bulb will go off -- I haven't learned the code well enough to identify the problem yet:
==30103==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6110000305bc at pc 0x7f32da168a93 bp 0x7f32d2f12360 sp 0x7f32d2f12358
READ of size 1 at 0x6110000305bc thread T8
#0 0x7f32da168a92 in omnmmsgPayloadIter_next /home/btorpey/work/OpenMAMA-omnm/nyfix/src/Iterator.cpp:105:9
#1 0x7f32da16ab80 in OmnmPayloadImpl::findFieldInBuffer(char const*, unsigned short, omnmFieldImpl&) /home/btorpey/work/OpenMAMA-omnm/nyfix/src/Payload.cpp:389:54
#2 0x7f32da17d8ea in mama_status OmnmPayloadImpl::getFieldValueAsCopy<int>(mamaFieldType_, char const*, unsigned short, int*) /home/btorpey/work/OpenMAMA-omnm/nyfix/src/./Payload.h:127:30
#3 0x7f32da179945 in omnmmsgPayload_getI32 /home/btorpey/work/OpenMAMA-omnm/nyfix/src/Payload.cpp:2119:39
#4 0x7f32dfb3c3ec in mamaMsg_getI32 /shared/work/OpenMAMA/nyfix/mama/c_cpp/src/c/msg.c:1699:12
#5 0x7f32e182fc6e in Transact::MamaMessageImpl::getOrigTransId(Transact::MXTransId&) const /home/btorpey/work/transact/openmama/src/common/Middleware/MamaAdapter/MamaMessageImpl.cpp:1724:25
#6 0x5b50fa in TransactX::TxnReq::setMsg(Transact::IMessage*) /home/btorpey/work/transact/openmama/src/server/txnpd/src/TxnReq.cpp:116:17
#7 0x5de9ad in TransactX::TxnReceiver::onMessage(char const*, Transact::IMessage*) /home/btorpey/work/transact/openmama/src/server/txnpd/src/TxnReceiver.cpp:1352:17
#8 0x7f32e180c21b in Transact::MamaListenerImpl::onMsg(mamaSubscriptionImpl_*, mamaMsgImpl_*, void*, void*) /home/btorpey/work/transact/openmama/src/common/Middleware/MamaAdapter/MamaListenerImpl.cpp:154:36
#9 0x7f32df898ef6 in mamaEnvSubscription_onMsgBasic /home/btorpey/work/transact/openmama/src/common/Middleware/MamaAdapter/mme/mamaEnvSubscription.c:308
#10 0x7f32dfb9bb31 in mamaSubscription_forwardMsg /shared/work/OpenMAMA/nyfix/mama/c_cpp/src/c/subscription.c:1420:5
#11 0x7f32dfba0887 in mamaSubscription_processMsg /shared/work/OpenMAMA/nyfix/mama/c_cpp/src/c/subscription.c:2312:9
#12 0x7f32dbc70a21 in zmqBridgeMamaTransportImpl_queueCallback /home/btorpey/work/OpenMAMA-zmq/nyfix/src/transport.c:808:16
#13 0x7f32dfbf51dd in wombatQueue_dispatchInt /shared/work/OpenMAMA/nyfix/common/c_cpp/src/c/queue.c:319:9
#14 0x7f32dfbf5233 in wombatQueue_timedDispatch /shared/work/OpenMAMA/nyfix/common/c_cpp/src/c/queue.c:335:12
#15 0x7f32dbc624f6 in zmqBridgeMamaQueue_dispatch /home/btorpey/work/OpenMAMA-zmq/nyfix/src/queue.c:253:16
#16 0x7f32dfb83f95 in mamaQueue_dispatch /shared/work/OpenMAMA/nyfix/mama/c_cpp/src/c/queue.c:825:12
#17 0x7f32dfb85b58 in dispatchThreadProc /shared/work/OpenMAMA/nyfix/mama/c_cpp/src/c/queue.c:1264:30
#18 0x33c0607aa0 in start_thread (/lib64/libpthread.so.0+0x33c0607aa0)
#19 0x33bfee8bcc in clone (/lib64/libc.so.6+0x33bfee8bcc)
0x6110000305bc is located 0 bytes to the right of 252-byte region [0x6110000304c0,0x6110000305bc)
allocated by thread T8 here:
#0 0x4ec29d in realloc /shared/buildtest/clang/trunk/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:77
#1 0x7f32dbc76c92 in allocateBufferMemory /shared/work/OpenMAMA/nyfix/common/c_cpp/src/c/memnode.c:109:18
#2 0x7f32da16d0cb in omnmmsgPayload_unSerialize /home/btorpey/work/OpenMAMA-omnm/nyfix/src/Payload.cpp:900:14
#3 0x7f32da16e4b2 in omnmmsgPayload_createFromByteBuffer /home/btorpey/work/OpenMAMA-omnm/nyfix/src/Payload.cpp:956:12
#4 0x7f32dfb3adf9 in mamaMsgImpl_setMsgBuffer /shared/work/OpenMAMA/nyfix/mama/c_cpp/src/c/msg.c:600:12
#5 0x7f32dbc5fb4a in zmqBridgeMamaMsgImpl_deserialize /home/btorpey/work/OpenMAMA-zmq/nyfix/src/msg.c:647:13
#6 0x7f32dbc7090d in zmqBridgeMamaTransportImpl_queueCallback /home/btorpey/work/OpenMAMA-zmq/nyfix/src/transport.c:802:13
#7 0x7f32dfbf51dd in wombatQueue_dispatchInt /shared/work/OpenMAMA/nyfix/common/c_cpp/src/c/queue.c:319:9
#8 0x7f32dfbf5233 in wombatQueue_timedDispatch /shared/work/OpenMAMA/nyfix/common/c_cpp/src/c/queue.c:335:12
#9 0x7f32dbc624f6 in zmqBridgeMamaQueue_dispatch /home/btorpey/work/OpenMAMA-zmq/nyfix/src/queue.c:253:16
#10 0x7f32dfb83f95 in mamaQueue_dispatch /shared/work/OpenMAMA/nyfix/mama/c_cpp/src/c/queue.c:825:12
#11 0x7f32dfb85b58 in dispatchThreadProc /shared/work/OpenMAMA/nyfix/mama/c_cpp/src/c/queue.c:1264:30
#12 0x33c0607aa0 in start_thread (/lib64/libpthread.so.0+0x33c0607aa0)
#13 0x33bfee8bcc in clone (/lib64/libc.so.6+0x33bfee8bcc)
On a related topic, are there any built-in limitations on field or message size using omnm? I've been testing assuming that any limitations are <= those from Wombat (i.e., max size of an opaque data type is 0xefff, or 61439 bytes).
Thanks!
Bill
This is to allow for backwards compatibility in ongoing releases.
See finos/OpenMAMA#297 - the omnm payload should expect a MAMA Message as an argument rather than a msgPayload despite what the function prototype suggests.
See also: https://github.com/OpenMAMA/OpenMAMA/blob/master/mama/c_cpp/src/c/payload/qpidmsg/payload.c#L2374
Updating a variable length field with a new, shorter value causes corruption (e.g. replacing a 10 character string with an 8 character string with updateString).
Implementation should support toString in the payload.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.