9 Replies Latest reply on Sep 14, 2012 10:56 PM by Lazar NameToUpdate

    Weird mmap issue with rm via nsh

      Hi All,

       

      I'm trying to rm a file in nsh on a remote host.

       

      nsh -c "rm //<server>/<file location>"

       

      and I get this error:

       

      Out of memory in _mem_realloc 49 bytes (PID = 434) ...

      Memory ...: Cannot allocate memory

       

      looking at the strace it is trying to mmap a stupid number

       

      mmap(NULL, 580545231842185216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)

       

      Anyone encountered this issue before?

        • 1. Re: Weird mmap issue with rm via nsh
          Daniel Goetzman

          Are you using NSH proxy?

          And if so, what version is your app server?

          -Dan

          • 2. Re: Weird mmap issue with rm via nsh

            Not a true NSH Proxy as such since it is not visible in the GUI.

             

            But NSH is installed on the server I am running the nsh from and all the permissioning has been setup.

             

            App Server 7.6

            NSH installed is: NSH760-115-RHAS4X86_64.SH

            • 3. Re: Weird mmap issue with rm via nsh
              Bill Robinson

              what is in the secure file on the system you are running nsh from ?

              • 4. Re: Weird mmap issue with rm via nsh

                rscd:port=4750:protocol=5:tls_mode=encryption_only:encryption=tls:

                default:port=4750:protocol=5:tls_mode=encryption_only:encryption=tls:

                • 5. Re: Weird mmap issue with rm via nsh
                  Bill Robinson

                  this nsh client is not configured to use a nsh proxy.

                   

                  your client system is rhel x64?  how much memory does it have?

                   

                  does this happen when you run the same commands from another system w/ nsh installed?

                  • 6. Re: Weird mmap issue with rm via nsh

                    "this nsh client is not configured to use a nsh proxy." Please elaborate.

                     

                    If the server running the nsh was not configured in the client then you will get an "authorization" error not OOM.

                     

                    nsh -c "ls //<server>/<filename>" works

                     

                    Does it really matter how much memory the server has? The mmap number is so large I don't think there are commercial system available to accomodate the request. The server (RHEL6) which the nsh was run on has 96Gb RAM and client (RHEL6) has 48Gb. Both servers had gigs of RAM free when it was run.

                     

                    It doesn't matter what OS the client is on. I've tried RHEL 5, 6, Win 2003, Win 2008 and they all error.

                     

                    Also I've tried it on 5 other RHEL 5 servers with the same version of NSH and they all exhibit the same issue.

                     

                    If you reboot the server running nsh rm runs fine for a while, but eventually it breaks. With each subsequent run of rm the mmap asks for more and more pages.

                    • 7. Re: Weird mmap issue with rm via nsh
                      Bill Robinson

                      the secure file you sent indicates that it is not configured to use a nsh proxy.  that means that running nsh from this system does not connect to a nsh proxy and you can take that out of the picture for troubleshooting purposes. 

                       

                      i don't think we offically support rhel6 w/ 7.6, thought it should work ok.

                       

                      i'm assuming that when you say 'client' you mean the RSCD agent and not the GUI client?

                       

                      can you run this command from a windows system that has nsh installed ? 

                       

                      can you also try a newer version of NSH ?  are you running 7.6.0.115 of the appserver?

                       

                      also, the system you ran nsh from is x64 ?

                       

                      are you in a nsh shell when you run the 'nsh -c rm ..'  ? or are you running that directly from a bash or other shell ?

                      • 8. Re: Weird mmap issue with rm via nsh

                        client = rscd agent

                         

                        Will need to download NSH for Win and try.

                         

                        I am running 7.6.0.115 appserver. Will a newer version of NSH work?

                         

                        Yes nsh run on RHEL 5 x64.

                         

                        I tried both nsh -c "rm <blah>" from bash command line as well as "rm <blah>" within nsh.

                         

                        Bill, do you have access to the src? How is the mmap size calculated?

                        • 9. Re: Weird mmap issue with rm via nsh

                          George, did this work for you with newer nsh? I confirmed (reproduced) that this is a bug in 7.6 nsh. Tested with 8.2 nsh, and the issue no longer exists.