gpstop/gppersistentrebuild gives message: Unable to clean shared memory ('\ n')
search cancel

gpstop/gppersistentrebuild gives message: Unable to clean shared memory ('\ n')

book

Article ID: 295945

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

Symptoms:
gpstop completes successfully but gives the following warning message:
gpstop:mdw:gpadmin-[WARNING]:-Unable to clean shared memory ('\n')
gppersistentrebuild will give the same message, but it results in an error causing PT rebuild to fail:
20190530:15:38:08:031144 gppersistentrebuild:gpdb-sandbox:gpadmin-[ERROR]:-'\n'
Traceback (most recent call last):
  File "/usr/local/greenplum-db/lib/python/gppylib/commands/base.py", line 235, in run
    self.cmd.run()
  File "/usr/local/greenplum-db/lib/python/gppylib/operations/__init__.py", line 53, in run
    self.ret = self.execute()
  File "/usr/local/greenplum-db/lib/python/gppylib/operations/utils.py", line 50, in execute
    ret = self.operation.ret = pickle.loads(cmd.get_results().stdout)
  File "/usr/local/greenplum-db/ext/python/lib/python2.6/pickle.py", line 1374, in loads
    return Unpickler(file).load()
  File "/usr/local/greenplum-db/ext/python/lib/python2.6/pickle.py", line 858, in load
    dispatch[key](self)
KeyError: '\n'
20190530:15:38:52:031144 gppersistentrebuild:gpdb-sandbox:gpadmin-[CRITICAL]:-gppersistentrebuild failed. (Reason='Persistent table rebuild was not completed succesfully and was restored back') exiting...

Environment


Cause

If you have modified .bashrc to create a custom banner starting with an enter ('\n'), this will cause gpstop and gppersistentrebuild to not process correctly.

For example:
#gpdb-begin-setup-gpadmin-user
source /var/vcap/packages/server/greenplum-db/greenplum_path.sh
source /var/vcap/packages/server/greenplum-cc-web/gpcc_path.sh
export PATH=/var/vcap/store/gpadmin/bin:/var/vcap/packages/scripts:$PATH
#gpdb-end-setup-gpadmin-user
#gpdb-begin-initialize-database
export MASTER_DATA_DIRECTORY=/data1/master/gpseg-1
export PGPORT=5432
#gpdb-end-initialize-database
echo "
This is a message"

Resolution

To workaround this issue, remove the enter character from echo in .bashrc.