Summary: base: Do not use slashes in the names of POSIX shared memory segments [#909] Review request for Trac Ticket(s): 909 Peer Reviewer(s): Ramesh Pull request to: Affected branch(es): opensaf-4.3.x, opensaf-4.4.x, default(4.5) Development branch: default
-------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts y SAF services n OpenSAF services n Core libraries y Samples n Tests n Other n Comments (indicate scope for each "y" above): --------------------------------------------- changeset f9003f8108396773670f73403db5d6dc6d19337c Author: Anders Widell <anders.wid...@ericsson.com> Date: Wed, 21 May 2014 13:30:33 +0200 base: Do not use slashes in the names of POSIX shared memory segments [#909] OpenSAF fails to start on systems with (e)glibc version 2.19, e.g. Ubuntu 14.04, openSUSE 13.2: Error messages produced by the MSG service: May 21 13:17:49 SC-1 local0.crit osafmsgnd[536]: CR Creation of shared memory segment failed May 21 13:17:49 SC-1 local0.crit osafmsgnd[536]: CR Destroying the shared memory segment failed May 21 13:17:49 SC-1 local0.err osafmsgnd[536]: ER saAmfComponentUnregister Failed with error 7 May 21 13:17:49 SC-1 local0.err osafmsgnd[536]: ER Either library initialization or destroy failed May 21 13:17:49 SC-1 local0.err osafmsgnd[536]: __init_mqnd() failed May 21 13:17:59 SC-1 local0.notice osafamfnd[454]: NO Instantiation of 'safComp=MQND,safSu=SC-1,safSg=NoRed,safApp=OpenSAF' failed May 21 13:17:59 SC-1 local0.notice osafamfnd[454]: NO Reason: component registration timer expired May 21 13:17:59 SC-1 local0.warn osafamfnd[454]: WA 'safComp=MQND,safSu=SC-1,safSg=NoRed,safApp=OpenSAF' Presence State INSTANTIATING => INSTANTIATION_FAILED May 21 13:17:59 SC-1 local0.err osafamfnd[454]: ER 'safComp=MQND,safSu=SC-1,safSg=NoRed,safApp=OpenSAF'got Inst failed May 21 13:17:59 SC-1 local0.crit osafamfnd[454]: Rebooting OpenSAF NodeId = 131343 EE Name = , Reason: NCS component Instantiation failed, OwnNodeId = 131343, SupervisionTime = 60 Error messages produced by the CPKT service: May 21 13:12:18 SC-1 local0.notice osafckptnd[496]: Started May 21 13:12:19 SC-1 local0.err osafckptnd[496]: ER cpnd open request fail for RDWR mode (null) Error messages produced by the LCK service: May 21 13:12:56 SC-1 local0.crit osaflcknd[671]: CR GLND shm create failure: rc 2 Error Invalid argument May 21 13:12:56 SC-1 local0.notice osafamfnd[457]: NO 'safComp=GLND,safSu=SC-1,safSg=NoRed,safApp=OpenSAF' faulted due to 'avaDown' : Recovery is 'componentRestart' May 21 13:12:58 SC-1 local0.notice osaflcknd[684]: Started May 21 13:12:58 SC-1 local0.crit osaflcknd[684]: CR GLND shm create failure: rc 2 Error Invalid argument May 21 13:12:58 SC-1 local0.notice osafamfnd[457]: NO 'safComp=GLND,safSu=SC-1,safSg=NoRed,safApp=OpenSAF' faulted due to 'avaDown' : Recovery is 'suFailover' May 21 13:12:58 SC-1 local0.err osafamfnd[457]: ER safComp=GLND,safSu=SC-1,safSg=NoRed,safApp=OpenSAF Faulted due to:avaDown Recovery is:suFailover May 21 13:12:58 SC-1 local0.crit osafamfnd[457]: Rebooting OpenSAF NodeId = 131343 EE Name = , Reason: Component faulted: recovery is node failfast, OwnNodeId = 131343, SupervisionTime = 60 The POSIX function shm_open() says that the name of a shared memory segment shall begin with a slash, followed by up to 254 characters, none of which is a slash. Glibc version 2.19 added stricter checks, that disallow slashes in names of POSIX shared memory segments (which were previously allowed by glibc). Since OpenSAF uses slashes in the names, the call to shm_open() now fails. The solution replaces slashes with underscore characters in the shared memory segment names. Complete diffstat: ------------------ osaf/libs/core/leap/os_defs.c | 4 ++-- osaf/services/infrastructure/nid/scripts/opensafd.in | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) Testing Commands: ----------------- Build and start OpenSAF on a system with (e)glibc 2.19, e.g. Ubuntu 14.04 or openSUSE 13.2 Testing, Expected Results: -------------------------- OpenSAF should build and start successfully. Conditions of Submission: ------------------------- Ack from reviewer Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 y y 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. ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel