yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.99k stars 1.07k forks source link

[YSQL] Can not create postgis extension #14262

Open WhiteWind opened 2 years ago

WhiteWind commented 2 years ago

Jira Link: DB-3715

Description

yugabyte version 2.15.2.0 PG_VERSION 11.17-1.pgdg22.04+1 POSTGIS_VERSION 3.3.1+dfsg-1.pgdg22.04+1

$ bin/ysqlsh  -c "CREATE EXTENSION postgis;"
WARNING:  'analyze' is a beta feature!
HINT:  Set 'ysql_beta_features' yb-tserver gflag to true to suppress the warning for all beta features.
WARNING:  AbortSubTransaction while in DEFAULT state
WARNING:  AbortSubTransaction while in ABORT state
WARNING:  AbortSubTransaction while in ABORT state
WARNING:  AbortSubTransaction while in ABORT state
ERROR:  Illegal state: Set active sub transaction 2, when not transaction is running
ERROR:  Illegal state: Rollback sub transaction 2, when not transaction is running
ERROR:  Illegal state: Rollback sub transaction 2, when not transaction is running
ERROR:  Illegal state: Rollback sub transaction 2, when not transaction is running
ERROR:  Illegal state: Rollback sub transaction 2, when not transaction is running
PANIC:  ERRORDATA_STACK_SIZE exceeded
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
connection to server was lost
ddorian commented 2 years ago

What OS are you using? Can you also upload some logs https://docs.yugabyte.com/preview/troubleshoot/nodes/check-logs/ ? Do you get a core dump, and if yes, upload it?

WhiteWind commented 2 years ago

OS is Ubuntu 22.04 Dockerfile: https://gist.github.com/WhiteWind/2b703af4e7325fe946f48ac162bb3fad

Started with:

command: [ "/docker-entrypoint.sh", "/home/${YB_USER}/bin/yb-master",
      "--callhome_enabled=false",
      "--fs_data_dirs=${YB_MOUNT_PREFIX}/master",
      "--master_addresses=yb-master-n1:7100,yb-master-n2:7100,yb-master-n3:7100",
      "--rpc_bind_addresses=0.0.0.0:7100",
      "--logtostderr",
      "--minloglevel=1",
      "--placement_cloud=docker",
      "--stop_on_parent_termination",
      "--undefok=stop_on_parent_termination",
      "--replication_factor=3",
      "--memory_limit_hard_bytes=${YB_MEMORY_LIMIT_HARD_BYTES_MASTER}",
      "--default_memory_limit_to_ram_ratio=${YB_MEMORY_DEFAULT_LIMIT_TO_RAM_RATIO_MASTER}",
      "--memory_limit_soft_percentage=${YB_MEMORY_LIMIT_SOFT_PERCENTAGE_MASTER}",
      "--memory_limit_warn_threshold_percentage=${YB_MEMORY_LIMIT_WARN_THRESHOLD_PERCENTAGE_MASTER}",
      "--mem_tracker_logging=${YB_MEM_TRACKER_LOGGING}",
      "--mem_tracker_log_stack_trace=${YB_MEM_TRACKER_LOG_STACK_TRACE}",
      "--mem_tracker_update_consumption_interval_us=${YB_MEM_TRACKER_UPDATE_CONSUMPTION_INTERVAL_US}"]

Logs:

yb-tserver-shared-1  | 2022-10-20 15:19:21.506 UTC [42] LOG:  unable to find pgstat entry for abnormally terminated PID 425
yb-tserver-shared-1  | I1020 15:19:22.636772   435 thread_pool.cc:170] Starting thread pool { name: pggate_ybclient queue_limit: 10000 max_workers: 1024 }
yb-tserver-shared-1  | I1020 15:19:22.637432   435 pggate.cc:138] InitTServerSharedObject: 0, 0, 3
yb-tserver-shared-1  | I1020 15:19:22.637615   435 pg_client.cc:125] Using TServer host_port: 172.26.0.7:9100
yb-tserver-shared-1  | I1020 15:19:22.638908   435 pg_client.cc:132] S 20: Session id acquired
yb-tserver-shared-1  | I1020 15:19:31.633854   451 thread_pool.cc:170] Starting thread pool { name: pggate_ybclient queue_limit: 10000 max_workers: 1024 }
yb-tserver-shared-1  | I1020 15:19:31.634865   451 pggate.cc:138] InitTServerSharedObject: 0, 0, 3
yb-tserver-shared-1  | I1020 15:19:31.635197   451 pg_client.cc:125] Using TServer host_port: 172.26.0.7:9100
yb-tserver-shared-1  | I1020 15:19:31.636772   451 pg_client.cc:132] S 21: Session id acquired
yb-tserver-shared-1  | I1020 15:19:31.644345   454 poller.cc:66] Poll stopped: Service unavailable (yb/rpc/scheduler.cc:80): Scheduler is shutting down (system error 108)
yb-tserver-shared-1  | 2022-10-20 15:19:31.659 UTC [42] LOG:  unable to find pgstat entry for abnormally terminated PID 451
yb-tserver-shared-1  | I1020 15:19:33.512503    30 thread_pool.cc:170] Starting thread pool { name: TransactionManager queue_limit: 500 max_workers: 50 }
yb-tserver-shared-1  | W1020 15:19:33.569054   463 log.cc:965] Time spent Fsync log took a long time: real 0.053s       user 0.000s     sys 0.000s
yb-tserver-shared-1  | 2022-10-20 15:19:34.683 UTC [435] WARNING:  'analyze' is a beta feature! at character 7528197
yb-tserver-shared-1  | 2022-10-20 15:19:34.683 UTC [435] HINT:  Set 'ysql_beta_features' yb-tserver gflag to true to suppress the warning for all beta features.
yb-tserver-shared-1  | 2022-10-20 15:19:34.879 UTC [435] ERROR:  Illegal state: Set active sub transaction 2, when not transaction is running
yb-tserver-shared-1  | 2022-10-20 15:19:34.879 UTC [435] STATEMENT:  CREATE EXTENSION postgis;
yb-tserver-shared-1  | 2022-10-20 15:19:34.879 UTC [435] WARNING:  AbortSubTransaction while in DEFAULT state
yb-tserver-shared-1  | 2022-10-20 15:19:34.879 UTC [435] ERROR:  Illegal state: Rollback sub transaction 2, when not transaction is running
yb-tserver-shared-1  | 2022-10-20 15:19:34.879 UTC [435] WARNING:  AbortSubTransaction while in ABORT state
yb-tserver-shared-1  | 2022-10-20 15:19:34.879 UTC [435] ERROR:  Illegal state: Rollback sub transaction 2, when not transaction is running
yb-tserver-shared-1  | 2022-10-20 15:19:34.879 UTC [435] WARNING:  AbortSubTransaction while in ABORT state
yb-tserver-shared-1  | 2022-10-20 15:19:34.880 UTC [435] ERROR:  Illegal state: Rollback sub transaction 2, when not transaction is running
yb-tserver-shared-1  | 2022-10-20 15:19:34.880 UTC [435] WARNING:  AbortSubTransaction while in ABORT state
yb-tserver-shared-1  | 2022-10-20 15:19:34.880 UTC [435] ERROR:  Illegal state: Rollback sub transaction 2, when not transaction is running
yb-tserver-shared-1  | 2022-10-20 15:19:34.880 UTC [435] PANIC:  ERRORDATA_STACK_SIZE exceeded
yb-tserver-shared-1  | I1020 15:19:35.842198   464 thread_pool.cc:170] Starting thread pool { name: pggate_ybclient queue_limit: 10000 max_workers: 1024 }
yb-tserver-shared-1  | I1020 15:19:35.843008   464 pggate.cc:138] InitTServerSharedObject: 0, 0, 3
yb-tserver-shared-1  | I1020 15:19:35.843430   464 pg_client.cc:125] Using TServer host_port: 172.26.0.7:9100
yb-tserver-shared-1  | I1020 15:19:35.844895   464 pg_client.cc:132] S 22: Session id acquired
yb-tserver-shared-1  | W1020 15:19:38.873667    11 log.cc:965] Time spent Fsync log took a long time: real 0.196s       user 0.000s     sys 0.000s
yb-tserver-shared-1  | I1020 15:19:41.787531   480 thread_pool.cc:170] Starting thread pool { name: pggate_ybclient queue_limit: 10000 max_workers: 1024 }
yb-tserver-shared-1  | I1020 15:19:41.788154   480 pggate.cc:138] InitTServerSharedObject: 0, 0, 3