Bug #7037 Test "mysql_protocols" fails on Solaris 8 + 9 /x86
Submitted: 6 Dec 2004 13:27 Modified: 14 Oct 2005 21:22
Reporter: Lenz Grimmer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.8-pre - 5.0.4 OS:Solaris (Solaris 8 + 9 / x86)
Assigned to: Magnus BlÄudd CPU Architecture:Any

[6 Dec 2004 13:27] Lenz Grimmer
Description:
When running the test suite on Solaris9/x86, the mysql_protocols test fails with the following diff - this is from a debug build:

[SNIP]
-------------------------------------------------------
*** r/mysql_protocols.result    Mon Dec  6 12:44:39 2004
--- r/mysql_protocols.reject    Mon Dec  6 13:35:38 2004
***************
*** 5,9 ****
--- 5,21 ----
  SOCKET
   ok
  ERROR 2047 (HY000): Wrong or unknown protocol
+
+ User time 0.04, System time 0.00
+ Maximum resident set size 0, Integral resident set size 0
+ Non-physical pagefaults 0, Physical pagefaults 0, Swaps 0
+ Blocks in 0 out 0, Messages in 0 out 0, Signals 0
+ Voluntary context switches 0, Involuntary context switches 13
  ERROR 2047 (HY000): Wrong or unknown protocol
+
+ User time 0.02, System time 0.01
+ Maximum resident set size 0, Integral resident set size 0
+ Non-physical pagefaults 0, Physical pagefaults 0, Swaps 0
+ Blocks in 0 out 0, Messages in 0 out 0, Signals 0
+ Voluntary context switches 0, Involuntary context switches 12
  Unknown option to protocol: NullS
-------------------------------------------------------
[SNIP]

How to repeat:
Run the test suite, notice the diff.
[6 Dec 2004 15:00] Guilhem Bichot
So the 'mysql' command-line client prints this debug info even if nobody asked it too.
Adding a printf("%d\n",(int)stderr); to mysys/my_init.c:
void my_end(int infoflag)
{
  FILE *info_file;
  if (!(info_file=DBUG_FILE))
    info_file=stderr;
  printf("%d\n",(int)stderr);
  DBUG_PRINT("info",("Shutting down"));
and rebuilding libmysql/ and client/ makes the debug info go away.
So, apparently a bad compiler bug (a printf() like above should probably not cause the subsequent test (later in my_end()) to change result:
  if (infoflag & MY_GIVE_INFO || info_file != stderr)
I'm attaching a my_init.tar which contains (my_init.o) the generated assembler without the printf() and (my_init.o.new) with the added printf().
[7 Dec 2004 1:35] Kent Boortz
I suggest trying with "-fast -fsimple=1 -xinline=no%qf_disc"

See http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=110

We configure this target a bit funny, with CC=gcc CXX=gcc ./configure .....
but no gcc is found for reasons unknown, gcc *is* in the PATH used.
So the question is, did we intend to use Sun C?
[7 Dec 2004 12:09] Lenz Grimmer
No, we actually use the Sun Studio compiler here. No gcc is involved.
[3 Feb 2005 9:19] Lenz Grimmer
Seems a compiler upgrade resolved this phenomenon - it's not reproducable with the current 4.1.10 build anymore. Please disregard.
[3 Feb 2005 11:48] Konstantin Osipov
I'm closing the bug, please reopen it in case the error pops up again.
[24 Feb 2005 17:59] Joerg Bruehe
Bug re-occurred, now in 5.0.3.
Re-using this entry, same symptom etc.
Debug tree saved as tar.gz on the machine using the old name.
[15 Apr 2005 18:31] Joerg Bruehe
Same bug now in 5.0.4 on 'intelxeon3' (Solaris 8 / x86), this is the first build there.
[23 Sep 2005 7:47] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/30248
[23 Sep 2005 12:08] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/30264
[14 Oct 2005 21:22] Konstantin Osipov
The patch above has been reviewed and pushed into the main tree.