Control stack guard page temporarily disabled - pgloader issue when migrating from Postgres to YSQL
lakshman-battini opened this issue · 4 comments
Jira Link: DB-490
Hello, am getting 'Control stack guard page temporarily disabled' issue when migrating Postgres database to YSQL using pgloader. Below is the debug error log.
The schema in source database is very trivial, only one table in public schema with 5 rows. Tried migrating from postgres to postgres instance, it is working fine. The issue is when migrating from postgres to Yugabyte YSQL API.
2020-02-24T03:18:45.219000-05:00 NOTICE Prepare PostgreSQL database.
2020-02-24T03:18:45.613000-05:00 DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres@<yb_tserver>:5433/migration {100639EE33}>
2020-02-24T03:18:45.613000-05:00 DEBUG SET client_encoding TO 'utf8'
2020-02-24T03:18:45.760000-05:00 DEBUG SET application_name TO 'pgloader'
2020-02-24T03:18:46.179000-05:00 DEBUG BEGIN
KABOOM!
INFO: Control stack guard page unprotected
Control stack guard page temporarily disabled: proceed with caution
2020-02-24T03:18:46.877000-05:00 INFO Stopping monitor
What I am doing here?
Control stack exhausted (no more space for function call frames).
This is probably due to heavily nested or infinitely recursive function
calls, or a tail call that SBCL cannot or has not optimized away.
PROCEED WITH CAUTION.
Pgloader load file:
load database
from pgsql://<username>:<password>@localhost:5432/test
into pgsql://<username>:<password>@<yb-tserver>:5433/migration
;
pgloader version:
pgloader version "3.6.1"
compiled with SBCL 1.4.0-1.el7
Tried with multiple pgloader versions, 3.6.1, 3.6.0 and 3.5.2. But still no luck.
YSQL version:
11.2-YB-2.0.6.0-b0
For some reason my pgloader
can't connect to my postgresql
so I replicated with mysql.
docker run --name my-mysql -e MYSQL_ROOT_PASSWORD=1 -d mysql:latest --default-authentication-plugin=mysql_native_password
(user=root, password=1)docker run --name my-phpmyadmin -d --link my-mysql:db -p 8081:80 phpmyadmin/phpmyadmin
- create an empty database
comm
on mysql (127.0.0.1:8081
for phpmyadmin) and an empty databasecomm
on ysql docker pull dimitri/pgloader
- get the ip of
my-mysql
container docker run --rm --net="host" --name pgloader dimitri/pgloader:latest pgloader --debug mysql://root:1@172.17.0.2/comm postgresql://yugabyte:yugabyte@127.0.0.1:5433/comm
- the error persists even after you
create schema comm;
- In postgresql 11 it works
pgloader_pg11.txt
$ docker run --rm --net="host" --name pgloader dimitri/pgloader:latest pgloader --debug mysql://root:1@172.17.0.2/comm postgresql://yugabyte:yugabyte@127.0.0.1:5433/dorian_comm
mkdir -p #P"/tmp/pgloader/"
pgloader version 3.6.2~devel
compiled with SBCL 1.4.16.debian
sb-impl::*default-external-format* :ANSI_X3.4-1968
tmpdir: #P"/tmp/pgloader/"
2020-02-27T14:14:58.007000Z NOTICE Starting pgloader, log system is ready.
2020-02-27T14:14:58.012000Z INFO Starting monitor
2020-02-27T14:14:58.013000Z LOG pgloader version "3.6.2~devel"
2020-02-27T14:14:58.013000Z INFO SOURCE: "mysql://root:1@172.17.0.2/comm"
2020-02-27T14:14:58.014000Z INFO SOURCE URI: #<PGLOADER.SOURCE.MYSQL:MYSQL-CONNECTION mysql://root@172.17.0.2:3306/comm {1005EA5523}>
2020-02-27T14:14:58.014000Z INFO TARGET: "postgresql://yugabyte:yugabyte@127.0.0.1:5433/dorian_comm"
2020-02-27T14:14:58.014000Z INFO TARGET URI: #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://yugabyte@127.0.0.1:5433/dorian_comm {1005FEF9B3}>
2020-02-27T14:14:58.014000Z DEBUG LOAD DATA FROM #<PGLOADER.SOURCE.MYSQL:MYSQL-CONNECTION mysql://root@172.17.0.2:3306/comm {1005EA5523}>
2020-02-27T14:14:58.038000Z DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://yugabyte@127.0.0.1:5433/dorian_comm {1005FEF9B3}>
2020-02-27T14:14:58.038000Z DEBUG SET client_encoding TO 'utf8'
2020-02-27T14:14:58.041000Z DEBUG SET application_name TO 'pgloader'
2020-02-27T14:14:58.070000Z LOG Migrating from #<MYSQL-CONNECTION mysql://root@172.17.0.2:3306/comm {1005EA5523}>
2020-02-27T14:14:58.070000Z LOG Migrating into #<PGSQL-CONNECTION pgsql://yugabyte@127.0.0.1:5433/dorian_comm {1005FEF9B3}>
2020-02-27T14:14:58.096000Z DEBUG CONNECTED TO #<MYSQL-CONNECTION mysql://root@172.17.0.2:3306/comm {1005EA5523}>
2020-02-27T14:14:58.100000Z SQL MySQL: sending query: -- params: db-name
-- table-type-name
-- only-tables
-- only-tables
-- including
-- filter-list-to-where-clause incuding
-- excluding
-- filter-list-to-where-clause excluding
select c.table_name, t.table_comment,
c.column_name, c.column_comment,
c.data_type, c.column_type, c.column_default,
c.is_nullable, c.extra
from information_schema.columns c
join information_schema.tables t using(table_schema, table_name)
where c.table_schema = 'comm' and t.table_type = 'BASE TABLE'
order by table_name, ordinal_position;
2020-02-27T14:14:58.103000Z SQL MySQL: sending query: -- params: db-name
-- table-type-name
-- only-tables
-- only-tables
-- including
-- filter-list-to-where-clause incuding
-- excluding
-- filter-list-to-where-clause excluding
SELECT s.table_name, s.constraint_name, s.ft, s.cols, s.fcols,
rc.update_rule, rc.delete_rule
FROM
(
SELECT tc.table_schema, tc.table_name,
tc.constraint_name, k.referenced_table_name ft,
group_concat( k.column_name
order by k.ordinal_position) as cols,
group_concat( k.referenced_column_name
order by k.position_in_unique_constraint) as fcols
FROM information_schema.table_constraints tc
LEFT JOIN information_schema.key_column_usage k
ON k.table_schema = tc.table_schema
AND k.table_name = tc.table_name
AND k.constraint_name = tc.constraint_name
WHERE tc.table_schema = 'comm'
AND k.referenced_table_schema = 'comm'
AND tc.constraint_type = 'FOREIGN KEY'
GROUP BY tc.table_schema, tc.table_name, tc.constraint_name, ft
) s
JOIN information_schema.referential_constraints rc
ON rc.constraint_schema = s.table_schema
AND rc.constraint_name = s.constraint_name
AND rc.table_name = s.table_name;
2020-02-27T14:14:58.108000Z SQL MySQL: sending query: -- params: db-name
-- table-type-name
-- only-tables
-- only-tables
-- including
-- filter-list-to-where-clause incuding
-- excluding
-- filter-list-to-where-clause excluding
SELECT table_name, index_name, index_type,
sum(non_unique),
cast(GROUP_CONCAT(column_name order by seq_in_index) as char)
FROM information_schema.statistics
WHERE table_schema = 'comm'
GROUP BY table_name, index_name, index_type;
2020-02-27T14:14:58.121000Z INFO Processing source catalogs
2020-02-27T14:14:58.127000Z NOTICE Prepare PostgreSQL database.
2020-02-27T14:14:58.144000Z DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://yugabyte@127.0.0.1:5433/dorian_comm {1005FEF9B3}>
2020-02-27T14:14:58.144000Z DEBUG SET client_encoding TO 'utf8'
2020-02-27T14:14:58.146000Z DEBUG SET application_name TO 'pgloader'
2020-02-27T14:14:58.152000Z DEBUG BEGIN
KABOOM!
INFO: Control stack guard page unprotected
Control stack guard page temporarily disabled: proceed with caution
2020-02-27T14:14:58.369000Z INFO Stopping monitor
What I am doing here?
Control stack exhausted (no more space for function call frames).
This is probably due to heavily nested or infinitely recursive function
calls, or a tail call that SBCL cannot or has not optimized away.
PROCEED WITH CAUTION.
For some reason I didn't get a core dump. Assigning since that's all I could see.
Hi guys, I haven't tried to track it down, but in my experience there are issues with the dimitri/pgloader:latest
image - try dimitri/pgloader:ccl.latest
instead. With that image, I was able to get further with pgloader (at least until I ran into the lack of support for SAVEPOINT - #1125).
ysql_loader is a fork of pgloader and works with yugabytedb: