[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16020942#comment-16020942
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2789:
-------------------------------------------

Github user asdf2014 commented on the issue:

    https://github.com/apache/zookeeper/pull/262
  
    Seems like all test cases 
[passed](https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/738/testReport/),
 but some problems happened in `Zookeeper_operations` :: 
`testOperationsAndDisconnectConcurrently1`:
    ```bash
         [exec] BUILD FAILED
         [exec] 
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1298:
 The following error occurred while executing this line:
         [exec] 
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1308:
 exec returned: 2
         [exec] 
         [exec] Total time: 15 minutes 45 seconds
         [exec] /bin/kill -9 16911 
         [exec]      [exec] Zookeeper_operations::testAsyncWatcher1 : assertion 
: elapsed 1044
         [exec]      [exec] Zookeeper_operations::testAsyncGetOperation : 
elapsed 4 : OK
         [exec]      [exec] 
Zookeeper_operations::testOperationsAndDisconnectConcurrently1FAIL: zktest-mt
         [exec]      [exec] ==========================================
         [exec]      [exec] 1 of 2 tests failed
         [exec]      [exec] Please report to u...@zookeeper.apache.org
         [exec]      [exec] ==========================================
         [exec]      [exec] make[1]: Leaving directory 
`/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build/test/test-cppunit'
         [exec]      [exec] /bin/bash: line 5: 15116 Segmentation fault      
ZKROOT=/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/src/c/../..
 CLASSPATH=$CLASSPATH:$CLOVER_HOME/lib/clover.jar ${dir}$tst
         [exec]      [exec] make[1]: *** [check-TESTS] Error 1
         [exec]      [exec] make: *** [check-am] Error 2
         [exec] 
         [exec]     Running contrib tests.
         [exec] 
======================================================================
         [exec] 
         [exec] /home/jenkins/tools/ant/apache-ant-1.9.9/bin/ant 
-DZookeeperPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes 
test-contrib
         [exec] Buildfile: 
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml
         [exec] 
         [exec] test-contrib:
         [exec] 
         [exec] BUILD SUCCESSFUL
         [exec] Total time: 0 seconds
    ```


> Reassign `ZXID` for solving 32bit overflow problem
> --------------------------------------------------
>
>                 Key: ZOOKEEPER-2789
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2789
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: quorum
>    Affects Versions: 3.5.3
>            Reporter: Benedict Jin
>             Fix For: 3.6.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> If it is `1k/s` ops, then as long as $2^32 / (86400 * 1000) \approx 49.7$ 
> days ZXID will exhausted. But, if we reassign the `ZXID` into 16bit for 
> `epoch` and 48bit for `counter`, then the problem will not occur until after  
> $Math.min(2^16 / 365, 2^48 / (86400 * 1000 * 365)) \approx Math.min(179.6, 
> 8925.5) = 179.6$ years.
> However, i thought the ZXID is `long` type, reading and writing the long type 
> (and `double` type the same) in JVM, is divided into high 32bit and low 32bit 
> part of the operation, and because the `ZXID` variable is not  modified with 
> `volatile` and is not boxed for the corresponding reference type (`Long` / 
> `Double`), so it belongs to [non-atomic operation] 
> (https://docs.oracle.com/javase/specs/jls/se8 /html/jls-17.html#jls-17.7). 
> Thus, if the lower 32 bits of the upper 32 bits are divided into the entire 
> 32 bits of the `long`, there may be a concurrent problem.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to