[7.4] CrpRandom class>>systemStateSeed - errorConvertingNegativeIntegerToBytes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[7.4] CrpRandom class>>systemStateSeed - errorConvertingNegativeIntegerToBytes

Boris Popov, DeepCove Labs (SNN)
Here's a good one we came across today,

==2006/3/16==15:59:55==BEGIN RUNTIME DIAGNOSTIC DUMP
Note: this file stored in VisualWorks #UTF8 (UTF-8) encoding

Cause of Dump: Cannot convert negative integer into a big-endian byte array
Image Identification: 'An anonymous image'
Smalltalk Version: 'VisualWorks®, 7.4 of December 5, 2005'
Object Memory versionId: #[59 41 59 64 74 0 0 0 59 41 59 64]
Class creating this dump: RuntimeImageDumper
Command Line: C:\Program Files\Cincom\vw7.4\bin\win\visual.exe F:\PacNet\bin
- raven\images\Agent-Runner.im
------------------------------------------------------------
Active Process
Context Stack:
[1] LargeNegativeInteger(Object)>>error:
[2] LargeNegativeInteger(Integer)>>errorConvertingNegativeIntegerToBytes
[3] LargeNegativeInteger>>asBigEndianByteArray
[4] Security.CrpRandom class>>systemStateSeed
[5] Integer class>>randomNumber
[6] Integer class>>nextChunkOfRandomBytesFor:
[7] Security.FragmentStream>>checkAndHandleAtEnd
[8] Security.FragmentStream>>fragment
[9] optimized [] in Security.FragmentStream>>next
[10] BlockClosure>>on:do:
[11] Security.FragmentStream>>next
[12] Security.SSLSession>>generateRandom
[13] Security.SSLSession>>sendClientHello:
[14] Security.SSLSession>>connect:subjectValidator:
[15] Security.SSLConnection>>connectSubject:
[16] optimized [] in Net.HttpsStreamHandler>>openStreamFor:port:timeout:
[17] BlockClosure>>ifCurtailed:
[18] Net.HttpsStreamHandler>>openStreamFor:port:timeout:
[19] Net.WebClient(Net.HttpClient)>>openConnectionStream

Initial Context Stack Arguments:
[1] LargeNegativeInteger(Object)>>error:
        Receiver: (id=8628)
-7712722333907931638301536881248697914233803058624
        Arg1: (id=10101) an UserMessage('Cannot convert negative integer
into a big-endian byte array', #errCantConvertNegativeNumbers, #security)
[2] LargeNegativeInteger(Integer)>>errorConvertingNegativeIntegerToBytes
        Receiver: (id=8628)
-7712722333907931638301536881248697914233803058624
[3] LargeNegativeInteger>>asBigEndianByteArray
        Receiver: (id=8628)
-7712722333907931638301536881248697914233803058624
[4] Security.CrpRandom class>>systemStateSeed
        Receiver: (id=11384) Security.CrpRandom
[5] Integer class>>randomNumber
        Receiver: (id=3615) Integer
[6] Integer class>>nextChunkOfRandomBytesFor:
        Receiver: (id=3615) Integer
        Arg1: (id=10654) a Security.FragmentStream
[7] Security.FragmentStream>>checkAndHandleAtEnd
        Receiver: (id=10654) a Security.FragmentStream
[8] Security.FragmentStream>>fragment
        Receiver: (id=10654) a Security.FragmentStream
[10] BlockClosure>>on:do:
        Receiver: (id=1082) BlockClosure [] in Security.FragmentStream>>next
        Arg1: (id=4843) EndOfStreamNotification
        Arg2: (id=1482) BlockClosure [] in Security.FragmentStream>>next
[11] Security.FragmentStream>>next
        Receiver: (id=10654) a Security.FragmentStream
[12] Security.SSLSession>>generateRandom
        Receiver: (id=11760) a Security.SSLSession
[13] Security.SSLSession>>sendClientHello:
        Receiver: (id=11760) a Security.SSLSession
        Arg1: (id=4581) a Security.SSLHandshake
[14] Security.SSLSession>>connect:subjectValidator:
        Receiver: (id=11760) a Security.SSLSession
        Arg1: (id=13786) a Security.SSLConnection
        Arg2: (id=5134) BlockClosure [] in
Net.HttpsStreamHandler>>validationBlock
[15] Security.SSLConnection>>connectSubject:
        Receiver: (id=13786) a Security.SSLConnection
        Arg1: (id=5134) BlockClosure [] in
Net.HttpsStreamHandler>>validationBlock
[17] BlockClosure>>ifCurtailed:
        Receiver: (id=1821) BlockClosure [] in
Net.HttpsStreamHandler>>openStreamFor:port:timeout:
        Arg1: (id=9553) BlockClosure [] in
Net.HttpsStreamHandler>>openStreamFor:port:timeout:
[18] Net.HttpsStreamHandler>>openStreamFor:port:timeout:
        Receiver: (id=11026) a Net.HttpsStreamHandler
        Arg1: (id=8633) 'elink-http4.bankofamerica.com'
        Arg2: (id=443) 443
        Arg3: (id=20000) 20000
[19] Net.WebClient(Net.HttpClient)>>openConnectionStream
        Receiver: (id=6240) aWebClient on: elink-http4.bankofamerica.com:443

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: [7.4] CrpRandom class>>systemStateSeed - errorConvertingNegativeIntegerToBytes

Boris Popov, DeepCove Labs (SNN)
I was hoping it would just disappear, but it didn't, so I had to hack it by
adding abs to make it looks like,

systemStateSeed
[...]
^value abs asBigEndianByteArray shaValue

Culprit at the moment is #threadedDataBytes which returns a negative value

ObjectMemory current threadedDataBytes >>> -466716120

Is this normal?

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

-----Original Message-----
From: Boris Popov
Sent: Thursday, March 16, 2006 4:10 PM
To: [hidden email]
Cc: [hidden email]
Subject: [7.4] CrpRandom class>>systemStateSeed -
errorConvertingNegativeIntegerToBytes

Here's a good one we came across today,

==2006/3/16==15:59:55==BEGIN RUNTIME DIAGNOSTIC DUMP
Note: this file stored in VisualWorks #UTF8 (UTF-8) encoding

Cause of Dump: Cannot convert negative integer into a big-endian byte array
Image Identification: 'An anonymous image'
Smalltalk Version: 'VisualWorks®, 7.4 of December 5, 2005'
Object Memory versionId: #[59 41 59 64 74 0 0 0 59 41 59 64]
Class creating this dump: RuntimeImageDumper
Command Line: C:\Program Files\Cincom\vw7.4\bin\win\visual.exe F:\PacNet\bin
- raven\images\Agent-Runner.im
------------------------------------------------------------
Active Process
Context Stack:
[1] LargeNegativeInteger(Object)>>error:
[2] LargeNegativeInteger(Integer)>>errorConvertingNegativeIntegerToBytes
[3] LargeNegativeInteger>>asBigEndianByteArray
[4] Security.CrpRandom class>>systemStateSeed
[5] Integer class>>randomNumber
[6] Integer class>>nextChunkOfRandomBytesFor:
[7] Security.FragmentStream>>checkAndHandleAtEnd
[8] Security.FragmentStream>>fragment
[9] optimized [] in Security.FragmentStream>>next
[10] BlockClosure>>on:do:
[11] Security.FragmentStream>>next
[12] Security.SSLSession>>generateRandom
[13] Security.SSLSession>>sendClientHello:
[14] Security.SSLSession>>connect:subjectValidator:
[15] Security.SSLConnection>>connectSubject:
[16] optimized [] in Net.HttpsStreamHandler>>openStreamFor:port:timeout:
[17] BlockClosure>>ifCurtailed:
[18] Net.HttpsStreamHandler>>openStreamFor:port:timeout:
[19] Net.WebClient(Net.HttpClient)>>openConnectionStream

Initial Context Stack Arguments:
[1] LargeNegativeInteger(Object)>>error:
        Receiver: (id=8628)
-7712722333907931638301536881248697914233803058624
        Arg1: (id=10101) an UserMessage('Cannot convert negative integer
into a big-endian byte array', #errCantConvertNegativeNumbers, #security)
[2] LargeNegativeInteger(Integer)>>errorConvertingNegativeIntegerToBytes
        Receiver: (id=8628)
-7712722333907931638301536881248697914233803058624
[3] LargeNegativeInteger>>asBigEndianByteArray
        Receiver: (id=8628)
-7712722333907931638301536881248697914233803058624
[4] Security.CrpRandom class>>systemStateSeed
        Receiver: (id=11384) Security.CrpRandom
[5] Integer class>>randomNumber
        Receiver: (id=3615) Integer
[6] Integer class>>nextChunkOfRandomBytesFor:
        Receiver: (id=3615) Integer
        Arg1: (id=10654) a Security.FragmentStream
[7] Security.FragmentStream>>checkAndHandleAtEnd
        Receiver: (id=10654) a Security.FragmentStream
[8] Security.FragmentStream>>fragment
        Receiver: (id=10654) a Security.FragmentStream
[10] BlockClosure>>on:do:
        Receiver: (id=1082) BlockClosure [] in Security.FragmentStream>>next
        Arg1: (id=4843) EndOfStreamNotification
        Arg2: (id=1482) BlockClosure [] in Security.FragmentStream>>next
[11] Security.FragmentStream>>next
        Receiver: (id=10654) a Security.FragmentStream
[12] Security.SSLSession>>generateRandom
        Receiver: (id=11760) a Security.SSLSession
[13] Security.SSLSession>>sendClientHello:
        Receiver: (id=11760) a Security.SSLSession
        Arg1: (id=4581) a Security.SSLHandshake
[14] Security.SSLSession>>connect:subjectValidator:
        Receiver: (id=11760) a Security.SSLSession
        Arg1: (id=13786) a Security.SSLConnection
        Arg2: (id=5134) BlockClosure [] in
Net.HttpsStreamHandler>>validationBlock
[15] Security.SSLConnection>>connectSubject:
        Receiver: (id=13786) a Security.SSLConnection
        Arg1: (id=5134) BlockClosure [] in
Net.HttpsStreamHandler>>validationBlock
[17] BlockClosure>>ifCurtailed:
        Receiver: (id=1821) BlockClosure [] in
Net.HttpsStreamHandler>>openStreamFor:port:timeout:
        Arg1: (id=9553) BlockClosure [] in
Net.HttpsStreamHandler>>openStreamFor:port:timeout:
[18] Net.HttpsStreamHandler>>openStreamFor:port:timeout:
        Receiver: (id=11026) a Net.HttpsStreamHandler
        Arg1: (id=8633) 'elink-http4.bankofamerica.com'
        Arg2: (id=443) 443
        Arg3: (id=20000) 20000
[19] Net.WebClient(Net.HttpClient)>>openConnectionStream
        Receiver: (id=6240) aWebClient on: elink-http4.bankofamerica.com:443

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [7.4] CrpRandom class>>systemStateSeed - errorConvertingNegativeIntegerToBytes

kobetic
Ouch, I can't talk about the threadedDataBytes issue, but Integer
class>>nextChunkOfRandomBytesFor: should have been gone long time ago.
A high 7.4.1 AR coming right up.

Thanks,

Martin

Boris Popov wrote:

> I was hoping it would just disappear, but it didn't, so I had to hack it by
> adding abs to make it looks like,
>
> systemStateSeed
> [...]
> ^value abs asBigEndianByteArray shaValue
>
> Culprit at the moment is #threadedDataBytes which returns a negative value
>
> ObjectMemory current threadedDataBytes >>> -466716120
>
> Is this normal?
>
> -Boris
>

Reply | Threaded
Open this post in threaded view
|

Re: [7.4] CrpRandom class>>systemStateSeed - errorConvertingNegativeIntegerToBytes

Boris Popov-4
Martin Kobetic wrote:
> Ouch, I can't talk about the threadedDataBytes issue, but Integer
> class>>nextChunkOfRandomBytesFor: should have been gone long time ago.
> A high 7.4.1 AR coming right up.

Great, thanks. Do you see anything blatantly wrong with a band-aid for
the time being though? Its just a bunch of random bits, surely abs'ing
the integer won't make things worse than they were, would it?

Cheers!

-Boris
http://bpopov.wordpress.com

>
> Thanks,
>
> Martin
>
> Boris Popov wrote:
>
>> I was hoping it would just disappear, but it didn't, so I had to hack
>> it by
>> adding abs to make it looks like,
>>
>> systemStateSeed
>> [...]
>> ^value abs asBigEndianByteArray shaValue
>>
>> Culprit at the moment is #threadedDataBytes which returns a negative
>> value
>>
>> ObjectMemory current threadedDataBytes >>> -466716120
>>
>> Is this normal?
>>
>> -Boris
>>


--
-Boris
http://bpopov.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: [7.4] CrpRandom class>>systemStateSeed - errorConvertingNegativeIntegerToBytes

kobetic
Boris Popov wrote:
> Great, thanks. Do you see anything blatantly wrong with a band-aid for
> the time being though? Its just a bunch of random bits, surely abs'ing
> the integer won't make things worse than they were, would it?

No I don't think the #abs can make it worse, it's an OK band-aid for the
problem of getting a random seed.

However, the negative value for #threadedDataBytes might be an indicator
of something else going bad. I've never seen that yet.