468,115 Members | 2,098 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,115 developers. It's quick & easy.

M2Crypto possible intermittent bug

I just "upgraded" from M2Crypto 0.17 to M2Crypto 0.18, and I'm
running my regression tests. I'm seeing occasional cases where
M2Crypto raises the exception SSL.SSLError, and the associated
error is "(0, 'Error')", which is the bogus error you get if you feed 0 to
"perror". It failed once on "verisign.com"'s cert, then worked
on the next try.

This is on Windows, running Python 2.4 (which is what M2Crypto
supports on Windows.)

I'm trying to make this reproduceable. More later.

John Nagle
Oct 10 '07 #1
5 1140
John Nagle wrote:
I just "upgraded" from M2Crypto 0.17 to M2Crypto 0.18, and I'm
running my regression tests. I'm seeing occasional cases where
M2Crypto raises the exception SSL.SSLError, and the associated
error is "(0, 'Error')", which is the bogus error you get if you feed 0 to
"perror". It failed once on "verisign.com"'s cert, then worked
on the next try.

This is on Windows, running Python 2.4 (which is what M2Crypto
supports on Windows.)

I'm trying to make this reproduceable. More later.

John Nagle
Still trying to reproduce this. Every time except the first,
the regression test passed. More later. Might be an uninitialized
variable in a DLL, or something like that.

John Nagle
Oct 10 '07 #2
John Nagle wrote:
John Nagle wrote:
> I just "upgraded" from M2Crypto 0.17 to M2Crypto 0.18, and I'm
running my regression tests. I'm seeing occasional cases where
M2Crypto raises the exception SSL.SSLError, and the associated
error is "(0, 'Error')", which is the bogus error you get if you feed
0 to
"perror". It failed once on "verisign.com"'s cert, then worked
on the next try.

This is on Windows, running Python 2.4 (which is what M2Crypto
supports on Windows.)

I'm trying to make this reproduceable. More later.

John Nagle

Still trying to reproduce this. Every time except the first,
the regression test passed. More later. Might be an uninitialized
variable in a DLL, or something like that.

John Nagle
Still having trouble reproducing the problem. But somewhere,
something raised that bogus no-error exception three times.
Anything that returns "(0, 'Error')" as exception data is a bug.

John Nagle
Oct 10 '07 #3
John Nagle wrote:
Still having trouble reproducing the problem. But somewhere,
something raised that bogus no-error exception three times.
Anything that returns "(0, 'Error')" as exception data is a bug.
If you can, build python and m2crypto with debug symbols, and place
breakpoints in |case SSL_ERROR_SYSCALL| blocks (from _ssl.i). Then rerun
the tests. That would be my first guess as to where these might be
coming from.

--
Heikki Toivonen
Oct 10 '07 #4
Heikki Toivonen wrote:
John Nagle wrote:
> Still having trouble reproducing the problem. But somewhere,
something raised that bogus no-error exception three times.
Anything that returns "(0, 'Error')" as exception data is a bug.

If you can, build python and m2crypto with debug symbols, and place
breakpoints in |case SSL_ERROR_SYSCALL| blocks (from _ssl.i). Then rerun
the tests. That would be my first guess as to where these might be
coming from.
I don't have the right compiler to build it on Windows, and it
doesn't seem to be failing on Linux. It failed three times during
one test run and hasn't failed since. That makes me suspect an
uninitialized data problem in C code. I'll try to reproduce the
problem.

John Nagle
Oct 11 '07 #5
John Nagle wrote:
Heikki Toivonen wrote:
>John Nagle wrote:
>> Still having trouble reproducing the problem. But somewhere,
something raised that bogus no-error exception three times.
Anything that returns "(0, 'Error')" as exception data is a bug.

If you can, build python and m2crypto with debug symbols, and place
breakpoints in |case SSL_ERROR_SYSCALL| blocks (from _ssl.i). Then rerun
the tests. That would be my first guess as to where these might be
coming from.

I don't have the right compiler to build it on Windows, and it
doesn't seem to be failing on Linux. It failed three times during
one test run and hasn't failed since. That makes me suspect an
uninitialized data problem in C code. I'll try to reproduce the
problem.

John Nagle
I'm unable to reproduce the problem at this time. Even re-installingM2Crypto
doesn't make it recur. I've been rerunning my regression test
over and over, and it's not repeatable.

I suspect that for some reason Windows networking was generating
a local error, and the Windows error status to UNIX-like error status
conversion is wrong somewhere.

John Nagle
Oct 12 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Carl Waldbieser | last post: by
5 posts views Thread by jsmilan | last post: by
1 post views Thread by morphex | last post: by
5 posts views Thread by KW | last post: by
8 posts views Thread by John Nagle | last post: by
7 posts views Thread by John Nagle | last post: by
2 posts views Thread by Bojan Mihelac | last post: by
reply views Thread by Heikki Toivonen | last post: by
5 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.