Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 131423

Summary: New AC - Create Shared Memory on Linux EM64T platform needs getMaxShared memory function.
Product: z_Archived Reporter: Vishnu <vishnu.naikawadi>
Component: TPTPAssignee: Igor Alelekov <igor.alelekov>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P1 CC: igor.alelekov, jkubasta, karla.callaghan, nmehrega, paulslau, samwai
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: closed460
Attachments:
Description Flags
patch none

Description Vishnu CLA 2006-03-10 19:54:24 EST
The create shared memory is failing on Linux EM64T with shmmax=32MB and requested allocated size is more than 8MB. This issue is fixed on other platforms (Bug#129276) to validate if the shared mem chunk size requested is more than system defined size. This code is not ported to EM64T and the call to the function is commented out specifically for Linux EM64T. This should be fixed as part of the EM64T porting effort.
Comment 1 Karla Callaghan CLA 2006-03-31 22:16:40 EST
Vishnu please clarify - the problem is in trying to allocate shared mem of a size greater than 8MB, correct?  If so, please correct the bug title so that it is more precise.
Comment 2 Sri Doddapaneni CLA 2006-04-05 23:35:35 EDT
This should be fixed by checking first for maximum allowed sharedmemory block by the OS.
Comment 3 Karla Callaghan CLA 2006-05-31 12:35:15 EDT
Kevin - please clarify the issue here and correct the bug title.  We can't have complete failure on Lin EM64T shared mem allocation as tests are run there successfully.  Specify what the user-failure would be seen as so we can properly prioritize and target this bug.
Comment 4 Kevin P O'Leary CLA 2006-05-31 12:46:54 EDT
Currently our linux platforms only allow a user to request the max amount of shared memory that a system can provide. (this is system configurable)

The function that performs this is system specific, I need to do some research into the system calls but the porting should not be difficult.

EM64T currently has this functionality ifdef'ed out and it also has its shared memory default size reduced to 8M. For compatibilty this should not be an issue size most agents configure shared memory size. And again, its possible to configure the system to increase shared memory.

But we need to port this max shared memory functionality so that our linux platforms are in sync.

For some strange reason this functionality works on IPF.
Comment 5 Kevin P O'Leary CLA 2006-05-31 12:59:45 EDT
Retargetting to 4.3

We should file a release note regarding this issue.

There are 2 workarounds if a user runs into a problem.
1. Configure the system to allow addtional shared memory.
2. Edit pluginconfig.xml file to reduce dataChannelSize requested.

By lowering dataChannelSize the user is getting the same behavior that
the max function would give them. (except it not work automatically)

The release note should mention that if they get the error:
TPTP_LOG_ERROR_MSG1("Shared mem error(%d) \n", shmerr) 

They should perform the previously mentioned work arounds.
Comment 6 Karla Callaghan CLA 2006-10-24 13:22:11 EDT
Retargeting to future as 4.3 is closing down to all non-essential bug fixing.
Comment 7 Karla Callaghan CLA 2007-02-05 14:01:32 EST
Transferring bugs with 4.4 target to new owner, Igor. If their priority is not set to P1, then the bug is only a stretch item for that release.
Comment 8 jkubasta CLA 2007-04-18 08:12:07 EDT
If we can't fix it, I think it needs noting in the Release Notes.
Comment 9 jkubasta CLA 2007-05-08 16:23:35 EDT
Igor, Samson,
Can you confirm that this did not get fixed/ported. Assuming this is the case, here is my proposed Release Notes entry:
<readme>
        <title>When creating shared memory on Linux EM64T with shmmax&gt;8MB, it is necessary to either configure the system to add 
        shared memory or reduce the dataChannelSize requested.</title>
        <category>Agent Controller</category>
        <bugzilla>131423</bugzilla>
        <description>
           <p>
              <b>Symptom:</b> TPTP_LOG_ERROR_MSG1("Shared mem error(%d) \n", shmerr). 
           </p>

           <p>
              <b>Resolution:</b> Perform one of the following two work arounds:
              <ol>
              <li>Configure the system to allow addtional shared memory.</li>
              <li>Edit the pluginconfig.xml file to reduce the dataChannelSize requested.  Note: This gives you the same behavior as the first work around but does not work automatically.</li>
              </ol>          
          </p>
        </description>
   </readme>
Comment 10 Igor Alelekov CLA 2007-05-15 02:49:08 EDT
Joanna,
Yes, this defect hasn't been fixed/ported yet
Comment 11 Igor Alelekov CLA 2007-05-18 02:52:30 EDT
Created attachment 67771 [details]
patch

Samson, could you please review the patch?
It introduces traditional method of getting shared memory limits which works on various Linuxes including EM64T.
Comment 12 jkubasta CLA 2007-05-18 08:28:37 EDT
Raised to blocker since affects 175264. Please submit the approval request after the code review passes
Comment 13 Samson Wai CLA 2007-05-18 10:09:39 EDT
Hi Igor. The fix seems straight forward. Please submit an approval request after being tested on all 3 Linux'es (x86, EM64T and IPF).

Also, please send Paul a private build of the affected shared library to make sure the fix here also covers his scenario.

Thanks.
Comment 14 Samson Wai CLA 2007-05-22 11:24:55 EDT
The patch is approved and checked in. Igor, please mark the bug as fixed. Thanks.
Comment 15 jkubasta CLA 2007-05-22 14:12:15 EDT
Patch checked into Head
Comment 16 Paul Slauenwhite CLA 2007-05-23 12:17:39 EDT
*** Bug 175264 has been marked as a duplicate of this bug. ***
Comment 17 Paul Slauenwhite CLA 2009-06-30 12:07:03 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.