What does AIX have against threads? - Aix

This is a discussion on What does AIX have against threads? - Aix ; I have a stress test application which I've got working on a number of unix platforms including linux, macosx, solaris, hp-ux, etc. However with AIX 5.1 using gcc I'm facing a number of odd problems. Most importantly it seems that ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: What does AIX have against threads?

  1. What does AIX have against threads?

    I have a stress test application which I've got working on a number of unix
    platforms including linux, macosx, solaris, hp-ux, etc.

    However with AIX 5.1 using gcc I'm facing a number of odd problems.

    Most importantly it seems that it cannot handle 100 threads at once. Each
    pthread is configured with 1 mb stack space (due to previous problems on
    this platform). After a while I eventually get a seg fault and everything
    crashes. It seems that there is some OS limitation of some kind since I
    succesfully ran the same app with 1 thread (+ main thread). Even 50 threads
    causes this weird crashing behavior.

    Am I missing some obvious detail about AIX? Perhaps I need to do more
    adjustments with pthreads to make it stop doing this?
    I tried to backtrace it with gdb but no luck since the crash address was
    0x00000000 and 'bt' returned nothing.

    Thanks.

    -- Henrik



  2. Re: What does AIX have against threads?

    Henrik Goldman wrote:
    > However with AIX 5.1 using gcc I'm facing a number of odd problems.
    >
    > Most importantly it seems that it cannot handle 100 threads at once. Each
    > pthread is configured with 1 mb stack space (due to previous problems on
    > this platform). After a while I eventually get a seg fault and everything
    > crashes. It seems that there is some OS limitation of some kind since I
    > succesfully ran the same app with 1 thread (+ main thread). Even 50 threads
    > causes this weird crashing behavior.


    It has to do with the address space. You can read more about that
    in the General Programming Concepts: Writing and Debugging Programs
    manual, found here:

    http://publib.boulder.ibm.com/infoce...nformation.htm

    In particular, you'll want to understand Large Program Support, here:

    http://publib.boulder.ibm.com/infoce...htm#a179c11c5d

    Set LDR_CNTRL for your program and you should achieve success.

  3. Re: What does AIX have against threads?

    "Henrik Goldman" writes:

    > I tried to backtrace it with gdb but no luck since the crash address was
    > 0x00000000 and 'bt' returned nothing.


    Gdb seems to have more problems on AIX then on other platforms.
    You may get better stack traces by:

    - trying different version of gdb (5.2 appears to work best for me)

    - running the app under gdb from the start (rather than loading
    core post-mortem),

    - using dbx

    dbx itself often crashes on 'g++ -g' compiled executables,
    but if it doesn't, it is likely to produce better stack trace.

    If dbx does crash, rebuild without -g -- you'll at least know
    which function you are crashing in.

    Cheers,
    --
    In order to understand recursion you must first understand recursion.
    Remove /-nsp/ for email.

  4. Re: What does AIX have against threads?


    Not sure if this helps, but found some info here on gcc and pthreads:

    http://www-128.ibm.com/developerwork...ry/au-gnu.html

    Look at the "An example" at the bottom.


  5. Re: What does AIX have against threads?

    Hi Henrik
    If you run the following command
    " lsattr -El sys0 | grep maxuproc" , you will probably get 100.

    To change this value to say 150 , use the command
    " chdev -l sys0 -a maxuproc=200"

    hope this helps

    regards



    Henrik Goldman wrote:
    > I have a stress test application which I've got working on a number of unix
    > platforms including linux, macosx, solaris, hp-ux, etc.
    >
    > However with AIX 5.1 using gcc I'm facing a number of odd problems.
    >
    > Most importantly it seems that it cannot handle 100 threads at once. Each
    > pthread is configured with 1 mb stack space (due to previous problems on
    > this platform). After a while I eventually get a seg fault and everything
    > crashes. It seems that there is some OS limitation of some kind since I
    > succesfully ran the same app with 1 thread (+ main thread). Even 50 threads
    > causes this weird crashing behavior.
    >
    > Am I missing some obvious detail about AIX? Perhaps I need to do more
    > adjustments with pthreads to make it stop doing this?
    > I tried to backtrace it with gdb but no luck since the crash address was
    > 0x00000000 and 'bt' returned nothing.
    >
    > Thanks.
    >
    > -- Henrik



  6. Re: What does AIX have against threads?

    > If you run the following command
    > " lsattr -El sys0 | grep maxuproc" , you will probably get 100.
    >
    > To change this value to say 150 , use the command
    > " chdev -l sys0 -a maxuproc=200"
    >
    > hope this helps


    Aha... I'll certainly try that. The other suggestion with the environment
    variable did not work so far but I did not have time to look into this yet.

    -- Henrik



+ Reply to Thread