Bug #56257 ndbd.exe refuses to start without absolute paths, "spawn_process" error
Submitted: 25 Aug 2010 14:52 Modified: 1 Sep 2010 6:51
Reporter: Todd Farmer (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:7.1.5 OS:Windows (XP)
Assigned to: Magnus Blåudd CPU Architecture:Any

[25 Aug 2010 14:52] Todd Farmer
Description:
Unable to start ndbd process on WinXP with simple configuration, get the following error recorded in out.log:

2010-08-25 07:39:44 [ndbd] ERROR    -- spawn_process: Failed to spawn process, errno: 2

Simple config.ini:

[ndb_mgmd]
hostname=localhost
id=1

[ndbd default]
NoOfReplicas=2
datadir=d:\mysql-cluster-gpl-7.1.5-win32\cluster-data

[ndbd]
hostname=localhost
id=2

[ndbd]
hostname=localhost
id=3

[mysqld]
hostname=localhost
[mysqld]
hostname=localhost
[mysqld]
hostname=localhost
[mysqld]
hostname=localhost

How to repeat:
Try to start ndbd.exe on WinXP:

start /B bin\ndbd.exe -c localhost:1186

D:\mysql-cluster-gpl-7.1.5-win32>2010-08-25 07:39:44 [ndbd] INFO     -- Angel co
nnected to 'localhost:1186'
2010-08-25 07:39:44 [ndbd] INFO     -- Angel allocated nodeid: 2

... but terminates immediately.

Suggested fix:
Don't crash.
[25 Aug 2010 15:01] Todd Farmer
Workaround is to use full path to ndbd.exe binary to start:

D:\mysql-cluster-gpl-7.1.5-win32>start /B d:\mysql-cluster-gpl-7.1.5-win32\bin\ndbd.exe -c localhost:1186

This is inconsistent behavior (with other MySQL binaries for Windows, with ndbd binary for linux, etc.) and should be changed and/or documented.
[31 Aug 2010 11:28] Magnus Blåudd
The safest way to fix this is probably to use 'GetModuleFileName' to get the full path to ndbd.exe(so that angel can spawn it properly).
[31 Aug 2010 11:38] 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/117212
[31 Aug 2010 11:49] 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/117217
[31 Aug 2010 11:57] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.47-ndb-7.0.19 (revid:magnus.blaudd@sun.com-20100831114648-iyvfmbf8z1uc78hp) (version source revid:magnus.blaudd@sun.com-20100831114648-iyvfmbf8z1uc78hp) (merge vers: 5.1.47-ndb-7.0.19) (pib:21)
[31 Aug 2010 13:25] Magnus Blåudd
Pushed to 7.0.19 and 7.1.8
[1 Sep 2010 6:51] Jon Stephens
Documented bugfix in the NDB-7.0.19 and 7.1.8 changelogs as follows:

      On Windows, a data node refused to start unless the ndbd.exe 
      executable was invoked using an absolute path.

Closed.