NULL symbol causes crash


Alpert, Reed <reed.alpert@...>
 

Hi,

 

Running modified mamalistencpp and using a NULL symbol causes a crash.

Granted that NULL symbols are not that easy to use, and there is some argument that says if someone does that it is best to remove their process from the market data ecosystem.

 

    mSource = "IDN_DEV";

    subscribeToSymbol(NULL);

 

Here is the trace, I’ll submit a patch, but wanted to know if there is any usage when a NULL symbol means the source has the entire topic.

 

(gdb) where

#0  0x00007fd30a31357f in __strlen_sse42 () from /lib64/libc.so.6

#1  0x00007fd30afcff6b in copyString (str=0x0) at mama/c_cpp/src/c/subscription.c:2432

#2  0x00007fd30afd1b51 in mamaSubscription_setupBasic (subscription=0x6dc930, transport=0x6b9350, queue=0x6db920, callbacks=0x7fd30af8fa40,

    source=0x40bfe2 "IDN_DEV", symbol=0x0, closure=0x6dcc40) at mama/c_cpp/src/c/subscription.c:465

#3  0x00007fd30afd209a in mamaSubscription_setup2 (subscription=0x6dc930, transport=0x6b9350, queue=0x6db920, callbacks=0x7fd30af8fa40,

    sourceName=<value optimized out>, symbol=<value optimized out>, closure=0x6dcc40) at mama/c_cpp/src/c/subscription.c:2868

#4  0x00007fd30ad6d340 in Wombat::MamaSubscription::setup (this=0x6dc8d0, transport=0x6bdc50, queue=0x6db8c0, callback=0x6dc8b0, source=0x40bfe2 "IDN_DEV",

    symbol=0x0, closure=0x0) at mama/c_cpp/src/cpp/MamaSubscription.cpp:525

#5  0x00007fd30ad6ca2d in Wombat::MamaSubscription::create (this=0x6dc8d0, transport=<value optimized out>, queue=<value optimized out>,

    callback=<value optimized out>, source=<value optimized out>, symbol=<value optimized out>, closure=0x0) at mama/c_cpp/src/cpp/MamaSubscription.cpp:443

#6  0x00000000004060e9 in MamaListen::subscribeToSymbol (this=0x7fffafc64740, symbol=0x0) at mamalistencpp.cpp:734

#7  0x0000000000406481 in MamaListen::subscribeToSymbols (this=0x7fffafc64740) at mamalistencpp.cpp:790

#8  0x0000000000408898 in main (argc=11, argv=0x7fffafc649a8) at mamalistencpp.cpp:1627

 

Thanks,

 

Reed.

 


Reed Alpert | Corporate & Investment Bank | Market Data Services | J.P. Morgan | 4 Metrotech Center, 23rd Floor, Brooklyn, NY 11245 | T: 718.242.5198  | M: 917.414.4613 | reed.alpert@...

Alternate Contact:  CIB PIM Trading Technology Solutions NA | CIB_PIM_Trading_Technology_Solutions_NA@...

 

This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates (collectively, "JPMC"). This transmission may contain information that is proprietary, privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMC for any loss or damage arising in any way from its use. Please note that any electronic communication that is conducted within or through JPMC's systems is subject to interception, monitoring, review, retention and external production in accordance with JPMC's policy and local laws, rules and regulations; may be stored or otherwise processed in countries other than the country in which you are located; and will be treated in accordance with JPMC policies and applicable laws and regulations. Please refer to http://www.jpmorgan.com/pages/disclosures for disclosures relating to European legal entities.


Gary Molloy <g.molloy@...>
 

Hi Reed,

 

Thanks for your email.

 

I must say, I have not heard of anyone using a NULL symbol to subscribe to the entire topic range for a source.  A symbol list subscription would be the method to use for that. 

I would be interested to hear if anyone in the community is using this method (NULL symbol to subscribe to an entire source).

 

But please do submit your patch J

 

Thanks,

Gary

 

Gary Molloy – SR Labs

Adelaide Exchange | 24-26 Adelaide Street | Belfast | BT2 8GD

g.molloy@...

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Alpert, Reed
Sent: 25 June 2015 16:01
To: openmama-dev@...
Subject: [Openmama-dev] NULL symbol causes crash

 

Hi,

 

Running modified mamalistencpp and using a NULL symbol causes a crash.

Granted that NULL symbols are not that easy to use, and there is some argument that says if someone does that it is best to remove their process from the market data ecosystem.

 

    mSource = "IDN_DEV";

    subscribeToSymbol(NULL);

 

Here is the trace, I’ll submit a patch, but wanted to know if there is any usage when a NULL symbol means the source has the entire topic.

 

(gdb) where

#0  0x00007fd30a31357f in __strlen_sse42 () from /lib64/libc.so.6

#1  0x00007fd30afcff6b in copyString (str=0x0) at mama/c_cpp/src/c/subscription.c:2432

#2  0x00007fd30afd1b51 in mamaSubscription_setupBasic (subscription=0x6dc930, transport=0x6b9350, queue=0x6db920, callbacks=0x7fd30af8fa40,

    source=0x40bfe2 "IDN_DEV", symbol=0x0, closure=0x6dcc40) at mama/c_cpp/src/c/subscription.c:465

#3  0x00007fd30afd209a in mamaSubscription_setup2 (subscription=0x6dc930, transport=0x6b9350, queue=0x6db920, callbacks=0x7fd30af8fa40,

    sourceName=<value optimized out>, symbol=<value optimized out>, closure=0x6dcc40) at mama/c_cpp/src/c/subscription.c:2868

#4  0x00007fd30ad6d340 in Wombat::MamaSubscription::setup (this=0x6dc8d0, transport=0x6bdc50, queue=0x6db8c0, callback=0x6dc8b0, source=0x40bfe2 "IDN_DEV",

    symbol=0x0, closure=0x0) at mama/c_cpp/src/cpp/MamaSubscription.cpp:525

#5  0x00007fd30ad6ca2d in Wombat::MamaSubscription::create (this=0x6dc8d0, transport=<value optimized out>, queue=<value optimized out>,

    callback=<value optimized out>, source=<value optimized out>, symbol=<value optimized out>, closure=0x0) at mama/c_cpp/src/cpp/MamaSubscription.cpp:443

#6  0x00000000004060e9 in MamaListen::subscribeToSymbol (this=0x7fffafc64740, symbol=0x0) at mamalistencpp.cpp:734

#7  0x0000000000406481 in MamaListen::subscribeToSymbols (this=0x7fffafc64740) at mamalistencpp.cpp:790

#8  0x0000000000408898 in main (argc=11, argv=0x7fffafc649a8) at mamalistencpp.cpp:1627

 

Thanks,

 

Reed.

 


Reed Alpert | Corporate & Investment Bank | Market Data Services | J.P. Morgan | 4 Metrotech Center, 23rd Floor, Brooklyn, NY 11245 | T: 718.242.5198  | M: 917.414.4613 | reed.alpert@...

Alternate Contact:  CIB PIM Trading Technology Solutions NA | CIB_PIM_Trading_Technology_Solutions_NA@...

 

This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates (collectively, "JPMC"). This transmission may contain information that is proprietary, privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMC for any loss or damage arising in any way from its use. Please note that any electronic communication that is conducted within or through JPMC's systems is subject to interception, monitoring, review, retention and external production in accordance with JPMC's policy and local laws, rules and regulations; may be stored or otherwise processed in countries other than the country in which you are located; and will be treated in accordance with JPMC policies and applicable laws and regulations. Please refer to http://www.jpmorgan.com/pages/disclosures for disclosures relating to European legal entities.