Hi,
Is this a complete backtrace?
Can you post a complete backtrace? We need to see if there is a reference
to your application code?
What language is it written in?
What operation this thread was performing?
Thank you.
On Thu, Oct 24, 2024 at 11:12 AM Sasmit Utkarsh <utkarshsasmit@gmail.com> wrote:
>
> Dear PostgreSQL Community Team,
>
> I hope this message finds you well. I am reaching out for assistance with an issue encountered in our application,
whichcommunicates with PostgreSQL using the libpq client library.
>
> Issue Details:
> We have observed a problem where one of the application's threads gets stuck during a database operation. Below is a
stacktrace of the affected thread:
>
> Application Logs:
> Oct 23 10:08:44.806235 cucmtpccu1 shc-server@2.service[966034]:
0966070{ef5f81a7-d35b-4604-953d-a35665e505b7.010000}KIP8-SQL_get_tpf_rw()-SQLread data from File Address before lock
fa(-1810606079)fa(94145801) fa2 htonl(22549652)
> Oct 23 10:08:44.806235 cucmtpccu1 shc-server@2.service[966034]:
0966070{ef5f81a7-d35b-4604-953d-a35665e505b7.010000}KIP8-SQL_get_tpf_rw()SelectDataCommand = CALL
SQL_select_data_procedure($1,$2, NULL, NULL) hold(0) fa(-1810606079)
> Oct 23 10:08:44.807814 cucmtpccu1 shc-server@2.service[966034]: *** buffer overflow detected ***: terminated
>
> Stack Trace of Thread 966070:
> #0 0x00000000f7ee1129 __kernel_vsyscall (linux-gate.so.1)
> #1 0x00000000f6ba23b7 __poll (libc.so.6)
> #2 0x00000000f792e5b5 __interceptor_poll (libasan.so.8)
> #3 0x00000000f72b30a8 pqSocketCheck (libpq.so.5)
> #4 0x00000000f72b3864 pqWaitTimed (libpq.so.5)
> #5 0x00000000f72b38d2 pqWait (libpq.so.5)
> #6 0x00000000f72aff03 PQgetResult (libpq.so.5)
> #7 0x00000000f72b036a PQexecFinish (libpq.so.5)
> #8 0x0000000008106dd4 checkLOCK (server)
> #9 0x000000000811d871 SQL_get_tpf_rw (server)
> ...
>
> The stack trace shows that the thread is stuck in a poll operation while waiting for socket activity within the
PostgreSQLclient library (libpq). We suspect this could be related to a network timeout or issue. However, the
applicationlogs indicate a buffer overflow before the crash, which raises questions about whether these are related.
>
> Questions:
> -Could the buffer overflow be causing the crash, and if so, how is it related to the socket activity?
> -Are there specific configurations or checks we should perform to diagnose this issue further?
> -Any suggestions for possible solutions to resolve this problem?
>
> For additional context, I've verified that the specified record does exist in the database, and I am also attaching
theimplementation details for the checkLOCK function corresponding to the stack trace.
>
> Please let me know if you need any more details
>
> Your assistance with troubleshooting this would be highly appreciated.
>
> Regards,
> Sasmit Utkarsh
> +91-7674022625