karenetheridge / JSON-Schema-Modern

Validate data against a schema using a JSON Schema
https://metacpan.org/release/JSON-Schema-Modern/
Other
10 stars 1 forks source link

JSON-Schema-Modern-0.581: t/serialization.t seems to hang on Strawberry Perl #84

Closed twata1 closed 7 months ago

twata1 commented 7 months ago

Hello,

It seems to me that t/serialization.t hangs on Windows as follows.

Strawberry Perl 5.32.1 on Windows 8.1 (64-bit)

C:\home\sunnyday1>cpan ETHER/JSON-Schema-Modern-0.581.tar.gz

(snip)

  ETHER/JSON-Schema-Modern-0.581.tar.gz
  C:\Strawberry\perl\bin\perl.exe ./Build -- OK
Running Build test for ETHER/JSON-Schema-Modern-0.581.tar.gz
#
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
#     Module               Want     Have
#     ------------------- ----- --------
#     Module::Build::Tiny 0.034    0.047
#     perl                5.020 5.032001
#
# === Test Requires ===
#
#     Module                            Want     Have
#     ------------------------------ ------- --------
#     CPAN::Meta::Check                0.011    0.018
#     CPAN::Meta::Requirements           any    2.141
#     Data::Dumper                       any    2.183
#     File::Spec                         any     3.78
#     IPC::Open3                         any     1.21
#     Math::BigInt                       any 2.003002
#     Module::Metadata                   any 1.000038
#     Test2::V0                          any 0.000149
#     Test::Deep                         any    1.204
#     Test::Deep::UnorderedPairs         any    0.006
#     Test::Fatal                        any    0.017
#     Test::File::ShareDir               any 1.001002
#     Test::JSON::Schema::Acceptance   1.021    1.021
#     Test::Memory::Cycle                any     1.06
#     Test::More                        0.96 1.302198
#     Test::Needs                        any 0.002010
#     Test::Warnings                     any    0.032
#     Test::Without::Module             0.21     0.21
#     lib                                any     0.65
#     perl                           v5.20.0 5.032001
#     utf8                               any     1.22
#
# === Test Recommends ===
#
#     Module         Want     Have
#     ---------- -------- --------
#     CPAN::Meta 2.120900 2.150010
#
# === Runtime Requires ===
#
#     Module                        Want     Have
#     ------------------------- -------- --------
#     B                              any     1.80
#     Carp                           any     1.50
#     Digest::MD5                    any     2.59
#     Exporter                       any     5.78
#     Feature::Compat::Try           any     0.04
#     File::ShareDir                 any    1.118
#     Getopt::Long::Descriptive      any    0.110
#     JSON::PP                       any  4.17_01
#     List::Util                    1.55     1.63
#     MIME::Base64                   any     3.16
#     Math::BigFloat                 any 2.003002
#     Module::Runtime                any    0.016
#     Mojo::JSON                     any    undef
#     Mojo::JSON::Pointer            any    undef
#     Mojo::URL                      any    undef
#     Mojolicious                   7.87     9.35
#     Moo                            any 2.005005
#     Moo::Role                      any 2.005005
#     MooX::TypeTiny            0.002002 0.002003
#     Path::Tiny                     any    0.144
#     Ref::Util                    0.100    0.204
#     Safe::Isa                 1.000008 1.000010
#     Scalar::Util                   any     1.63
#     Storable                       any     3.21
#     Sub::Install                   any    0.929
#     Types::Common::Numeric         any 2.004000
#     Types::Standard           1.016003 2.004000
#     constant                       any     1.33
#     experimental                 0.026    0.031
#     if                             any   0.0608
#     namespace::clean               any     0.27
#     open                           any     1.12
#     overload                       any     1.31
#     perl                       v5.20.0 5.032001
#     stable                       0.031    0.031
#     strict                         any     1.11
#     strictures                       2 2.000006
#     warnings                       any     1.47
#
# === Runtime Suggests ===
#
#     Module                    Want    Have
#     ------------------------- ---- -------
#     Class::XSAccessor          any    1.19
#     Cpanel::JSON::XS           any    4.37
#     Data::Validate::Domain     any missing
#     DateTime::Format::RFC3339  any  v1.6.0
#     Email::Address::XS        1.04    1.05
#     Net::IDN::Encode           any   2.501
#     Ref::Util::XS              any   0.117
#     Time::Moment               any    0.44
#     Type::Tiny::XS             any   0.025
#
# === Other Modules ===
#
#     Module              Have
#     ---------------- -------
#     Cpanel::JSON::XS    4.37
#     Encode              3.20
#     File::Temp        0.2311
#     JSON::PP         4.17_01
#     JSON::XS            4.03
#     Module::Runtime    0.016
#     Mojolicious         9.35
#     Pod::Coverage       0.23
#     Sub::Name           0.27
#     YAML                1.31
#     autodie             2.37
#
t/00-report-prereqs.t ................... ok
t/add-schema.t .......................... ok
#
#
# Results using Test::JSON::Schema::Acceptance 1.021
# specification version: draft2019-09
# using custom test directory: t/additional-tests-draft2019-09
# optional tests included: no
#
# filename                                  pass  todo-fail  fail
# ---------------------------------------------------------------
# anchor.json                                  2          0     0
# annotation-collection.json                  10          0     0
# badRef.json                                  3          0     0
# faux-buggy-schemas.json                      2          0     0
# format-date-time.json                        4          0     0
# format-date.json                             1          0     0
# format-duration.json                         9          0     0
# format-ipv4.json                             4          0     0
# format-ipv6.json                            17          0     0
# format-relative-json-pointer.json            7          0     0
# format-time.json                            13          0     0
# formats.json                                 4          0     0
# id.json                                      6          0     0
# integers.json                               29          0     0
# keyword-independence.json                  812          0     0
# loose-types-const-enum.json                  8          0     0
# recursive-dynamic.json                       4          0     0
# ref-and-id.json                              6          0     0
# ref.json                                    10          0     0
# short-circuit.json                          20          0     0
# unknownKeyword.json                          4          0     0
# vocabulary.json                              5          0     0
# ---------------------------------------------------------------
# TOTAL                                      980          0     0
#
# Congratulations, all non-optional tests are passing!
#
t/additional-tests-draft2019-09.t ....... ok
#
#
# Results using Test::JSON::Schema::Acceptance 1.021
# specification version: draft2020-12
# using custom test directory: t/additional-tests-draft2020-12
# optional tests included: no
#
# filename                                  pass  todo-fail  fail
# ---------------------------------------------------------------
# anchor.json                                  2          0     0
# annotation-collection.json                  10          0     0
# badRef.json                                  3          0     0
# dynamicRef.json                              7          0     0
# faux-buggy-schemas.json                      2          0     0
# format-date-time.json                        4          0     0
# format-date.json                             1          0     0
# format-duration.json                         9          0     0
# format-ipv4.json                             4          0     0
# format-ipv6.json                            17          0     0
# format-relative-json-pointer.json            7          0     0
# format-time.json                            13          0     0
# formats.json                                 4          0     0
# id.json                                      6          0     0
# integers.json                               29          0     0
# keyword-independence.json                  884          0     0
# loose-types-const-enum.json                  8          0     0
# recursive-dynamic.json                       2          0     0
# ref-and-id.json                              6          0     0
# ref.json                                    10          0     0
# short-circuit.json                          20          0     0
# unknownKeyword.json                          4          0     0
# vocabulary.json                             11          0     0
# ---------------------------------------------------------------
# TOTAL                                     1063          0     0
#
# Congratulations, all non-optional tests are passing!
#
t/additional-tests-draft2020-12.t ....... ok
#
#
# Results using Test::JSON::Schema::Acceptance 1.021
# specification version: draft7
# using custom test directory: t/additional-tests-draft7
# optional tests included: no
#
# filename                                  pass  todo-fail  fail
# ---------------------------------------------------------------
# badRef.json                                  3          0     0
# faux-buggy-schemas.json                      2          0     0
# format-date-time.json                        4          0     0
# format-date.json                             1          0     0
# format-ipv4.json                             4          0     0
# format-relative-json-pointer.json            7          0     0
# format-time.json                            13          0     0
# id.json                                      9          0     0
# integers.json                               29          0     0
# keyword-independence.json                  636          0     0
# loose-types-const-enum.json                  8          0     0
# not-an-anchor.json                           2          0     0
# not-an-id.json                               2          0     0
# ref-and-id.json                              2          0     0
# ref.json                                    10          0     0
# short-circuit.json                          16          0     0
# unknownKeyword.json                          8          0     0
# vocabulary.json                              3          0     0
# ---------------------------------------------------------------
# TOTAL                                      759          0     0
#
# Congratulations, all non-optional tests are passing!
#
t/additional-tests-draft7.t ............. ok
t/annotations.t ......................... ok
t/boolean-data.t ........................ ok
t/boolean-schemas.t ..................... ok
t/cached-metaschemas.t .................. ok
t/callbacks.t ........................... ok
t/content-encoding.t .................... ok
t/dialects.t ............................ ok
t/document.t ............................ ok
t/equality.t ............................ ok
t/errors.t .............................. ok
t/evaluate_json_string.t ................ ok
t/find-identifiers.t .................... ok
t/formats.t ............................. ok
#
#
# Results using Test::JSON::Schema::Acceptance 1.021
# specification version: draft2019-09
# using custom test directory: t/invalid-schemas-draft2019-09
# optional tests included: no
#
# filename                                  pass  todo-fail  fail
# ---------------------------------------------------------------
# invalid-input.json                           2          0     0
# ref.json                                     2          0     0
# vocabulary.json                              4          0     0
# ---------------------------------------------------------------
# TOTAL                                        8          0     0
#
# Congratulations, all non-optional tests are passing!
#
t/invalid-schemas-draft2019-09.t ........ ok
t/max_traversal_depth.t ................. ok
t/output_format.t ....................... ok
t/pattern.t ............................. ok
The signatures feature is experimental at t/ref.t line 1221.
t/ref.t ................................. ok
(hangs)

The following Strawbery Perl 64-bit versions seem to hang as well. v5.32.0 v5.30.3 v5.30.2 v5.30.0 v5.28.2 v5.26.1 v5.24.4 v5.22.3

Thank you,

karenetheridge commented 7 months ago

What version of Sereal do you have? If you upgrade to the latest version (5.004) do you see the same results?

twata1 commented 7 months ago

Thanks for the reply.

What version of Sereal do you have?


C:\home\sunnyday1>module-version Sereal

The version of Sereal in C:\home\sunnyday1\perl5\lib\perl5 is 5.004

C:\home\sunnyday1>cpan Sereal CPAN: CPAN::SQLite loaded ok (v0.219) CPAN: HTTP::Tiny loaded ok (v0.088) CPAN: Net::SSLeay loaded ok (v1.94) CPAN: IO::Socket::SSL loaded ok (v2.084) Fetching with HTTP::Tiny: https://cpan.org/authors/01mailrc.txt.gz Fetching with HTTP::Tiny: https://cpan.org/modules/02packages.details.txt.gz Fetching with HTTP::Tiny: https://cpan.org/modules/03modlist.data.gz Database was generated on Sun, 21 Jan 2024 09:25:47 GMT Updating database file ... Done! CPAN: Module::CoreList loaded ok (v5.20210123) Sereal is up to date (5.004).

C:\home\sunnyday1>

twata1 commented 7 months ago

prove -blv t\serialization.t was run as follows.

C:\home\sunnyday1\JSON-Schema-Modern-0.581>perl Build.PL
Creating new 'Build' script for 'JSON-Schema-Modern' version '0.581'

C:\home\sunnyday1\JSON-Schema-Modern-0.581>Build

(snip)

C:\home\sunnyday1\JSON-Schema-Modern-0.581>prove -blv t\serialization.t
t\serialization.t ..
# Seeded srand with seed '20240122' from local date.
ok 1 - evaluated against an empty schema
ok 2 - evaluate data against schema with custom dialect; format and unknown keywords are collected as annotations
ok 3 - evaluate data against schema with custom dialect; format-annotation is used
ok 4 - frozen object contains all the right keys
ok 5 - thawed object contains all the right keys
ok 6 - evaluate again against an empty schema
ok 7 - in thawed object, evaluate data against schema with custom dialect; format and unknown keywords are collected as annotations
ok 8 - evaluate again against an empty schema
ok 9 - core vocabulary_class for a different spec version works in a thawed object
ok 10 - format-assertion vocabulary_class works in a thawed object
ok 11 - metaschema_vocabulary_classes works in a thawed object
ok 12 - media_type works in a thawed object
ok 13 - encoding works in a thawed object
# Seeded srand with seed '20240122' from local date.
(hangs)
karenetheridge commented 7 months ago

thanks. my next question is if this is a new issue? i.e. were you able to install the module before, and it has just started failing now? Or could it be that there was always a problem and installing earlier versions of the distribution were equally problematic.

(In particular, this test just changed recently in v0.579; the new addition of a child process might be causing issues in windows.)

twata1 commented 7 months ago

thanks. my next question is if this is a new issue?

Yes.

C:\home\sunnyday1>module-version JSON::Schema::Modern

The version of JSON::Schema::Modern in C:\home\sunnyday1\perl5\lib\perl5 is 0.578

C:\home\sunnyday1>

For now, It seems to me that this issue resolved. The build log is attached. Build-6f02673.log.txt

Thank you for your help!