Program terminated with signal 6, Aborted


  Program terminated with signal 6, Aborted,有可能啥原因呢?其中一種原因就是事實上的OOM(雖然/var/log/message中沒有標明操作系統kill了進行,應該是進程內部初始化已申請內存時報錯了,因為malloc的申請會被OS盡可能延后的分配,所以很有可能已經申請的內存早就OOM了,但是程序還可以運行一段時間,甚至很久,除非設置了lock in memory,比如jdk和oracle、mysql都支持這么做)

  但是也不一定,如下:

2022-04-01 06:45:04.269332C mysub zjh@postgres ::1(62148) walsender idle 55006[2022-04-01 06:45:04 UTC] 0 [88793] ERROR:  replication slot "mysub" is active for PID 192415
2022-04-01 06:45:34.277434C mysub zjh@postgres ::1(62484) walsender idle 55006[2022-04-01 06:45:34 UTC] 0 [88976] ERROR:  replication slot "mysub" is active for PID 192415
2022-04-01 06:48:30.667272C mysub zjh@postgres ::1(63883) walsender startup XX000[2022-04-01 06:46:04 UTC] 0 [89179] PANIC:  stuck spinlock detected at InitWalSenderSlot, walsender.c:2415
2022-04-01 06:48:39.594554C  @  postmaster  00000[2022-03-29 11:23:45 UTC] 0 [69880] LOG:  server process (PID 89179) was terminated by signal 6: Aborted
2022-04-01 06:48:39.594567C  @  postmaster  00000[2022-03-29 11:23:45 UTC] 0 [69880] LOG:  terminating any other active server processes
2022-04-01 06:48:39.594624C pgbench_sub zjh@postgres ::1(63882) walsender idle 57P02[2022-04-01 05:19:52 UTC] 0 [231421] WARNING:  terminating connection because of crash of another server process
2022-04-01 06:48:39.594624C pgbench_sub zjh@postgres ::1(63882) walsender idle 57P02[2022-04-01 05:19:52 UTC] 0 [231421] 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.
2022-04-01 06:48:39.594624C pgbench_sub zjh@postgres ::1(63882) walsender idle 57P02[2022-04-01 05:19:52 UTC] 0 [231421] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2022-04-01 06:48:39.594631C ltsql zjh@postgres [local] client backend idle 57P02[2022-04-01 06:14:36 UTC] 0 [254275] WARNING:  terminating connection because of crash of another server process
2022-04-01 06:48:39.594631C ltsql zjh@postgres [local] client backend idle 57P02[2022-04-01 06:14:36 UTC] 0 [254275] 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.
2022-04-01 06:48:39.594631C ltsql zjh@postgres [local] client backend idle 57P02[2022-04-01 06:14:36 UTC] 0 [254275] HINT:  In a moment you should be able to reconnect to the database and repeat your command.

   在postgresql/lightdb中,是因為默認(通過編譯時宏S_LOCK_TEST控制)會限制自旋鎖等待的時間,如果超過指定閾值(1ms-1s*1000),就會觸發stuck spinlock,然后導致lightdb/postgresql自動重啟。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM