AIX Open Source

 View Only
  • 1.  sudo_ids segmentation fault

    Posted Wed November 06, 2019 04:53 AM

    Originally posted by: MartinVrskovy


    On one of our system we are using
    sudo_ids-1.8.27-2.ppc
    openldap-2.4.46.-1.ppc

    to get sudo rights from ldap.

    After update AIX to AIX 7.1 TL 5 SP 3 we are facing strange behavior only for some users ( from LDAP )

    when running sudo -l command, its sometimes run well,but sometimes we are getting memory fault (bash) or segmentation fault (ksh) error.

    $ while : ; do sudo -l 1>/dev/null && echo "Sudo command works OK";done
    Memory fault
    Memory fault
    Memory fault
    Memory fault
    Memory fault
    Memory fault
    Memory fault
    Memory fault
    Sudo command works OK
    Sudo command works OK
    Memory fault
    Memory fault
    Sudo command works OK
    Memory fault
    Memory fault
    Memory fault
    Memory fault
    Sudo command works OK
    Memory fault
    Sudo command works OK
    Memory fault
    Memory fault
    Memory fault
    Memory fault
    Memory fault
    Memory fault

    running sudo -l as root is working fine all the time, same as for some different users.



  • 2.  Re: sudo_ids segmentation fault

    Posted Mon November 11, 2019 03:24 AM

    Originally posted by: Johann-Georg Dengel


    Hi all, I've experienced the same behavior!

    Has anybody an idea/hint for remediation or work around?
    Thanks for any suggestions ...



  • 3.  Re: sudo_ids segmentation fault

    Posted Mon November 11, 2019 11:41 AM

    Originally posted by: Edward Davignon


    For memory related problems on AIX, I usually start with

    /usr/bin/ulimit -Sa

    or

    \ulimit -Sa

    and

    grep -p "^default:" /etc/security/limits

    grep -p "^$username:" /etc/security/limits

    then check

    /usr/bin/env > /tmp/env.out.1

    and

    sudo /usr/bin/env > /tmp/env.out.2

    and

    sudo su - -c /usr/bin/env > /tmp/env.out.3

    to look for differences, in case the TL update expanded size or number of the environment variables.

    truss sudo -l

    may also give more information.

    echo "$LIBPATH"

    and

    echo "$PATH"

    may also show differences between the users who have trouble and those who don't.



  • 4.  Re: sudo_ids segmentation fault

    Posted Tue November 12, 2019 03:37 AM

    Originally posted by: Johann-Georg Dengel


    @Edward: Thanks for your suggestions! Of course, we tried the measures you mentioned - but didn't get any clue out of that :(

    In the meanwhile we've found the Kernel parameter that causes the trouble:
    it is AIXTHREAD_SCOPE=P

    As soon as we change it to

    AIXTHREAD_SCOPE=S

    sudo doesn't crash any longer with the "memory fault"

    So far, no idea, why :(



  • 5.  Re: sudo_ids segmentation fault

    Posted Tue November 12, 2019 12:40 PM

    Originally posted by: sangameshm


    AIXTHREAD_SCOPE=P sets the M:N Thread Model.

    I think M:N model is used just for comparing the performance with 1:1 model.

    https://www.ibm.com/support/knowledgecenter/ssw_aix_71/performance/thread_env_vars.html

     

    And i guess the stack traces be mostly similar to the one mentioned here

    http://www-01.ibm.com/support/docview.wss?uid=isg1IJ11569

     

    Thanks,

    Sangamesh



  • 6.  Re: sudo_ids segmentation fault

    Posted Thu November 14, 2019 03:17 PM

    Originally posted by: Edward Davignon


    @Johann-Georg Dengel: I was thinking MALLOCDEBUG options, but it looks like Sangamesh has much better lead on this.