View Issue Details

IDProjectCategoryView StatusLast Update
0000165MySQL v5 for OS/2 & eComStationpublic2009-09-12 18:26
ReporterudoAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000165: mysqladmin does not terminate after shutting down server
DescriptionAfter starting (command line 1) MySQL with "mysqld --console" in the data directory there are created (only the first time) 4 files:

 - ibdata1
 - ib_logfile0
 - ib_logfile1
 - ecs12-dev.pid

Then the server seems to run and the following message appears:

[C:\PROGRAMS\MYSQL5\BIN]mysqld --console
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
070303 15:04:38 InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
070303 15:04:39 InnoDB: Log file .\ib_logfile0 did not exist: new to be created

InnoDB: Setting log file .\ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
070303 15:04:39 InnoDB: Log file .\ib_logfile1 did not exist: new to be created

InnoDB: Setting log file .\ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
070303 15:04:41 InnoDB: Started; log sequence number 0 0
UNIX Socket is \socket\MySQL
070303 15:04:42 [Note] mysqld: ready for connections.
Version: '5.0.33' socket: '\socket\MySQL' port: 3306 Source distribution
-------------------------------------------------------------------------------------------------------------------------------------

Now I have complete and correct access to the DB..
-------------------------------------------------------------------------------------------------------------------------------------

Trying to shutdown the server (mysqladmin.exe -u root shutdown) (command line 2) the following things happens:

 - the server-process (command line 1) seems to be stopped
 - then after waiting for a long time the message is shown:

[C:\PROGRAMS\MYSQL5\BIN]mysqladmin.exe -u root shutdown
Warning; Aborted waiting on pid file: 'C:/PROGRAMS/mysql5\data\ECS12-DEV.pid' a
fter 3600 seconds
-------------------------------------------------------------------------------------------------------------------------------------

Trying to restart the server again, the following message is shown:

[C:\PROGRAMS\MYSQL5\BIN]mysqld --console
070303 14:54:27 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Error: tried to read 1048576 bytes at offset 0 1048576.
InnoDB: Was only able to read -1.
070303 14:54:27 InnoDB: Operating system error number 22 in a file operation.
InnoDB: Error number 22 means 'Invalid argument'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.0/en/operating-system-error-codes.html

InnoDB: File operation call: 'read'.
InnoDB: Cannot continue operation.


--> to restart the server again, I have to kill the 4 generated files...
TagsNo tags attached.

Relationships

duplicate of 0000097 closed mysqladmin does not terminate after shutting down server 

Activities

swolf

2007-08-21 18:36

reporter   ~0000718

Exactly the same behaviour can be observed on my system with MySQL Version 5.0.45.
Additionaly, the server can be restarted without the InnoDB storage engine (option --skip-innodb)

ssha

2008-11-23 03:26

reporter   ~0001031

Hi,

Please check that your my.cnf contains the lines:

[mysqld]
basedir=c:\mysql5
port = 3306
socket = \\socket\MySQL
bind-address=127.0.0.1

(add other bind-addresses if needed, and note the double-backslash for the socket name).

Then, when you wish to shut down the server use:

mysqladmin.exe --host 127.0.0.1 -u root shutdown

This will allow the shutdown to work correctly. There is a known problem with mysqldadmin and named-pipe communication on some systems, hence forcing TCP communication above.

Let us know how it goes!

Regards,
Stephen

Steven Levine

2009-09-12 18:26

manager   ~0001408

This has again reached the top of my list.

Stephen, is issue the mysqladmin termination, but the mysqld termination. The later has haver been an issue here.

The reason mysqladmin hangs, is because the daemon fails to delete the .pid file.

The code hangs in wait_pidfile() in client\mysqladmin.cc. The wait loop will eventually timeout, but the default timeout is 60 minutes.

The clean_up() function in sql\mysqld.cc is supposed to delete the .pid file, but this appears to be failing for a non-obvious reason.

Issue History

Date Modified Username Field Change
2007-03-04 02:55 udo New Issue
2007-03-04 05:16 psmedley Relationship added duplicate of 0000097
2007-08-21 18:36 swolf Note Added: 0000718
2008-11-23 03:26 ssha Note Added: 0001031
2009-09-12 18:26 Steven Levine Note Added: 0001408