[postgres-xl-bugs] pgxc_ctl segfault

Julian Szafraniec findingfreeusernamesishard at gmail.com
Wed Nov 22 02:41:44 PST 2017


Hi guys,

pgxc_ctl will segfault when trying to run `show config al`
(misspelled) in a directory owned by another user.

Example:

Go to directory where you cannot write:

    [postgres at db-01-01 root]$ pwd
    /root
    [postgres at db-01-01 root]$ touch q
    touch: cannot touch 'q': Permission denied
(as expected)

Run `show config all` properly:
    [postgres at db-01-01 root]$ pgxc_ctl show config all
    /usr/bin/bash
    Installing pgxc_ctl_bash script as /srv/db/postgres/pgxc_ctl/pgxc_ctl_bash.
    Installing pgxc_ctl_bash script as /srv/db/postgres/pgxc_ctl/pgxc_ctl_bash.
    Reading configuration using
/srv/db/postgres/pgxc_ctl/pgxc_ctl_bash --home
/srv/db/postgres/pgxc_ctl --configuration
/srv/db/postgres/pgxc_ctl/pgxc_ctl.conf
    Finished reading configuration.
      ******** PGXC_CTL START ***************

    Current directory: /srv/db/postgres/pgxc_ctl
    ========= Postgres-XL configuration Common Info ========================
    === Overall ===
    Postgres-XL owner: postgres
    Postgres-XL user: postgres
    Postgres-XL install directory: /srv/db/postgres/pgxc
    pgxc_ctl home: /srv/db/postgres/pgxc_ctl
    pgxc_ctl configuration file: /srv/db/postgres/pgxc_ctl/pgxc_ctl.conf
    pgxc_ctl tmpDir: /tmp
    pgxc_ctl localTempDir: /tmp
    pgxc_ctl log file: /srv/db/postgres/pgxc_ctl/pgxc_log/5391_pgxc_ctl.log
    pgxc_ctl configBackup: n
    pgxc_ctl configBackupHost: none
    pgxc_ctl configBackupFile: none
    ========= Postgres-XL configuration End Common Info ===================


But if it is misspelled:
    [postgres at db-01-01 root]$ pgxc_ctl show config al
    /usr/bin/bash
    Installing pgxc_ctl_bash script as /srv/db/postgres/pgxc_ctl/pgxc_ctl_bash.
    Installing pgxc_ctl_bash script as /srv/db/postgres/pgxc_ctl/pgxc_ctl_bash.
    Reading configuration using
/srv/db/postgres/pgxc_ctl/pgxc_ctl_bash --home
/srv/db/postgres/pgxc_ctl --configuration
/srv/db/postgres/pgxc_ctl/pgxc_ctl.conf
    Finished reading configuration.
      ******** PGXC_CTL START ***************

    Current directory: /srv/db/postgres/pgxc_ctl
    Segmentation fault (core dumped)

I do not think this bug is 'important' but it looks like pgxc_ctl
could use some improvements in error handling:)

Pgxc_ctl 9.5.8 (Postgres-XL 9.5r1.6)
(latest from git stable branch)

Regards
Julian


More information about the postgres-xl-bugs mailing list