View Issue Details

IDProjectCategoryView StatusLast Update
0000165MySQL v5 for OS/2 & eComStationpublic2022-05-14 07:02
Reporterudo Assigned Topsmedley  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
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 09:06

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-22 16:56

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 08:56

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.

psmedley

2022-05-14 07:02

administrator   ~0004272

Please retest with a supported build of mysql

Issue History

Date Modified Username Field Change
2007-03-03 16:25 udo New Issue
2007-03-03 18:46 psmedley Relationship added duplicate of 0000097
2007-08-21 09:06 swolf Note Added: 0000718
2008-11-22 16:56 ssha Note Added: 0001031
2009-09-12 08:56 Steven Levine Note Added: 0001408
2022-05-14 07:02 psmedley Assigned To => psmedley
2022-05-14 07:02 psmedley Status new => resolved
2022-05-14 07:02 psmedley Resolution open => no change required
2022-05-14 07:02 psmedley Note Added: 0004272
2022-05-14 07:02 psmedley Status resolved => closed