Bug #55359 Admin tab will not close - errno 22
Submitted: 19 Jul 2010 10:51 Modified: 22 Sep 2010 15:27
Reporter: ken sands Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:5.2ce, 5.2.26 OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: administrator, close, tab

[19 Jul 2010 10:51] ken sands
Description:
Administrator tabs will not close, clicking the X of the tab or ctrl + w brings up an error window containing:
 Unhandled exception: [errno 22] Invalid argument 

The tab does not close. 

It does not cause a major issue although if by accident I keep opening admin tabs eventually I have to close workbench and open again to get rid of them, The Admin tabs work as expected and I use them to administer 2 servers on localhost a 5.1 and a 5.4, so it so it would not seem to be caused by the mysql server in use.

The only thing that does not seem to be working on the admin tabs is the graphs at the top which just say "no data", I'm not sure if this is related.

The output window contains the following:

Traceback (most recent call last):

  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\wb_admin_utils.py", line 91, in <lambda>

    return lambda ref=weakref.ref(object): call(ref, cbname)

  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\wb_admin_utils.py", line 89, in call

    return callback()

  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\wb_admin_grt.py", line 106, in handle_on_close

    self.configuration.shutdown()

  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\wb_admin_configuration.py", line 218, in shutdown

    self.ctrl_be.stop()

  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\wb_admin_control_be.py", line 750, in stop

    self.events.event('shutdown')

  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\wb_admin_control_be.py", line 523, in event

    getattr(obj, name)()

  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\wba_monitor_be.py", line 391, in shutdown_event

    self.ch.stdin.write("exit\r\n")

IOError: [Errno 22] Invalid argument

How to repeat:
Open an Administrator tab (double click on a server in the right hand pane from the home tab)

Click the X on the newly opened Administrator tab.

Suggested fix:
Seems from the traceback to be a bug in the python code, unfortunately python is one of the languages I have yet to pick up so although I'm sure I could work it out I don't have the time right now to get my head around python.
[20 Jul 2010 13:02] Johannes Taxacher
Hi Ken,

did you alter the default code in your management profiles for the servers? what code do you have in the profiles you are using on the tab "System Profile", subtab: "Server Stats"?
although this code only fetches the data for the two leftmost graphs (CPU and mem). do you see no data in any of the graphs, or only in the "Server Health" graphs?
thanks in advance
[20 Jul 2010 14:33] ken sands
No I just followed the standard wizard for adding an instance (well 2 actually)

that bit (i'd never even seen it was there) contains:

get_cpu_info = wmic cpu get LoadPercentage |  wba_line(1) | wba_arithm(/, 100.0)

get_mem_info = wmic os get FreePhysicalMemory |  wba_line(1)

get_mem_total = wmic os get TotalVisibleMemorySize |  wba_line(1)

Which I guess is the default, and none of the graphs are showing anything, all of them are blank or contain "no data" in tiny text.
[21 Jul 2010 7:41] Susanne Ebrecht
Please provide error log from server and last entries from server general log.
[21 Jul 2010 8:59] ken sands
Nothing on the general log just...

General Log:
SELECT count(*) AS count FROM mysql.general_log
SELECT * FROM mysql.general_log ORDER BY event_time DESC LIMIT 368, 50

And there is no entries to the error log, last entries on it is:
100721  9:57:47 [Note] C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld: ready for connections.
Version: '5.1.36-community-log'  socket: ''  port: 3306  MySQL Community Server (GPL)
[22 Jul 2010 6:56] Susanne Ebrecht
Please, try to comment out innodb_flush_method=O_DIRECT setting in my.cnf (and/or try to set innodb_flush_method=O_DSYNC) and check if it will help.
[22 Jul 2010 8:30] ken sands
innodb_flush_method is not in my my.ini file. I'm not sure you're looking at the right issue here, the problem is the administrator workbench tab will not close, it doesn't appear to have anything to do with the mysql server associated with it, I have 2 separete local mysql server installs, both are pretty much default installations, a 5.1 and a 5.4 both can be stopped and started and are configurable from the admin tabs, just the admin tab itself will not close. Maybe that has got something to do with the mysql install but I can't imagine why, closing the tab should not depend on anything but releasing the objects on that tab.
[8 Aug 2010 21:16] Roel Van de Paar
I cannot reproduce the issue easily, but I notice something odd here. Replace the:

---
get_cpu_info = wmic cpu get LoadPercentage |  wba_line(1) | wba_arithm(/, 100.0)
get_mem_info = wmic os get FreePhysicalMemory |  wba_line(1)
get_mem_total = wmic os get TotalVisibleMemorySize |  wba_line(1)
---

With:

---
aaa
---

Then close/open workbench and open the admin tab again. On my system, the stats are still showing! How could this be if the "server stats" properties were changed?
[8 Aug 2010 21:17] Roel Van de Paar
(Using 5.2.26.6429)
[18 Aug 2010 0:12] Roel Van de Paar
Verifying this bug bases on the oddity seen in [8 Aug 23:16] comment, though original issue not reproduced yet. Please have a look at what is happening in the situation described in that comment.
[18 Aug 2010 0:14] Roel Van de Paar
Verified the same in 5.2.26 using

get_cpu_info = aa
get_mem_info = bb
get_mem_total = cc
[18 Aug 2010 14:58] Brian Withnell
I'm on win7 x64 and I've got the same error ... don't know much about why, but I noticed that the server stats come up with "no data" in all the windows. Both seem to have occurred at the same time (which seems to have happened without any changes that I did with the system ... one of the patch day fixes?) I know it all worked last Friday.
[10 Sep 2010 5:54] Alfredo Kojima
Original bug has been fixed.
[22 Sep 2010 15:27] ken sands
Tested 5.2.28 and the problem is fixed.