Bug #19047 "ndb_mgm -e show" hangs if output is piped to "head"
Submitted: 12 Apr 2006 12:19 Modified: 2 Nov 2006 5:04
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:4.1.14, 5.0bk OS:Linux (linux)
Assigned to: david li CPU Architecture:Any

[12 Apr 2006 12:19] Hartmut Holzgraefe
Description:
"ndb_mgm -e show | head" hangs forever after showing the first 10 lines of output,
piping to less, tail or tee seems to work fine ...

OS version: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)

$ head --version
head (coreutils) 5.2.1

How to repeat:
ndb_mgm -e show | head
[12 Apr 2006 13:17] Geert Vanderkelen
I could reproduce this also using 5.0.19 on MacOSX:

This hangs:
#  ./bin/ndb_mgm  -e show | head

But not always.. If I ctrl-c and do the same over and over, it sometimes hangs.

Same effect on 5.1, last bk.
[12 Jun 2006 7:10] Tomas Ulin
workaround:

../storage/ndb/src/mgmclient/ndb_mgm -e show  2>&1 | head
[11 Aug 2006 10:24] 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/10305

ChangeSet@1.2244, 2006-08-11 18:44:45+08:00, dli@dev3-76.dev.cn.tlan +4 -0
  Bug#19047, not start event thread in ndb_mgm client execute (-e) mode.
[14 Aug 2006 6:26] 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/10332

ChangeSet@1.2245, 2006-08-14 14:46:33+08:00, dli@dev3-76.dev.cn.tlan +1 -0
  Bug#19047: changed m_event_thread to be judged by NULL, not by 0.
[14 Aug 2006 6:43] 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/10333

ChangeSet@1.2244, 2006-08-14 15:03:52+08:00, dli@dev3-76.dev.cn.tlan +3 -0
  Bug#19047, do not start event thread in ndb_mgm client executing (-e) mode.
[15 Aug 2006 12:06] 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/10465

ChangeSet@1.2249, 2006-08-15 20:26:47+08:00, dli@dev3-76.dev.cn.tlan +3 -0
  Bug#19047, not start the event thread when ndb_mgm is running in executing (-e) thread.
[16 Aug 2006 3:09] david li
Pushed to mysql-5.0-ndb-bj and mysql-5.1-ndb-bj trees.
[7 Sep 2006 14:09] 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/11545

ChangeSet@1.2046, 2006-09-07 16:05:53+02:00, jonas@perch.ndb.mysql.com +4 -0
  ndb - bug#19047
    Fix possible degraded output if using "ndb_mgm -e"
[10 Oct 2006 18:26] Jonas Oreland
pushed into 5.1.12
[1 Nov 2006 14:33] Jonas Oreland
pushed into 5.0.29
no fix in 4.1
[2 Nov 2006 5:04] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented fix for 5.0.29 & 5.1.12.
[4 Nov 2006 3:08] Jon Stephens
*Fix for 5.0 documented in 5.0.30 Release Notes.*