Bug 995457 - Test case failure: /CoreOS/mysql/testsuite - main.mysql
Summary: Test case failure: /CoreOS/mysql/testsuite - main.mysql
Keywords:
Status: CLOSED EOL
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: mysql
Version: mysql55
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Michal Schorm
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 995463
TreeView+ depends on / blocked
 
Reported: 2013-08-09 12:22 UTC by Karel Volný
Modified: 2017-03-31 15:02 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 995463 (view as bug list)
Environment:
Last Closed: 2017-03-31 15:02:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Karel Volný 2013-08-09 12:22:40 UTC
Filed from caserun https://tcms.engineering.redhat.com/run/73490/#caserun_2973481

testsuite fails in main.mysql, see below

Version-Release number of selected component (if applicable):
RHEL6.5-20130717.n.0



Actual results: 
http://beaker-archive.app.eng.bos.redhat.com/beaker-logs/2013/08/4639/463951/976065/14339200/TESTOUT.log


main.mysql                               [ fail ]
        Test ended at 2013-08-01 14:37:35

CURRENT_TEST: main.mysql
ERROR 1050 (42S01) at line 1: Table 't2' already exists
ERROR: Can't initialize batch_readline - may be the input source is a directory or a block device.
--- /opt/rh/mysql55/root/usr/share/mysql-test/r/mysql.result	2013-06-19 18:26:28.000000000 +0300
+++ /opt/rh/mysql55/root/usr/share/mysql-test/r/mysql.reject	2013-08-01 21:37:35.058231849 +0300
@@ -392,11 +392,8 @@
 8: 8
 9: 9
 0: 0
-+---+
-| 1 |
-+---+
-| 1 |
-+---+
+*************************** 1. row ***************************
+1: 1
 Warning (Code 1286): Unknown storage engine 'nonexistent'
 Warning (Code 1266): Using storage engine MyISAM for table 't2'
 Warning (Code 1286): Unknown storage engine 'nonexistent2'

mysqltest: Result content mismatch

 - saving '/opt/rh/mysql55/root/var/lib/mysql/testbu5/log/main.mysql/' to '/opt/rh/mysql55/root/var/lib/mysql/testbu5/log/main.mysql/'

Retrying test main.mysql, attempt(2/3)...

main.mysql                               [ retry-fail ]
        Test ended at 2013-08-01 14:37:40

CURRENT_TEST: main.mysql
ERROR 1050 (42S01) at line 1: Table 't2' already exists
ERROR: Can't initialize batch_readline - may be the input source is a directory or a block device.
--- /opt/rh/mysql55/root/usr/share/mysql-test/r/mysql.result	2013-06-19 18:26:28.000000000 +0300
+++ /opt/rh/mysql55/root/usr/share/mysql-test/r/mysql.reject	2013-08-01 21:37:40.682268111 +0300
@@ -392,11 +392,8 @@
 8: 8
 9: 9
 0: 0
-+---+
-| 1 |
-+---+
-| 1 |
-+---+
+*************************** 1. row ***************************
+1: 1
 Warning (Code 1286): Unknown storage engine 'nonexistent'
 Warning (Code 1266): Using storage engine MyISAM for table 't2'
 Warning (Code 1286): Unknown storage engine 'nonexistent2'

mysqltest: Result content mismatch

 - saving '/opt/rh/mysql55/root/var/lib/mysql/testbu5/log/main.mysql/' to '/opt/rh/mysql55/root/var/lib/mysql/testbu5/log/main.mysql/'

Test main.mysql has failed 2 times, no more retries!

main.mysql_comments                      [ pass ]    316

Comment 2 Honza Horak 2013-08-12 08:25:13 UTC
The test actually doesn't fail on my system. However, I don't have enough time to examine why test suite fails in beaker environment, but since it works fine when running not as beaker test, I'd suspect the test to cause this.

$ scl enable mysql55 './mysql-test-run --do-test ^mysql$'
Logging: ./mysql-test-run  --do-test ^mysql$
130812  9:32:06 [Note] Plugin 'FEDERATED' is disabled.
MySQL Version 5.5.32
Checking supported features...
 - SSL connections supported
Using suites: main,sys_vars,binlog,federated,rpl,innodb,perfschema
Collecting tests...
Checking leftover processes...
Removing old var directory...
Creating var directory '/opt/rh/mysql55/root/usr/share/mysql-test/var'...
Installing system database...
Using server port 58168

==============================================================================

TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
main.mysql                               [ pass ]   8281
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 8.281 of 32 seconds executing testcases

Completed: All 1 tests were successful.

bash-4.1$ rpm -qa|grep mysql55-mysql
mysql55-mysql-libs-5.5.32-2.el6.x86_64
mysql55-mysql-server-5.5.32-2.el6.x86_64
mysql55-mysql-5.5.32-2.el6.x86_64
mysql55-mysql-test-5.5.32-2.el6.x86_64

Comment 3 Karel Volný 2013-08-20 11:37:53 UTC
I can confirm it passes on ITP system

...
main.mysql-bug45236                      [ pass ]    359
main.mysql                               [ pass ]   3292
main.mysql_comments                      [ pass ]    631
...

so, as usual, it seems something in Beaker rather than the test itself

I will try to isolate the problem

Comment 4 Karel Volný 2013-08-20 13:03:53 UTC
separate run:
bwt --channel 'rhel-x86_64-server-6-rhscl-1' --update --collection mysql55 --arch x86_64 --enable-beaker-repos --distro RHEL6.5-20130814.2 --task /CoreOS/mysql/testsuite
=> https://beaker.engineering.redhat.com/jobs/476171

Comment 5 Karel Volný 2013-08-20 15:11:02 UTC
damn, I forgot to specify the erratum where to take from the packages:

bwt --channel 'rhel-x86_64-server-6-rhscl-1' --update --collection mysql55 --arch x86_64 --enable-beaker-repos --errata 14788 --distro RHEL6.5-20130814.2 --task /CoreOS/mysql/testsuite
=> https://beaker.engineering.redhat.com/jobs/476277

Comment 6 Karel Volný 2013-08-22 12:10:53 UTC
cool, so we see it reproduces in a separate run, now if I would only not forgot to add --reserve to be able to investigate further :-/

bwt --channel 'rhel-x86_64-server-6-rhscl-1' --update --collection mysql55 --arch x86_64 --enable-beaker-repos --errata 14788 --distro RHEL6.5-20130820.2 --task /CoreOS/mysql/testsuite --reserve
=> https://beaker.engineering.redhat.com/jobs/477915

Comment 7 Karel Volný 2013-08-27 17:14:46 UTC
okay, so this fails in the beaker run and passes on the same machine/install if run from commandline

the subtest which fails is this code:

#
# Bug#26780: patch to add auto vertical output option to the cli.
#
# Make this wide enough that it will wrap almost everywhere.
--exec $MYSQL test --auto-vertical-output --table -e "SELECT 1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0;"
# Too short to wrap.
--exec $MYSQL test --auto-vertical-output --table -e "SELECT 1;"


it seems that vertical output is triggered even for the second select

but it shouldn't - reading the original patch that adds the option, it defines

unsigned short terminal_width= 80;

and then the only place where it gets changes is on window_resize event:

#if defined(HAVE_TERMIOS_H)
sig_handler window_resize(int sig)
{
  struct winsize window_size;

  if (ioctl(fileno(stdin), TIOCGWINSZ, &window_size) == 0)
    terminal_width= window_size.ws_col;
}
#endif

which should not be called

then the format of the output is controlled by this condition:

  else if (vertical || (auto_vertical_output && (terminal_width < get_result_width(result))))
 	  print_table_data_vertically(result);

as vertical defaults to 0 (this subtest does not change the setting and other results are not formatted vertically), the only way it could run print_table_data_vertically() is if "terminal_width < get_result_width(result)" would be true

I see nothing suspicious in the function:

static int get_result_width(MYSQL_RES *result)
{
  unsigned int len= 0;
  MYSQL_FIELD *field;
  MYSQL_FIELD_OFFSET offset;
  
#ifndef DBUG_OFF
  offset= mysql_field_tell(result);
  DBUG_ASSERT(offset == 0);
#else
  offset= 0;
#endif

  while ((field= mysql_fetch_field(result)) != NULL)
    len+= get_field_disp_length(field) + 3; /* plus bar, space, & final space */

  (void) mysql_field_seek(result, offset);      

  return len + 1; /* plus final bar. */
}


so we are back to the question whether terminal_width gets changed, I guess ...


but what puzzles me the most is the presence of the following error:

ERROR: Can't initialize batch_readline - may be the input source is a directory or a block device.

the error message was added to MySQL in the following patch:
http://lists.mysql.com/commits/130791

the code seems completely unrelated to the vertical output problem, yet the error appears only together with this problem (and not in the first test query for the auto-vertical-output option ...)


any hints what debug output I could add to the test so we can get closer where the problem lies?

Comment 8 Karel Volný 2013-08-29 09:56:24 UTC
thanks to completely unrelated problem which we faced on our server yesterday evening by coincidence, I have found that mysql abuses the SIGWINCH signal for a graceful server shutdown ... yes, that's server and we are dealing with client output here, but it may (or may not!) be a trace that window size signalling is broken in mysql as a whole ...?

Comment 9 Honza Horak 2013-10-24 10:53:57 UTC
Just FTR, I tried to get more into it, but without any success. It seemed that window signalling worked fine outside the test-suite. Will try once more if I have some spare time, but it doesn't seem like something important to fix.

Comment 10 Honza Horak 2013-11-21 12:04:18 UTC
Devel CondNAK, since we don't have any patch available. It works fine during build and outside of beaker, so we don't consider this as a big issue.

Comment 16 Joe Orton 2016-10-12 12:31:00 UTC
Red Hat does not currently plan to provide any further changes to this collection in a Red Hat Software Collections update release.

This software collection is nearing the retirement date (October 2016) after which customers are encouraged either to upgrade to a later release or continue on as self-supported without official Red Hat Support.

Please contact Red Hat Support if you have further questions, or refer to the support lifecycle page for more information. https://access.redhat.com/support/policy/updates/rhscl/

Comment 18 Joe Orton 2017-03-31 15:02:02 UTC
In accordance with the Red Hat Software Collections Product Life Cycle, the support period for this collection has ended.

New bug fix, enhancement, and security errata updates, as well as technical support services will no longer be made available for this collection.

Customers are encouraged to upgrade to a later release.

Please contact Red Hat Support if you have further questions, or refer to the support lifecycle page for more information. https://access.redhat.com/support/policy/updates/rhscl/


Note You need to log in before you can comment on or make changes to this bug.