[ 
https://issues.apache.org/jira/browse/THRIFT-6298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer resolved THRIFT-6298.
--------------------------------
    Fix Version/s: 0.26.0
         Assignee: Jens Geyer
       Resolution: Fixed

> Rust: split_halves_must_not_clobber_each_others_timeout fails on kernels with 
> HZ=250
> ------------------------------------------------------------------------------------
>
>                 Key: THRIFT-6298
>                 URL: https://issues.apache.org/jira/browse/THRIFT-6298
>             Project: Thrift
>          Issue Type: Bug
>          Components: Rust - Library
>            Reporter: Jens Geyer
>            Assignee: Jens Geyer
>            Priority: Minor
>             Fix For: 0.26.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The test 
> {{transport::socket::tests::split_halves_must_not_clobber_each_others_timeout}}
>  ({{lib/rs/src/transport/socket.rs}}, from THRIFT-5954) sets a read timeout 
> of 250 ms and expects to read exactly that value back. Linux stores socket 
> timeouts in jiffies and rounds up. On a kernel with {{CONFIG_HZ=250}}, which 
> is the Debian default, the value comes back as 252 ms:
> {noformat}
> assertion `left == right` failed
>   left: Some(252ms)
>  right: Some(250ms)
> {noformat}
> This was seen with Rust 1.85.1 on Debian 13 (kernel 6.12). CI passes, so the 
> kernels on its runners keep 250 ms exact.
> h2. Suggested
> Use timeout values that are multiples of 20 ms, which kernels with HZ 100, 
> 250 and 1000 all store exactly. For example, use 240 ms instead of 250 ms; 
> the test then passes on the HZ=250 machine. The test's other values, 80 ms 
> and 500 ms, already qualify.
> _Drafted with AI assistance (Claude Opus 5); reviewed and filed by Jens 
> Geyer._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to