bogus OverflowError: python bug?

Discussion in 'Python' started by Luke, Jun 7, 2004.

  1. Luke

    Luke Guest

    Hi,

    I'm getting an OverflowError which doesn't make sense to me. Is this a
    python bug?

    Traceback (most recent call last):
    File "/home/demoau/lib/py/omniORB/__init__.py", line 717, in static_is_a
    for b in cls.__bases__:
    OverflowError: long int too large to convert to int

    cls=<class omniORB.PortableServer.Servant at 0x4073656c>
    cls.__bases__=()

    Surely that line of source code shouldn't be able to produce an OverflowError?

    (BTW, I know that a traceback can sometimes print the wrong source line when
    the .py file has been modified since importing the module into the python
    process, but I was careful to avoid this problem).

    Regards,
    Luke.
     
    Luke, Jun 7, 2004
    #1
    1. Advertising

  2. Luke wrote:
    > I'm getting an OverflowError which doesn't make sense to me. Is this a
    > python bug?


    I very much doubt this. More likely, it's an omniORB bug.

    > Surely that line of source code shouldn't be able to produce an
    > OverflowError?


    It actually might. If the internal memory of the interpreter got
    corrupted by a buggy extension module, any code may cause any exception.

    > (BTW, I know that a traceback can sometimes print the wrong source line
    > when
    > the .py file has been modified since importing the module into the python
    > process, but I was careful to avoid this problem).


    There are other possible causes for bogus exceptions. A common one is
    that Python set an exception at some point, but the extension module
    forgot to forward the exception. Then, the next time Python checks
    for exceptions, it sees that there still is an exception pending, and
    raises it. That exception will make no sense that that point, of course.

    Only a gdb session can tell what really happened.

    Regards,
    Martin
     
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Jun 7, 2004
    #2
    1. Advertising

  3. Luke

    Luke Guest

    Martin v. Löwis wrote:

    >> Surely that line of source code shouldn't be able to produce an
    >> OverflowError?

    >
    >
    > It actually might. If the internal memory of the interpreter got
    > corrupted by a buggy extension module, any code may cause any exception.


    Good point, though I would expect a memory corruption bug to cause less
    predictable behaviour (I can repeat this problem regularly in a large
    multithreaded program, and the bogus exception is always at this specific
    line of python).

    >> (BTW, I know that a traceback can sometimes print the wrong source
    >> line when
    >> the .py file has been modified since importing the module into the python
    >> process, but I was careful to avoid this problem).

    >
    >
    > There are other possible causes for bogus exceptions. A common one is
    > that Python set an exception at some point, but the extension module
    > forgot to forward the exception. Then, the next time Python checks
    > for exceptions, it sees that there still is an exception pending, and
    > raises it. That exception will make no sense that that point, of course.


    Oh yes of course, thanks... this sounds to be more consistent with the
    repeatability of the bogus exception.

    > Only a gdb session can tell what really happened.


    Ouch. I might try searching the omniORB extension module for a
    forgot-to-forward-exception bug first.

    Thanks for your help, Martin.

    Luke.
     
    Luke, Jun 8, 2004
    #3
  4. In article <vvaxc.6919$%>,
    Luke <> wrote:

    >Martin v. Löwis wrote:


    >> There are other possible causes for bogus exceptions. A common one is
    >> that Python set an exception at some point, but the extension module
    >> forgot to forward the exception. Then, the next time Python checks
    >> for exceptions, it sees that there still is an exception pending, and
    >> raises it. That exception will make no sense that that point, of course.

    >
    >Oh yes of course, thanks... this sounds to be more consistent with the
    >repeatability of the bogus exception.
    >
    >> Only a gdb session can tell what really happened.

    >
    >Ouch. I might try searching the omniORB extension module for a
    >forgot-to-forward-exception bug first.


    The best thing for you to do is to subscribe to the omniORB mailing
    list, and post as much information as you can about the problem.
    Please include the full traceback, and a log from omniORB run with
    -ORBtraceLevel 25.

    Cheers,

    Duncan.

    --
    -- Duncan Grisby --
    -- --
    -- http://www.grisby.org --
     
    Duncan Grisby, Jun 11, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paolo Alexis Falcone
    Replies:
    3
    Views:
    1,093
    Paolo Alexis Falcone
    Jun 29, 2003
  2. overflowerror!!

    , May 26, 2005, in forum: Python
    Replies:
    3
    Views:
    325
    John Machin
    May 27, 2005
  3. Replies:
    1
    Views:
    333
    Chris Lambacher
    Jun 8, 2005
  4. Sheldon
    Replies:
    4
    Views:
    547
    Sheldon
    Jun 23, 2006
  5. Tzury Bar Yochay
    Replies:
    5
    Views:
    793
    Steven D'Aprano
    Oct 23, 2008
Loading...

Share This Page