Re: Segfault in pg_stat_activity
От | Andres Freund |
---|---|
Тема | Re: Segfault in pg_stat_activity |
Дата | |
Msg-id | 20150727194657.GH5106@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Segfault in pg_stat_activity ("Peter J. Holzer" <hjp-pgsql@hjp.at>) |
Ответы |
Re: Segfault in pg_stat_activity
Re: Segfault in pg_stat_activity |
Список | pgsql-bugs |
Hi Peter, Magnus, On 2015-07-27 21:20:33 +0200, Peter J. Holzer wrote: > Since I've installed 9.5alpha1 a week ago, I've seen several segfaults > in the log file: Thanks for reporting the issue. I guess you have several ssl enabled connections? > Core was generated by `postgres: postgres template1 [local] SELECT '. > Program terminated with signal SIGSEGV, Segmentation fault. > #0 0x00007fb94d314289 in memcpy (__len=200, __src=0x7fb948719ad8, __dest=0x7fb94f4c1bb0) at /usr/include/x86_64-linux-gnu/bits/string3.h:51 > 51 return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest)); > (gdb) bt > #0 0x00007fb94d314289 in memcpy (__len=200, __src=0x7fb948719ad8, __dest=0x7fb94f4c1bb0) at /usr/include/x86_64-linux-gnu/bits/string3.h:51 > #1 pgstat_read_current_status () at /tmp/buildd/postgresql-9.5-9.5~alpha1/build/../src/backend/postmaster/pgstat.c:3000 > #2 0x00007fb94d318db1 in pgstat_read_current_status () at /tmp/buildd/postgresql-9.5-9.5~alpha1/build/../src/backend/postmaster/pgstat.c:2434 Uh. I think I see what's going on here. Magnus, could it be that you didn't intend the += for localsslstatus?: /* Only valid entries get included into the local array */ if (localentry->backendStatus.st_procpid > 0) { BackendIdGetTransactionIds(i, &localentry->backend_xid, &localentry->backend_xmin); localentry++; localappname += NAMEDATALEN; localactivity += pgstat_track_activity_query_size; #ifdef USE_SSL localsslstatus += sizeof(PgBackendSSLStatus); #endif localNumBackends++; } because that'll forward localsslstatus not one, but uh, something like 200. I think just replacing the above += with 1 might fix the issue. Can't test just now. Greetings, Andres Freund
В списке pgsql-bugs по дате отправления: