You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Dmitry Zolotarev (Created) (JIRA)" <ji...@apache.org> on 2012/03/22 11:20:22 UTC

[jira] [Created] (THRIFT-1538) Error during deserialization int64 on 32-bit architecture

Error during deserialization int64 on 32-bit architecture
---------------------------------------------------------

                 Key: THRIFT-1538
                 URL: https://issues.apache.org/jira/browse/THRIFT-1538
             Project: Thrift
          Issue Type: Bug
          Components: PHP - Library
    Affects Versions: 0.2
         Environment: Ubuntu 10.04
            Reporter: Dmitry Zolotarev


Value 5718813258875302619 deserialized as 5718813261021839359

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1538) Error during deserialization int64 on 32-bit architecture

Posted by "Alexey Sviridov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288486#comment-13288486 ] 

Alexey Sviridov commented on THRIFT-1538:
-----------------------------------------

Actually this is bug in thrift php code. There is wrong converting from float to int64 on 32-bit systems.
                
> Error during deserialization int64 on 32-bit architecture
> ---------------------------------------------------------
>
>                 Key: THRIFT-1538
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1538
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.2, 0.8
>         Environment: Ubuntu 10.04
>            Reporter: Dmitry Zolotarev
>            Priority: Critical
>              Labels: bug, php, serialization
>         Attachments: hello.php, thrift_test1.tar.bz2
>
>
> Value 5718813258875302619 deserialized as 5718813261021839359

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1538) Error during deserialization int64 on 32-bit architecture

Posted by "Dmitry Zolotarev (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Zolotarev updated THRIFT-1538:
-------------------------------------

    Priority: Critical  (was: Major)
    
> Error during deserialization int64 on 32-bit architecture
> ---------------------------------------------------------
>
>                 Key: THRIFT-1538
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1538
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.2
>         Environment: Ubuntu 10.04
>            Reporter: Dmitry Zolotarev
>            Priority: Critical
>              Labels: bug, php, serialization
>
> Value 5718813258875302619 deserialized as 5718813261021839359

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1538) Error during deserialization int64 on 32-bit architecture

Posted by "Dmitry Zolotarev (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Zolotarev updated THRIFT-1538:
-------------------------------------

    Attachment: thrift_test1.tar.bz2
                hello.php

The tarball contains generated code by Thrift 0.8 and server implemented on Python.
hello.php - client code
This code shows described error.
To server sent value 5718813258875302619, but server received value 5718813258875302912
                
> Error during deserialization int64 on 32-bit architecture
> ---------------------------------------------------------
>
>                 Key: THRIFT-1538
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1538
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.2, 0.8
>         Environment: Ubuntu 10.04
>            Reporter: Dmitry Zolotarev
>            Priority: Critical
>              Labels: bug, php, serialization
>         Attachments: hello.php, thrift_test1.tar.bz2
>
>
> Value 5718813258875302619 deserialized as 5718813261021839359

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1538) Error during deserialization int64 on 32-bit architecture

Posted by "Roger Meier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289661#comment-13289661 ] 

Roger Meier commented on THRIFT-1538:
-------------------------------------

do you have a patch? see http://thrift.apache.org/docs/HowToContribute


Would be greate to have a better test/test.sh based on test/ThriftTest.thrift

https://builds.apache.org/view/S-Z/view/Thrift/job/Thrift/lastSuccessfulBuild/artifact/thrift/test/test.log

                
> Error during deserialization int64 on 32-bit architecture
> ---------------------------------------------------------
>
>                 Key: THRIFT-1538
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1538
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.2, 0.8
>         Environment: Ubuntu 10.04
>            Reporter: Dmitry Zolotarev
>            Priority: Critical
>              Labels: bug, php, serialization
>         Attachments: hello.php, thrift_test1.tar.bz2
>
>
> Value 5718813258875302619 deserialized as 5718813261021839359

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1538) Error during deserialization int64 on 32-bit architecture

Posted by "Alexey Sviridov (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235631#comment-13235631 ] 

Alexey Sviridov commented on THRIFT-1538:
-----------------------------------------

On 32-bit architecture in php client value 5718813258875302619 threated not as int64, but as float. Then this value wrongly converted to byte array before sended to net. Java server recieved value 5718813261021839359.
                
> Error during deserialization int64 on 32-bit architecture
> ---------------------------------------------------------
>
>                 Key: THRIFT-1538
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1538
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.2
>         Environment: Ubuntu 10.04
>            Reporter: Dmitry Zolotarev
>            Priority: Critical
>              Labels: bug, php, serialization
>
> Value 5718813258875302619 deserialized as 5718813261021839359

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1538) Error during deserialization int64 on 32-bit architecture

Posted by "Alexey Sviridov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289939#comment-13289939 ] 

Alexey Sviridov commented on THRIFT-1538:
-----------------------------------------

@Roger 
Unfortunately we don't have enough time to make good patch right now. We partially fix thrift code to meet our needs at work. But we can give full explain of this error and way how to fix it. We planning release full patch some time later but it would be nice if this error will be fixed in 0.9
                
> Error during deserialization int64 on 32-bit architecture
> ---------------------------------------------------------
>
>                 Key: THRIFT-1538
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1538
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.2, 0.8
>         Environment: Ubuntu 10.04
>            Reporter: Dmitry Zolotarev
>            Priority: Critical
>              Labels: bug, php, serialization
>         Attachments: hello.php, thrift_test1.tar.bz2
>
>
> Value 5718813258875302619 deserialized as 5718813261021839359

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1538) Error during deserialization int64 on 32-bit architecture

Posted by "Dmitry Zolotarev (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Zolotarev updated THRIFT-1538:
-------------------------------------

    Affects Version/s: 0.8
    
> Error during deserialization int64 on 32-bit architecture
> ---------------------------------------------------------
>
>                 Key: THRIFT-1538
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1538
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.2, 0.8
>         Environment: Ubuntu 10.04
>            Reporter: Dmitry Zolotarev
>            Priority: Critical
>              Labels: bug, php, serialization
>
> Value 5718813258875302619 deserialized as 5718813261021839359

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (THRIFT-1538) Error during deserialization int64 on 32-bit architecture

Posted by "Alexey Sviridov (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235631#comment-13235631 ] 

Alexey Sviridov edited comment on THRIFT-1538 at 3/22/12 3:21 PM:
------------------------------------------------------------------

On 32-bit architecture, in php client, value 5718813258875302619 threated not as int64, but as float. Then this value wrongly converted to byte array before sended to net. Java server recieved value 5718813261021839359.
                
      was (Author: sviridov_alexey):
    On 32-bit architecture in php client value 5718813258875302619 threated not as int64, but as float. Then this value wrongly converted to byte array before sended to net. Java server recieved value 5718813261021839359.
                  
> Error during deserialization int64 on 32-bit architecture
> ---------------------------------------------------------
>
>                 Key: THRIFT-1538
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1538
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.2
>         Environment: Ubuntu 10.04
>            Reporter: Dmitry Zolotarev
>            Priority: Critical
>              Labels: bug, php, serialization
>
> Value 5718813258875302619 deserialized as 5718813261021839359

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira