SYS3171 - OS2

This is a discussion on SYS3171 - OS2 ; Anyone know what I can do to avoid getting a SYS3171? The problem has something to do with running out of stack space. I've tried increase the stack size to 8MB by running EMXSTACK but that hasn't made any difference....

+ Reply to Thread
Results 1 to 14 of 14

Thread: SYS3171

  1. SYS3171

    Anyone know what I can do to avoid getting a SYS3171?

    The problem has something to do with running out of stack space.

    I've tried increase the stack size to 8MB by running EMXSTACK but that
    hasn't made any difference.

  2. Re: SYS3171

    On Sun, 28 Nov 2004 20:46:58 UTC, jp
    wrote:

    > Anyone know what I can do to avoid getting a SYS3171?
    >
    > The problem has something to do with running out of stack space.
    >
    > I've tried increase the stack size to 8MB by running EMXSTACK but that
    > hasn't made any difference.


    What was the program?

    --
    Lorne Sunley

  3. Re: SYS3171

    jp wrote:

    > Anyone know what I can do to avoid getting a SYS3171?


    Use the program in a debugger, configure the debugger
    to stop on any exception.

    --
    Veit Kannegieser

  4. Re: SYS3171

    Lorne Sunley wrote:

    >On Sun, 28 Nov 2004 20:46:58 UTC, jp
    >wrote:
    >
    >
    >
    >>Anyone know what I can do to avoid getting a SYS3171?
    >>
    >>The problem has something to do with running out of stack space.
    >>
    >>I've tried increase the stack size to 8MB by running EMXSTACK but that
    >>hasn't made any difference.
    >>
    >>

    >
    >What was the program?
    >
    >
    >

    Python v2.3.4

  5. Re: SYS3171

    Veit Kannegieser wrote:

    >jp wrote:
    >
    >
    >
    >>Anyone know what I can do to avoid getting a SYS3171?
    >>
    >>

    >
    >Use the program in a debugger, configure the debugger
    >to stop on any exception.
    >
    >
    >

    This sounds like a steep learning cliff especially given the fact it is
    a web server which crashes because of some action through a browser. I
    wouldn't expect to get anywhere near sorting this out using a debugger.

  6. Re: SYS3171

    Reading the help for SYS3171 it more sounds like a double fault, leading to successive traps
    eventually overflowing the stack.

    Lars

    jp schrieb:
    > Anyone know what I can do to avoid getting a SYS3171?
    >
    > The problem has something to do with running out of stack space.
    >
    > I've tried increase the stack size to 8MB by running EMXSTACK but that
    > hasn't made any difference.


  7. Re: SYS3171

    jp wrote:

    > This sounds like a steep learning cliff especially given the fact it is
    > a web server which crashes because of some action through a browser. I
    > wouldn't expect to get anywhere near sorting this out using a debugger.


    Sys3171 means (my guess) that your program/Python corrupts
    memory so badly that the applications error mechanism do
    no longer help. Maybe with an larger stack (80MiB) that
    delay before the trap would take only a bit longer..

    My bet would be starting the Virtual Pascal IDE,
    do load executable, select the web server, enable
    all exceptions and run. This would not give source
    code positions, but maybe you would get an better idea
    what the program does wrong.

    Alternativly 'instrument' the program...


    --
    Veit Kannegieser

  8. Re: SYS3171

    In , on 11/29/2004
    at 04:01 PM, jp said:

    >This sounds like a steep learning cliff especially given the fact it is
    >a web server which crashes because of some action through a browser. I
    >wouldn't expect to get anywhere near sorting this out using a debugger.


    Which web server. You do know they are all implemented with differing
    code. :-)

    If it's apache and python, you should be asking this question on the
    apache2 list since it gets answered there regularly. If it is apache,
    changing the main thread stack size limit will do nothing other than use
    up valuable linear address space. Connections run in worker threads and
    as of 2.0.52, the worker thread stack size is fixed. With some luck,
    Brian's next release will allow the thread stack size to be configured.

    HTH,

    Steven


    --
    --------------------------------------------------------------------------------------------
    Steven Levine MR2/ICE 2.60b #10183
    Warp4/FP15/14.093c_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
    --------------------------------------------------------------------------------------------


  9. Re: SYS3171

    Steven Levine wrote:

    >In , on 11/29/2004
    > at 04:01 PM, jp said:
    >
    >
    >
    >>This sounds like a steep learning cliff especially given the fact it is
    >>a web server which crashes because of some action through a browser. I
    >>wouldn't expect to get anywhere near sorting this out using a debugger.
    >>
    >>

    >
    >Which web server.
    >

    Zope.

    >You do know they are all implemented with differing
    >code. :-)
    >
    >
    >

    :-)...

    >If it's apache and python, you should be asking this question on the
    >apache2 list since it gets answered there regularly.
    >

    Zope is actually written in Python, and not many people use Zope on
    OS/2, although Zope is a great product which should get more attention
    from the OS/2 crowd.



    Are there really some Python apps forApache? Not heard that before...

    >HTH,
    >
    >Steven
    >
    >
    >
    >


  10. Re: SYS3171

    In , on 11/30/2004
    at 03:09 PM, jp said:

    >Zope is actually written in Python, and not many people use Zope on
    >OS/2, although Zope is a great product which should get more attention
    >from the OS/2 crowd.


    OK. The problem still might be similar if the OS/2 port of Zope is
    multi-threaded. The secondary threads might be running out of space
    rather than the primary thread.

    >Are there really some Python apps forApache? Not heard that before...


    Sure. Why wouldn't there be? If an app comes out of the unix world, I
    typically assume it will work with other apps before I will assume it will
    not.

    Google for:

    apache python

    and you will see what is available.

    Steven

    --
    --------------------------------------------------------------------------------------------
    Steven Levine MR2/ICE 2.60b #10183
    Warp4/FP15/14.093c_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
    --------------------------------------------------------------------------------------------


  11. Re: SYS3171

    Steven Levine wrote:

    > OK. The problem still might be similar if the OS/2 port of Zope is
    > multi-threaded. The secondary threads might be running out of space
    > rather than the primary thread.
    >

    Which is extremely easy to determine by looking at the full register
    dump.


    Michal


  12. Re: SYS3171

    In , on 11/30/2004
    at 10:38 PM, Michal Necasek said:

    > Which is extremely easy to determine by looking at the full register
    >dump.


    True, but that requires someone to post a proper problem report rather
    than something that reads like "why is the sky blue?" :-)

    Steven


    --
    --------------------------------------------------------------------------------------------
    Steven Levine MR2/ICE 2.60b #10183
    Warp4/FP15/14.093c_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
    --------------------------------------------------------------------------------------------


  13. Re: SYS3171

    Steven Levine wrote:
    > In , on 11/30/2004
    > at 10:38 PM, Michal Necasek said:
    >
    >
    >> Which is extremely easy to determine by looking at the full register
    >>dump.

    >
    >
    > True, but that requires someone to post a proper problem report rather
    > than something that reads like "why is the sky blue?" :-)



    If this means anything to anyone please tell me what needs to be changed
    to stop it happening:-


    11-29-2004 10:29:04 SYS3171 PID 9521 TID 0003 Slot 00b4
    F:\USR\LOCAL\PYTHON\PYTHON.EXE
    c0000005
    1e7b6da5
    P1=00000002 P2=0242f538 P3=XXXXXXXX P4=XXXXXXXX
    EAX=024303e4 EBX=0003568c ECX=02430408 EDX=024303e4
    ESI=0000016c EDI=00000004
    DS=0053 DSACC=d0f3 DSLIM=3fffffff
    ES=0053 ESACC=d0f3 ESLIM=3fffffff
    FS=150b FSACC=00f3 FSLIM=00000030
    GS=0000 GSACC=**** GSLIM=********
    CS:EIP=005b:1ffc9d15 CSACC=d0df CSLIM=3fffffff
    SS:ESP=0053:0242ffbc SSACC=d0f3 SSLIM=3fffffff
    EBP=024300c0 FLG=00010212

    EMX.DLL 0002:00006da5






    > Steven
    >
    >


  14. Re: SYS3171

    jp wrote:

    > If this means anything to anyone please tell me what needs to be changed
    > to stop it happening:-
    >
    > 11-29-2004 10:29:04 SYS3171 PID 9521 TID 0003 Slot 00b4
    >

    It's crashing on a secondary thread, which explains why changing the
    primary stack made absolutely no difference. What needs to be changed
    is probably the size of the thread's stack (assuming that the crash
    is not due to, say, infinite recursion), ie. changing the source code
    and rebuilding.


    Michal


+ Reply to Thread