Bug #52716 Large files support is disabled, large-pages option is broken
Submitted: 9 Apr 2010 9:59 Modified: 4 Aug 2010 23:13
Reporter: Elena Stepanova Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Options Severity:S2 (Serious)
Version:5.5.3-m3, 5.5.4-m3 OS:Any
Assigned to: Vladislav Vaintroub CPU Architecture:Any
Tags: regression

[9 Apr 2010 9:59] Elena Stepanova
Description:
large_files_support variable is OFF in 5.5.3 and 5.5.4. It was ON in 5.5.2 and before.
Also, large-pages option does not work as expected: if server is started with --large-pages enabled, it sets large_pages variable and large_files_support variable to ON (the latter looks like misinformation), but large_page_size stays 0.

I also got the following error in a regular stress test on Windows, it never happened before:

mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM
ORDER BY ': Error writing file 'var\tmp\mysqld.2\MY737C.tmp' (Errcode: 27) (3)

How to repeat:
# Start server with default configuration
# (or at least without --large-pages option)

SELECT @@large_files_support
# 0

Suggested fix:
Vladislav Vaintroub wrote:

patch below fixes typo in sys_vars.cc and makes large_files ON for me

=== modified file 'sql/sys_vars.cc'
--- sql/sys_vars.cc     2010-03-15 13:52:25 +0000
+++ sql/sys_vars.cc     2010-04-09 04:44:45 +0000
@@ -859,7 +859,7 @@

 static Sys_var_mybool Sys_large_pages(
        "large_pages", "Enable support for large pages",
-       READ_ONLY GLOBAL_VAR(opt_large_files),
+       READ_ONLY GLOBAL_VAR(opt_large_pages),
        IF_WIN(NO_CMD_LINE, CMD_LINE(OPT_ARG)), DEFAULT(FALSE));

 static Sys_var_charptr Sys_language(
[16 Apr 2010 13:46] 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/commits/105878

3160 Vladislav Vaintroub	2010-04-16
      Bug #52716 Large files support is disabled, large-pages option is broken.
      
      Correct typo: large pages option was tied to wrong variable opt_large_files,
      instead of opt_large_pages.
[16 Apr 2010 14:05] Vladislav Vaintroub
pushed to next-mr-bugfixing, 6.0-codebase-bugfixing
[27 Apr 2010 9:45] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100427094135-5s49ecp3ckson6e2) (version source revid:alik@sun.com-20100427093843-uekr85qkd7orx12t) (merge vers: 6.0.14-alpha) (pib:16)
[27 Apr 2010 9:50] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100427094036-38frbg3famdlvjup) (version source revid:alik@sun.com-20100427093825-92wc8b22d4yg34ju) (pib:16)
[12 May 2010 1:08] Paul DuBois
Noted in 6.0.14 changelog.

The large_pages system variable was tied to the --large-files
command-line option, not the --large-pages option.
[5 Jul 2010 9:17] 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/commits/112863

3089 Alexander Nozdrin	2010-07-05
      Backporting patch for Bug#52716 (Large files support is disabled,
      large-pages option is broken) from next-mr to trunk-bugfixing.
      
      Original revision:
      ------------------------------------------------------------
      revision-id: vvaintroub@mysql.com-20100416134524-y4v27j90p5xvblmy
      parent: luis.soares@sun.com-20100416000700-n267ynu77visx31t
      committer: Vladislav Vaintroub <vvaintroub@mysql.com>
      branch nick: mysql-next-mr-bugfixing
      timestamp: Fri 2010-04-16 15:45:24 +0200
      message:
        Bug #52716 Large files support is disabled, large-pages option is broken.
        
        Correct typo: large pages option was tied to wrong variable opt_large_files,
        instead of opt_large_pages.
      ------------------------------------------------------------
[5 Jul 2010 9:19] 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/commits/112864

3091 Alexander Nozdrin	2010-07-05
      Backporting patch for Bug#52716 (Large files support is disabled,
      large-pages option is broken) from next-mr to mysql-5.5.5-m3-release.
      
      Original revision:
      ------------------------------------------------------------
      revision-id: vvaintroub@mysql.com-20100416134524-y4v27j90p5xvblmy
      parent: luis.soares@sun.com-20100416000700-n267ynu77visx31t
      committer: Vladislav Vaintroub <vvaintroub@mysql.com>
      branch nick: mysql-next-mr-bugfixing
      timestamp: Fri 2010-04-16 15:45:24 +0200
      message:
        Bug #52716 Large files support is disabled, large-pages option is broken.
        
        Correct typo: large pages option was tied to wrong variable opt_large_files,
        instead of opt_large_pages.
      ------------------------------------------------------------
[19 Jul 2010 10:15] Bugs System
Pushed into 5.5.6-m3 (revid:build@mysql.com-20100719101001-0ykgx8ceoq7s458e) (version source revid:build@mysql.com-20100719101001-0ykgx8ceoq7s458e) (merge vers: 5.5.6-m3) (pib:16)
[20 Jul 2010 2:30] Paul DuBois
Noted in 5.5.6 changelog.
[23 Jul 2010 12:24] Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100723121820-jryu2fuw3pc53q9w) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:18)
[23 Jul 2010 12:31] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100723121929-90e9zemk3jkr2ocy) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (pib:18)
[4 Aug 2010 8:05] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:18)
[4 Aug 2010 8:21] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804081533-c1d3rbipo9e8rt1s) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:18)
[4 Aug 2010 23:13] Paul DuBois
Bug does not appear in any released 5.6.x version.
[7 Sep 2010 20:42] Andrig Miller
I ran across this bug when doing testing with the 5.5.5-m3 release, so I pulled down the latest source, and built it, and the generic package (gzipped tar) came out as 5.6.1-m4, and I checked the file sys_vars.cc to verify this fix was in  there.  I successfully installed this on my system, and booted it up, only to find that InnoDB was still not using large pages.

When I cat /proc/meminfo (Fedora 13 x86_64), the HugePagesRsvd shows 0.  I also did a quick test on 5.1.48,  which I have installed on another Fedora 13 x86_64 machine, and it behaves the same way.  I think this is broken not only in the development branch, but in the GA 5.1.48 as well.
[7 Sep 2010 20:49] Andrig Miller
I take the part about 5.1.48 having the problem.  It works.  I just had one thing missing from my /etc/group that prevented it from working.  I have verified that that is not the case on the other system.
[7 Sep 2010 21:33] Vladislav Vaintroub
Andrig, thanks for the comment. Could you please create another bug for it. This one was just about fixing the typo in sys_vars.cc rather than checking whether large pages functionality works. The bug title is of course somewhat misleading.
[8 Sep 2010 3:37] Andrig Miller
Will do.