亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

PostgreSQL 跟蹤checkpointer出現死鎖

發布時間:2020-08-15 04:09:40 來源:ITPUB博客 閱讀:568 作者:husthxd 欄目:關系型數據庫

gdb跟蹤checkpointer進程,出現死鎖,Mark一下.

跟蹤checkpointer進程,查看共享內存中的信(heckpointerShmem->requests)

(gdb) p CheckpointerShmem->requests[150] ... $16 = {rnode = {spcNode = 1663, dbNode = 16402, relNode = 26185}, forknum = MAIN_FORKNUM, segno = 0} (gdb) p CheckpointerShmem->requests[200] Cannot access memory at address 0xf9fb18 ... 

然后,請求checkpoint的進程報錯

testdb=# update t_wal_ckpt set c2 = 'C2#'||substr(c2,4,40); UPDATE 8192 testdb=# checkpoint; 2019-01-07 12:30:32.114 CST [1418] PANIC:  stuck spinlock detected at RequestCheckpoint, checkpointer.c:1050 2019-01-07 12:30:32.114 CST [1418] STATEMENT:  checkpoint; 2019-01-07 12:30:37.081 CST [1390] PANIC:  stuck spinlock detected at FirstCallSinceLastCheckpoint, checkpointer.c:1376 2019-01-07 12:30:38.610 CST [1370] LOG:  background writer process (PID 1390) was terminated by signal 6: Aborted 2019-01-07 12:30:38.610 CST [1370] LOG:  terminating any other active server processes 2019-01-07 12:30:38.611 CST [1392] WARNING:  terminating connection because of crash of another server process 2019-01-07 12:30:38.611 CST [1392] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. 2019-01-07 12:30:38.611 CST [1392] HINT:  In a moment you should be able to reconnect to the database and repeat your command. 2019-01-07 12:30:38.613 CST [1558] WARNING:  terminating connection because of crash of another server process 2019-01-07 12:30:38.613 CST [1558] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. 2019-01-07 12:30:38.613 CST [1558] HINT:  In a moment you should be able to reconnect to the database and repeat your command. PANIC:  stuck spinlock detected at RequestCheckpoint, checkpointer.c:1050 server closed the connection unexpectedly     This probably means the server terminated abnormally     before or while processing the request. The connection to the server was lost. Attempting reset: 2019-01-07 12:30:54.041 CST [1560] FATAL:  the database system is in recovery mode Failed. !>  

嘗試重新連接,發現DB已coredump.

[xdb@localhost ~]$  [xdb@localhost ~]$ psql -d testdb 2019-01-07 14:10:16.114 CST [1629] FATAL:  the database system is in recovery mode psql: FATAL:  the database system is in recovery mode 

執行恢復

[xdb@localhost ~]$ pg_ctl start pg_ctl: another server might be running; trying to start server anyway waiting for server to start....2019-01-07 14:11:50.821 CST [1632] FATAL:  lock file "postmaster.pid" already exists 2019-01-07 14:11:50.821 CST [1632] HINT:  Is another postmaster (PID 1370) running in data directory "/data/xdb/pg111db"?  stopped waiting pg_ctl: could not start server Examine the log output. [xdb@localhost ~]$ find /data/xdb -name postmaster.pid /data/xdb/pg111db/postmaster.pid [xdb@localhost ~]$ rm -rf /data/xdb/pg111db/postmaster.pid [xdb@localhost ~]$ pg_ctl start waiting for server to start....2019-01-07 14:12:44.578 CST [1639] LOG:  could not bind IPv6 address "::1": Address already in use [xdb@localhost ~]$ ps -ef|grep postgres xdb       1370     1  0 12:01 pts/0    00:00:02 /appdb/atlasdb/pg11.1/bin/postgres xdb       1389  1370  0 12:01 ?        00:00:00 [postgres] <defunct> xdb       1641  1332  0 14:12 pts/0    00:00:00 grep --color=auto postgres [xdb@localhost ~]$ kill -9 1370 [xdb@localhost ~]$ pg_ctl start waiting for server to start....2019-01-07 14:13:33.125 CST [1648] LOG:  listening on IPv6 address "::1", port 5432 2019-01-07 14:13:33.125 CST [1648] LOG:  listening on IPv4 address "127.0.0.1", port 5432 2019-01-07 14:13:33.142 CST [1648] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432" .2019-01-07 14:13:34.361 CST [1649] LOG:  database system was interrupted; last known up at 2019-01-07 12:26:22 CST 2019-01-07 14:13:34.818 CST [1649] LOG:  database system was not properly shut down; automatic recovery in progress 2019-01-07 14:13:34.863 CST [1649] LOG:  redo starts at 1/48F9ED08 .2019-01-07 14:13:35.467 CST [1649] LOG:  invalid record length at 1/4914FF58: wanted 24, got 0 2019-01-07 14:13:35.467 CST [1649] LOG:  redo done at 1/4914FF30 2019-01-07 14:13:35.467 CST [1649] LOG:  last completed transaction was at log time 2019-01-07 12:28:37.521542+08 2019-01-07 14:13:35.977 CST [1648] LOG:  database system is ready to accept connections  done server started 

經分析,是因為共享內存結構中的CheckpointerShmem->ckpt_lck導致的.
在跟蹤checkpointer進程時,執行

SpinLockRelease(&CheckpointerShmem->ckpt_lck); 

釋放lock后,不再出現上述問題.

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

重庆市| 横峰县| 康保县| 沈阳市| 岱山县| 宜都市| 高淳县| 北辰区| 武胜县| 天镇县| 金沙县| 罗山县| 名山县| 泗洪县| 龙南县| 双鸭山市| 越西县| 新巴尔虎右旗| 广汉市| 康马县| 富宁县| 克什克腾旗| 阿合奇县| 淅川县| 新巴尔虎左旗| 潞城市| 文登市| 绍兴县| 长泰县| 桑日县| 广水市| 尼木县| 武强县| 双峰县| 玛多县| 桦甸市| 江城| 泾阳县| 龙里县| 凤翔县| 南郑县|