Summary: mds: replace static array send buffer with dynamic memory [#1248] Review request for Trac Ticket(s): #1248 Peer Reviewer(s): Nagu/Ramesh Pull request to: <<LIST THE PERSON WITH PUSH ACCESS HERE>> Affected branch(es): default and 4.5 Development branch: default
-------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services n OpenSAF services n Core libraries y Samples n Tests n Other n Comments (indicate scope for each "y" above): --------------------------------------------- changeset 2ca3c23d6ae659e0720c474bf4608af5810dd991 Author: A V Mahesh <mahesh.va...@oracle.com> Date: Fri, 30 Jan 2015 14:57:26 +0530 mds: replace static array send buffer with dynamic memory [#1248] Bug Description : ----------------- To improve performance and reduce the traffic of transport , we enhanced the MDS send size in a single message from 18000 to 65536 as part of enhancement Ticket #654. 6.5 release If MDS application task was created with less stack size say 32000 and try to send huge message say above 65536 bytes size message using MDS_SENDTYPE_RSP type, because of static allocation of bigger message, the application will run out of stack and the application will segfault. use-case of sending huge data using MDS_SENDTYPE_RSP send-type is so far unique use-case , so far application are using SENDTYPE_RSP for to send a short response message received through SENDTYPE_SNDRSP. Ideally application were using SENDTYPE_SND, SENDTYPE_SNDRSP, SENDTYPE_SNDRAC & SENDTYPE_SNDACK, send-types to send huge message to avoid timeout issue between send & response, that is why the issue was NOT reproducible with normal send messages. Bug Fix: ---------- So, this ticket converts send message buffer from static allocation in to dynamic memory allocation to avoid stack deficiency and this bug will only address full encode send path of message ( the bug reported flow only ) , which is generic use case and need to be addressed immediately. Please note that, this patch will fix the full-encode send flow of applications only. there is another ticket:#1246, which will identify more send flows (out side of the current issue ) of MDS transport and fix them in coherent manner and will go through complete cycle of testing of all send flows. Complete diffstat: ------------------ osaf/libs/core/mds/mds_dt_tipc.c | 39 ++++++++++++++++++++++++++------------- osaf/libs/core/mds/mds_dt_trans.c | 45 ++++++++++++++++++++++++++++++--------------- 2 files changed, 56 insertions(+), 28 deletions(-) Testing Commands: ----------------- steps to reproduce : ---------------------------- Create MDS application A with less stack size say 32000, application A should run as sender and receiver on Node-1 and sends SENDTYPE_SNDRSP type message and waits for MDS_SENDTYPE_RSP type message. Create MDS application B with less stack size say 32000 , application B should run as receiver and sender on Node-2 and once it receives SENDTYPE_SNDRSP type message form application A of Node-1 and as a response application B sends MDS_SENDTYPE_RSP type with huge message size , say above 85536 bytes size message to application A running on Node-1. The MDS application B on Node-2 will get segfault, while sending huge message to MDS application A on Node-1 Note : we have tested with MDS application stack size 32000 & response send_len 196200 bytes , Testing, Expected Results: -------------------------- Conditions of Submission: ------------------------- <<HOW MANY DAYS BEFORE PUSHING, CONSENSUS ETC>> Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 n n x86_64 y y powerpc n n powerpc64 n n Reviewer Checklist: ------------------- [Submitters: make sure that your review doesn't trigger any checkmarks!] Your checkin has not passed review because (see checked entries): ___ Your RR template is generally incomplete; it has too many blank entries that need proper data filled in. ___ You have failed to nominate the proper persons for review and push. ___ Your patches do not have proper short+long header ___ You have grammar/spelling in your header that is unacceptable. ___ You have exceeded a sensible line length in your headers/comments/text. ___ You have failed to put in a proper Trac Ticket # into your commits. ___ You have incorrectly put/left internal data in your comments/files (i.e. internal bug tracking tool IDs, product names etc) ___ You have not given any evidence of testing beyond basic build tests. Demonstrate some level of runtime or other sanity testing. ___ You have ^M present in some of your files. These have to be removed. ___ You have needlessly changed whitespace or added whitespace crimes like trailing spaces, or spaces before tabs. ___ You have mixed real technical changes with whitespace and other cosmetic code cleanup changes. These have to be separate commits. ___ You need to refactor your submission into logical chunks; there is too much content into a single commit. ___ You have extraneous garbage in your review (merge commits etc) ___ You have giant attachments which should never have been sent; Instead you should place your content in a public tree to be pulled. ___ You have too many commits attached to an e-mail; resend as threaded commits, or place in a public tree for a pull. ___ You have resent this content multiple times without a clear indication of what has changed between each re-send. ___ You have failed to adequately and individually address all of the comments and change requests that were proposed in the initial review. ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) ___ Your computer have a badly configured date and time; confusing the the threaded patch review. ___ Your changes affect IPC mechanism, and you don't present any results for in-service upgradability test. ___ Your changes affect user manual and documentation, your patch series do not contain the patch that updates the Doxygen manual. ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel