Package: postgresql-11
Version: 11.7-0+deb10u1

After running the query shown in the postgresql log in psql running on the same machine as the postgres server. Either the query results will be displayed or WARNING: terminating connection because of crash of another server process.

If I had restarted the postgresql.service and run the query it would segfault. If I query the view that is being joined in the problem query first I would get results. Running the query multiple times in a row the result is random.

I tried to run postgresql through gdb but was unable to reproduce the error this way. The query is running accross multiple child processes and I'm unable to determine which one is causing the segfault.


Linux ip-172-31-45-156 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

Package: libc6
Version: 2.28-10

This is running on debain 10.3 on AWS w/ 2GB or RAM (using the debian published 10.2 AMI upgraded to 10.3). Based on the output from dmesg when reproducing the error issue could be in libc-2.28.so


The error received after running a query in psql

WARNING:  terminating connection because of crash of another server process
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. HINT: In a moment you should be able to reconnect to the database and repeat your command.
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: Failed.


output from /var/log/postgresql/postgresql-11-main.log

2020-03-05 16:55:55.511 UTC [515] LOG: background worker "parallel worker" (PID 884) was terminated by signal 11: Segmentation fault 2020-03-05 16:55:55.511 UTC [515] DETAIL: Failed process was running: SELECT distinct student_prob.student_id, student_prob.score, student_name, v_capacity_score.capacity
FROM data
JOIN model on model.id = 2 AND data_stage(data) = model.target_begin_field_id JOIN student_prob ON data.crm_id = student_prob.student_id AND model.id = student_prob.model_id AND (student_prob.additional_aid < 1) LEFT JOIN v_capacity_score ON data.crm_id = v_capacity_score.student_id AND student_prob.model_id = v_capacity_score.model_id
    WHERE data.term_code = '202090'
    AND student_prob.score > 0
    ORDER BY student_prob.score DESC, student_name
    LIMIT 100 OFFSET 100 ;
2020-03-05 16:55:55.511 UTC [515] LOG: terminating any other active server processes 2020-03-05 16:55:55.512 UTC [535] inroads@insuite WARNING: terminating connection because of crash of another server process 2020-03-05 16:55:55.512 UTC [535] inroads@insuite 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. 2020-03-05 16:55:55.512 UTC [535] inroads@insuite HINT: In a moment you should be able to reconnect to the database and repeat your command. 2020-03-05 16:55:55.513 UTC [525] WARNING: terminating connection because of crash of another server process 2020-03-05 16:55:55.513 UTC [525] 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. 2020-03-05 16:55:55.513 UTC [525] HINT: In a moment you should be able to reconnect to the database and repeat your command. 2020-03-05 16:55:55.515 UTC [515] LOG: all server processes terminated; reinitializing 2020-03-05 16:55:55.530 UTC [886] LOG: database system was interrupted; last known up at 2020-03-05 16:54:45 UTC 2020-03-05 16:55:55.616 UTC [886] LOG: database system was not properly shut down; automatic recovery in progress
2020-03-05 16:55:55.619 UTC [886] LOG:  redo starts at 2/A924D0B0
2020-03-05 16:55:55.619 UTC [886] LOG: invalid record length at 2/A924D0E8: wanted 24, got 0
2020-03-05 16:55:55.619 UTC [886] LOG:  redo done at 2/A924D0B0
2020-03-05 16:55:55.633 UTC [515] LOG: database system is ready to accept connections


out put from dmesg

[ 77.674822] postgres[879]: segfault at 55ae73423960 ip 00007fd09d6741a7 sp 00007ffc7e247c28 error 4 in libc-2.28.so[7fd09d53a000+148000] [ 77.680661] Code: f9 20 77 1f c5 fd 74 0f c5 fd d7 c1 85 c0 0f 85 df 00 00 00 48 83 c7 20 83 e1 1f 48 83 e7 e0 eb 36 66 90 83 e1 1f 48 83 e7 e0 <c5> fd 74 0f c5 fd d7 c1 d3 f8 85 c0 74 1b f3 0f bc c0 48 01 f8 48 [ 77.690252] postgres[884]: segfault at f ip 000055ae597d1a06 sp 00007ffc7e2474c0 error 4 in postgres[55ae597c5000+465000] [ 77.695474] Code: 83 c7 70 48 8d 48 01 49 39 c1 0f 84 04 01 00 00 48 89 c8 80 bf 81 00 00 00 00 74 d8 4c 8b 5e 18 48 89 c1 48 c1 e1 04 4c 01 c1 <49> 03 4b 10 80 39 00 74 c1 41 c6 04 02 00 48 8b 49 08 eb bd 66 0f

Reply via email to