0 Replies Latest reply: Nov 1, 2012 8:17 PM by 800808 RSS

    Could not increase soft stack limit to 16384

    800808
      Dear Solaris 10 Experts,

      I am having difficulty trying to increase the soft stack limit to 16384 for user
      george on this Solaris 10 SunFire Sparc server as follows:
      $ uname -a
      SunOS galactica 5.10 Generic_141444-09 sun4v sparc SUNW,SPARC-Enterprise-T5220
      % id -p                                                    
      uid=25003(george) gid=25000(systems) projid=3(default)
      $ ulimit -Ss
      8192
      $ ulimit -Hs
      unlimited
      $ prctl -n process.max-stack-size $$
      process: 18382: ksh
      NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
      process.max-stack-size
              basic           8.00MB      -   deny                             18382
              privileged      8.00EB      -   deny                                 -
              system          8.00EB    max   deny  
      
      $ cat /etc/project
      system:0::::
      user.root:1::::
      noproject:2::::
      default:3::::
      group.staff:10::::
      
      $ su
      # projadd accountusers
      # projmod -U george accountusers
              
      $ cat /etc/project
      system:0::::
      user.root:1::::
      noproject:2::::
      default:3::::
      group.staff:10::::
      accountusers:100::george::process.max-stack-size=(basic,16384,deny)
      
      # id -p
      uid=0(root) gid=0(root) projid=1(user.root)
      # 
      # csh
      # newtask -v -p xtendusers csh
      114291
      Segmentation Fault (core dumped)
      # ksh
      # newtask -v -p xtendusers ksh    # only works for Korne shell
      114261
      # ulimit -Ss
      16
      # ulimit -Hs
      unlimited
      However, I am not able to apply the same changes (increase soft stack ulimit to
      16384 for george, which will run a resource intensive in cron overnight scheduled
      process) after having logged back in to the same system as george, particularly
      in C shell where this program will be running in.

      The output remains the same as follows:
      % uname -a                                                 
      SunOS galactica 5.10 Generic_141444-09 sun4v sparc SUNW,SPARC-Enterprise-T5220  
      % id -p                                                    
      uid=25003(george) gid=25000(systems) projid=3(default)                          
      % prctl -n process.max-stack-size $$                       
      process: 22586: -csh                                                            
      NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT  
      process.max-stack-size                                                          
              basic           8.00MB      -   deny                             22586  
              privileged      8.00EB      -   deny                                 -  
              system          8.00EB    max   deny                                 -  
      % ulimit -Ss                                               
      8192                                                                            
      % ulimit -Hs                                               
      unlimited
      The stack limits of 8192 returned after logging back in as root.

      I had to replaced process.max-file-descriptor to process.max-stack-size
      in /etc/project directly since I couldn't work out how to do this from projmod.
      process.max-file-descriptor was incorrectly added for xtendusers in
      /etc/project initially. Not sure whether this may be reason why the change hasn't
      taken affect for george.

      My understanding of soft and hard limits was that the soft limit is the
      maximum that the system can access by that user, and the hard limit
      defines the maximum value the system can be updated to for soft limits. Is this
      correct?

      This resource intensive application needs the soft limit to be 16384.

      Many thanks,

      George