[MDEV-31981] mysql-test-run: *** ERROR: Could not find version of MariaDB Created: 2023-08-22  Updated: 2023-11-27  Resolved: 2023-11-27

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.6.15, 11.2.1
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Dimitris Staratzis Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: None
Environment:

MacOS & Linux


Attachments: Text File trace_output.txt     Text File trace_output_verbose.txt    

 Description   

I am facing this issue when trying to run the tests.

mysql-test-run: *** ERROR: Could not find version of MariaDB

To reproduce simply do:

cd server
git checkout mariadb-10.6.15
mkdir builddir
cd builddir
 
cmake \\n  -DPLUGIN_OQGRAPH=NO \\n  -DWITH_MARIABACKUP=OFF \\n  -DPLUGIN_TOKUDB=NO \\n  -DPLUGIN_ROCKSDB=NO \\n  -DPLUGIN_MROONGA=NO \\n  -DPLUGIN_SPIDER=NO \\n  -DPLUGIN_FEDERATED=NO \\n  -DPLUGIN_FEDERATEDX=NO \\n  -DPLUGIN_CONNECT=NO \\n  -DCMAKE_BUILD_TYPE=Debug \\n  -DWITH_DEBUG=1 \\n  ..
 
make -j12
./mysql-test/mysql-test-run.pl

Complete output is:

Logging: /Users/dimitrisstaratzis/Desktop/server/mysql-test/mariadb-test-run.pl  
VS config: 
vardir: /Users/dimitrisstaratzis/Desktop/server/builddir/mysql-test/var
Removing old var directory...
Creating var directory '/Users/dimitrisstaratzis/Desktop/server/builddir/mysql-test/var'...
Checking supported features...
mysql-test-run: *** ERROR: Could not find version of MariaDB



 Comments   
Comment by Dimitris Staratzis [ 2023-08-22 ]

Issue is not present in 10.6.14

Comment by Sergei Golubchik [ 2023-09-04 ]

As far as I can see, there were no changes between 10.6.14 and 10.6.15 that could've affected that.

Run perl -d:Trace mysql-test-run.pl it might provide a clue

Comment by Dimitris Staratzis [ 2023-09-07 ]

This is the output. The issue is present in 11.2.1 as well. I am aware that no changes were made at the part of the code that throws the error, but something else might be causing it.

dimitrisstaratzis@iMac builddir % perl -d:Trace ./mysql-test/mysql-test-run.pl
 
WARNING: This version of perl is included in macOS for compatibility with legacy software. 
In future versions of macOS the perl runtime will not be available by 
default, and may require you to install an additional package.
 
>> ./mysql-test/mysql-test-run.pl:3: $ENV{MTR_BINDIR} = '/Users/dimitrisstaratzis/Dev/server/builddir';
>> ./mysql-test/mysql-test-run.pl:4: chdir('/Users/dimitrisstaratzis/Dev/server/mysql-test');
>> ./mysql-test/mysql-test-run.pl:5: exit(system($^X, '/Users/dimitrisstaratzis/Dev/server/mysql-test/mariadb-test-run.pl', @ARGV) >> 8);
Logging: /Users/dimitrisstaratzis/Dev/server/mysql-test/mariadb-test-run.pl  
VS config: 
vardir: /Users/dimitrisstaratzis/Dev/server/builddir/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/Users/dimitrisstaratzis/Dev/server/builddir/mysql-test/var'...
Checking supported features...
mysql-test-run: *** ERROR: Could not find version of MariaDB

Best,
Dimitris

Comment by Sergei Golubchik [ 2023-09-08 ]

This is not very helpful. You have an out-of-source build, which is good and recommended practice.

But it means that your mysql-test-run-pl is a very small wrapper that invokes the actual mysql-test-run-pl.
Tracing the wrapper is rather pointless, it ends at exit(system('mariadb-test-run.pl')), as you can see.

You can try to change that wrapper to like (untested)

- exit(system($^X, '/Users/dimitrisstaratzis/Dev/server/mysql-test/mariadb-test-run.pl', @ARGV) >> 8);
+ exit(system($^X, '-d:Trace', '/Users/dimitrisstaratzis/Dev/server/mysql-test/mariadb-test-run.pl', @ARGV) >> 8);

hopefully, it'll cause the actual mtr script to be invoked with tracing.

Or you can build in-source, that'll work too.

Comment by Dimitris Staratzis [ 2023-09-12 ]

Hi Sergei,
I attach the trace from the actual mysql-test-run.pl. This is mariadb-11.2.1 running in macOS Ventura 13.0.1.

Comment by Sergei Golubchik [ 2023-09-14 ]

ok. run ./mysql-test/mysql-test-run.pl --verbose it'll print the command it uses to get the version, something like

cmd: /m/sql/mariadbd --no-defaults --datadir=. --basedir=/m --lc-messages-dir=/m/sql/share --skip-grant-tables --log-warnings=0 --log-slow-admin-statements=0 --log-queries-not-using-indexes=0 --log-slow-slave-statements=0 --verbose --help

see if the path makes sense (I guess, it should be /Users/dimitrisstaratzis/Dev/server/builddir/mysqld), try to run the command manually to see if it works.

Comment by Dimitris Staratzis [ 2023-09-25 ]

I have attached the verbose output

Comment by Sergei Golubchik [ 2023-09-26 ]

And what if you run this command yourself, manually? Like

/Users/dimitrisstaratzis/Documents/server/builddir/sql/mariadbd --no-defaults --datadir=. --basedir=/Users/dimitrisstaratzis/Documents/server --lc-messages-dir=/Users/dimitrisstaratzis/Documents/server/builddir/sql/share --skip-grant-tables --log-warnings=0 --log-slow-admin-statements=0 --log-queries-not-using-indexes=0 --log-slow-slave-statements=0 --verbose --help

does it print any warnings or errors? or anything at all?

From the /Users/dimitrisstaratzis/Documents/server/builddir/mysql-test directory, like mtr is doing it

Comment by Dimitris Staratzis [ 2023-10-13 ]

it prints:

zsh: segmentation fault /Users/dimitrisstaratzis/Documents/server/builddir/sql/mariadbd --no-defaults

Comment by Sergei Golubchik [ 2023-10-13 ]

Ah, good. We're getting somewhere. It could be MDEV-31871. If you're building from the source anyway, you can pull the latest 10.6 and give it a try. Or you can apply the patch from the MDEV-31871 commit (https://github.com/MariaDB/server/commit/ddffae0a8872b211e0a94d10565ce517026c7581). Or you can wait for 10.6.16 to be released, this is expected to happen in 2-3 weeks.

Generated at Thu Feb 08 10:27:55 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.