Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of uninitialized value $ROOT_PID in numeric ne (!=) #62

Closed
atoomic opened this issue Apr 24, 2018 · 4 comments
Closed

Use of uninitialized value $ROOT_PID in numeric ne (!=) #62

atoomic opened this issue Apr 24, 2018 · 4 comments

Comments

@atoomic
Copy link
Collaborator

atoomic commented Apr 24, 2018

Discover this issue while running our test suite using yath

( STDERR )  job 1407    ----- START -----
Use of uninitialized value $ROOT_PID in numeric ne (!=) at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test2/Formatter/Stream.pm line 81.
new_root called from child process! at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test2/Formatter/Stream.pm line 81.
	Test2::Formatter::Stream::new_root("Test2::Formatter::Stream") called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test2/API/Stack.pm line 31
	Test2::API::Stack::new_hub(Test2::API::Stack=ARRAY(0x1571fb8)) called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test2/API/Stack.pm line 47
	Test2::API::Stack::top(Test2::API::Stack=ARRAY(0x1571fb8)) called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test2/API.pm line 325
	Test2::API::context("level", 2, "fudge", 1, "stack", Test2::API::Stack=ARRAY(0x1571fb8), "hub", undef, ...) called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test/Builder.pm line 158
	Test::Builder::ctx(Test::Builder=HASH(0x13287c0)) called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test/Builder.pm line 410
	Test::Builder::reset(Test::Builder=HASH(0x13287c0), "singleton", 1) called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test/Builder.pm line 111
	Test::Builder::__ANON__() called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test2/API/Instance.pm line 319
	Test2::API::Instance::load(Test2::API::Instance=HASH(0x1403ec8)) called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test2/API.pm line 168
	Test2::API::test2_load() called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test/Builder/Module.pm line 78
	Test::Builder::Module::import("Test::Builder::Module") called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test/More.pm line 22
	Test::More::BEGIN() called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Test/More.pm line 22
@exodist
Copy link
Member

exodist commented Apr 24, 2018

The real issue here is new_root called from child process! This is an intentional error to tell you that the test does something problematic. The easiest solution may be to add this header to the test:

# HARNESS-NO-STREAM

This error means that you either preloaded something that cannot be preloaded (IE something that sends test events like diag, note, ok, etc). Or it means you forked before the formatter was initialized (IE forking before test2 is ready for you to do so)

Without seeing the code I cannot really dive much deeper. A minimal reproduction test case (including any preloads neede dot make it occur) would be helpful.

@exodist
Copy link
Member

exodist commented Apr 24, 2018

As for the warning, that should be fixed. I suspect it will always have the warning when the error is triggered, I will look into that part.

@atoomic
Copy link
Collaborator Author

atoomic commented Apr 24, 2018

Thanks @exodist indeed HARNESS-NO-STREAM fixes this issue

@exodist
Copy link
Member

exodist commented Feb 7, 2020

A lot of fixes have happened to the stream formatter. This is probably fixed. It was also never proven this was a yath issue as opposed to a misbehaving test.

@exodist exodist closed this as completed Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants