You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by Mike Beckerle <mb...@apache.org> on 2023/01/12 01:45:12 UTC

java 19 - warning about non-deterministic behaviors

Just a warning. I installed java 19.0.1 and saw odd behaviors where tests
failed due to floating point number behavior changing. E.g., another digit
at the end of a long double float mantissa, etc.

I also saw some seemingly timing/non-deterministic behaviors. Ex where
a test fails sometimes, but never if you run the test in isolation. This
also seemed to be related to floating point numbers.

Other cases test behavior changed. The order of error detection seems to be
different in the schema compiler. One test had two errors in it. a
dfdlx:repType="" (not allowed to be empty string) as well as an undefined
type ex:myByte. The test works because it finds the dfdlx:repType bug
first. With Java 19, that error isn't *always* found first. It is if you
run the test in isolation, but not if you run 'sbt test' at a shell.

It's not a straightforward switch to "just use" java 19.

Re: java 19 - warning about non-deterministic behaviors

Posted by Mike Beckerle <mb...@apache.org>.
Brilliant.
This "fix" to floating point in Java 19 explains at least some of the
issues I was seeing, though not the fact that they seemed to be
intermittent.

On Thu, Jan 12, 2023 at 12:13 AM Adam Rosien <ad...@rosien.net> wrote:

> https://inside.java/2022/09/23/quality-heads-up/ ?
>
> On Wed, Jan 11, 2023 at 5:45 PM Mike Beckerle <mb...@apache.org>
> wrote:
>
> > Just a warning. I installed java 19.0.1 and saw odd behaviors where tests
> > failed due to floating point number behavior changing. E.g., another
> digit
> > at the end of a long double float mantissa, etc.
> >
> > I also saw some seemingly timing/non-deterministic behaviors. Ex where
> > a test fails sometimes, but never if you run the test in isolation. This
> > also seemed to be related to floating point numbers.
> >
> > Other cases test behavior changed. The order of error detection seems to
> be
> > different in the schema compiler. One test had two errors in it. a
> > dfdlx:repType="" (not allowed to be empty string) as well as an undefined
> > type ex:myByte. The test works because it finds the dfdlx:repType bug
> > first. With Java 19, that error isn't *always* found first. It is if you
> > run the test in isolation, but not if you run 'sbt test' at a shell.
> >
> > It's not a straightforward switch to "just use" java 19.
> >
>

Re: java 19 - warning about non-deterministic behaviors

Posted by Steve Lawrence <sl...@apache.org>.
Interesting.

Maybe one option is to change the failing tests to provide the type on 
the infoset (e.g. xsi:type="xs:double") and then update the textIsSame() 
function in XMLutils.scala to convert the expected and actual strings to 
doubles/floats and check for equality that way.

Not sure about the other non-deterministic failures, that's really 
surprising.

On 2023-01-12 12:13 AM, Adam Rosien wrote:
> https://inside.java/2022/09/23/quality-heads-up/ ?
> 
> On Wed, Jan 11, 2023 at 5:45 PM Mike Beckerle <mb...@apache.org> wrote:
> 
>> Just a warning. I installed java 19.0.1 and saw odd behaviors where tests
>> failed due to floating point number behavior changing. E.g., another digit
>> at the end of a long double float mantissa, etc.
>>
>> I also saw some seemingly timing/non-deterministic behaviors. Ex where
>> a test fails sometimes, but never if you run the test in isolation. This
>> also seemed to be related to floating point numbers.
>>
>> Other cases test behavior changed. The order of error detection seems to be
>> different in the schema compiler. One test had two errors in it. a
>> dfdlx:repType="" (not allowed to be empty string) as well as an undefined
>> type ex:myByte. The test works because it finds the dfdlx:repType bug
>> first. With Java 19, that error isn't *always* found first. It is if you
>> run the test in isolation, but not if you run 'sbt test' at a shell.
>>
>> It's not a straightforward switch to "just use" java 19.
>>
> 


Re: java 19 - warning about non-deterministic behaviors

Posted by Adam Rosien <ad...@rosien.net>.
https://inside.java/2022/09/23/quality-heads-up/ ?

On Wed, Jan 11, 2023 at 5:45 PM Mike Beckerle <mb...@apache.org> wrote:

> Just a warning. I installed java 19.0.1 and saw odd behaviors where tests
> failed due to floating point number behavior changing. E.g., another digit
> at the end of a long double float mantissa, etc.
>
> I also saw some seemingly timing/non-deterministic behaviors. Ex where
> a test fails sometimes, but never if you run the test in isolation. This
> also seemed to be related to floating point numbers.
>
> Other cases test behavior changed. The order of error detection seems to be
> different in the schema compiler. One test had two errors in it. a
> dfdlx:repType="" (not allowed to be empty string) as well as an undefined
> type ex:myByte. The test works because it finds the dfdlx:repType bug
> first. With Java 19, that error isn't *always* found first. It is if you
> run the test in isolation, but not if you run 'sbt test' at a shell.
>
> It's not a straightforward switch to "just use" java 19.
>