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

Make PubSub::DESTROY safer #93

Open
andrii-suse opened this issue Nov 29, 2023 · 1 comment
Open

Make PubSub::DESTROY safer #93

andrii-suse opened this issue Nov 29, 2023 · 1 comment

Comments

@andrii-suse
Copy link

This is a variation of #23 , but not the only one possible, thus new issue.

(in cleanup) Can't call method "ping" on an undefined value at /usr/share/perl5/Mojo/mysql.pm line 115 during global destruction. can be shown during global destruction when Minion uses Minion-Backend-mysql and executes $minion->perform_jobs()

Example app can be found in https://github.com/andrii-suse/Minion-Backend-mysql/blob/t_environ/t/lib/environ/mm/source/minion.pl.m4 (save it as minion.pl)

Then do (adjust path to mysql socket and db accordingly in TEST_MYSQL):

export MOJO_PUBSUB_EXPERIMENTAL=1 
export TEST_MYSQL="dbi:mysql:mysql_socket=/opt/project/mm1/ma/.sock;db=mm_test" 
perl -Ilib minion.pl enqueue
perl -Ilib minion.pl enqueue
perl -Ilib minion.pl enqueue
perl -Ilib minion.pl enqueue
perl -Ilib minion.pl shoot

It may require several iterations to see the message
What is tricky is that I can easily reproduce the problem on openSUSE Tumbleweed and latest debian containers, but never in openSUSE Leap container

Below is link to PR for Minion-Backend-mysql with CI jobs which check the same using environ framework to manage MariaDB server. The PR shows failures on Tumbleweed and Debian, but success on Leap (need be logged in to github to see the logs):
andrii-suse/Minion-Backend-mysql#1

@jhthorsen
Copy link
Owner

I don't mind bailing out on GLOBAL_DESTRUCT. PR is very much welcome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants