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

generic_test.py::test_unknown_dfly_env #3314

Closed
kostasrim opened this issue Jul 12, 2024 · 2 comments · Fixed by #3487
Closed

generic_test.py::test_unknown_dfly_env #3314

kostasrim opened this issue Jul 12, 2024 · 2 comments · Fixed by #3487
Assignees
Labels
bug Something isn't working

Comments

@kostasrim
Copy link
Contributor

Fix the failure https://github.com/dragonflydb/dragonfly/actions/runs/9909935256/job/27379172007#step:6:723

@kostasrim kostasrim added the bug Something isn't working label Jul 12, 2024
@kostasrim kostasrim self-assigned this Jul 12, 2024
@kostasrim
Copy link
Contributor Author

I saw this failing on Borys PR and I saw a stack trace. It could be a false positive (since we do have an issue with shut down from time to time)

For reference: https://github.com/dragonflydb/dragonfly/actions/runs/9906614436/job/27368527628?pr=3307#step:12:350

F20240712 10:59:25.022938 34712 dfly_main.cc:614] unknown environment variable DFLY_abcdef

With trace:

*** Check failure stack trace: ***
    @     0x556c4ad2a630  google::LogMessage::Fail()
    @     0x556c4ad31823  google::LogMessage::SendToLog()
    @     0x556c4ad29fe7  google::LogMessage::Flush()
    @     0x556c4ad2b96f  google::LogMessageFatal::~LogMessageFatal()
    @     0x556c4a48d4f5  ParseFlagsFromEnv()
    @     0x556c4a463a89  main
    @     0x7f73f46f8083  __libc_start_main
    @     0x556c4a48b2de  _start
*** SIGABRT received at time=1720781965 on cpu 1 ***
PC: @     0x7f73f471700b  (unknown)  raise

@chakaz
Copy link
Collaborator

chakaz commented Aug 6, 2024

This stack trace is actually OK, i.e. working as intended. We should not allow Dragonfly to start if an invalid env var exists.
However, there are failures in the CI, which shouldn't happen, example:
https://github.com/dragonflydb/dragonfly/actions/runs/10255949513/job/28374012719

The failure comes from Pytest:

2024-08-05T21:32:45.5569104Z ==================================== ERRORS ====================================
2024-08-05T21:32:45.5569827Z �[31m�[1m___________ ERROR at teardown of test_unknown_dfly_env[df_factory0] ____________�[0m
2024-08-05T21:32:45.5570257Z 
2024-08-05T21:32:45.5570618Z request = <SubRequest 'df_factory' for <Function test_unknown_dfly_env[df_factory0]>>
2024-08-05T21:32:45.5571204Z tmp_dir = PosixPath('/tmp/tmpeexlmb_6')
2024-08-05T21:32:45.5572184Z test_env = {'CI': 'true', 'DEBIAN_FRONTEND': 'noninteractive', 'DRAGONFLY_PATH': '/__w/dragonfly/dragonfly/build/dragonfly', 'DRAGONFLY_TMP': '/tmp/tmpeexlmb_6', ...}
2024-08-05T21:32:45.5572932Z 
2024-08-05T21:32:45.5573095Z     @pytest.fixture(scope="function", params=[{}])
2024-08-05T21:32:45.5573664Z     def df_factory(request, tmp_dir, test_env) -> DflyInstanceFactory:
2024-08-05T21:32:45.5574110Z         """
2024-08-05T21:32:45.5574408Z         Create an instance factory with supplied params.
2024-08-05T21:32:45.5574780Z         """
2024-08-05T21:32:45.5575137Z         os.makedirs(os.path.join(gettempdir(), "tiered"), exist_ok=True)
2024-08-05T21:32:45.5575890Z         scripts_dir = os.path.dirname(os.path.abspath(__file__))
2024-08-05T21:32:45.5576635Z         path = os.environ.get("DRAGONFLY_PATH", os.path.join(scripts_dir, "../../build-dbg/dragonfly"))
2024-08-05T21:32:45.5577185Z     
2024-08-05T21:32:45.5577454Z         log_directory = getattr(request.node, "log_dir")
2024-08-05T21:32:45.5577821Z     
2024-08-05T21:32:45.5578087Z         args = request.param if request.param else {}
2024-08-05T21:32:45.5578607Z         existing = request.config.getoption("--existing-port")
2024-08-05T21:32:45.5579220Z         existing_admin = request.config.getoption("--existing-admin-port")
2024-08-05T21:32:45.5579881Z         existing_mc = request.config.getoption("--existing-mc-port")
2024-08-05T21:32:45.5580338Z         params = DflyParams(
2024-08-05T21:32:45.5580628Z             path=path,
2024-08-05T21:32:45.5580887Z             cwd=tmp_dir,
2024-08-05T21:32:45.5581250Z             gdb=request.config.getoption("--gdb"),
2024-08-05T21:32:45.5581805Z             buffered_out=request.config.getoption("--buffered-output"),
2024-08-05T21:32:45.5582390Z             args=parse_args(request.config.getoption("--df")),
2024-08-05T21:32:45.5582876Z             existing_port=int(existing) if existing else None,
2024-08-05T21:32:45.5583435Z             existing_admin_port=int(existing_admin) if existing_admin else None,
2024-08-05T21:32:45.5584029Z             existing_mc_port=int(existing_mc) if existing_mc else None,
2024-08-05T21:32:45.5584465Z             env=test_env,
2024-08-05T21:32:45.5584747Z             log_dir=log_directory,
2024-08-05T21:32:45.5585049Z         )
2024-08-05T21:32:45.5585257Z     
2024-08-05T21:32:45.5585522Z         factory = DflyInstanceFactory(params, args)
2024-08-05T21:32:45.5585901Z         yield factory
2024-08-05T21:32:45.5586158Z >       factory.stop_all()

Perhaps we're trying to stop a failed server for some reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants