Re: Valgrind failures caused by multivariate stats patch
От | Tomas Vondra |
---|---|
Тема | Re: Valgrind failures caused by multivariate stats patch |
Дата | |
Msg-id | b35d100a-1d13-c6e3-2992-9789cf13de09@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: Valgrind failures caused by multivariate stats patch (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: Valgrind failures caused by multivariate stats patch
|
Список | pgsql-hackers |
On 03/26/2017 08:47 PM, Andres Freund wrote: > On 2017-03-26 20:38:52 +0200, Tomas Vondra wrote: >> ... >> Hmmm, so I have a theory about what's going on, but no matter what I do I >> can't trigger these valgrind failures. What switches are you using to start >> valgrind? I'm using this: >> >> valgrind --leak-check=no --undef-value-errors=yes \ >> --expensive-definedness-checks=yes --track-origins=yes \ >> --read-var-info=yes --gen-suppressions=all \ >> --suppressions=src/tools/valgrind.supp --time-stamp=yes \ >> --log-file=$HOME/pg-valgrind/%p.log --trace-children=yes \ >> postgres --log_line_prefix="%m %p " --log_statement=all \ >> --shared_buffers=64MB -D /home/user/tmp/data-valgrind 2>&1 > > --quiet \ > --error-exitcode=55 \ > --suppressions=${PG_SRC_DIR}/src/tools/valgrind.supp \ > --trace-children=yes --track-origins=yes --read-var-info=yes \ > --num-callers=20 \ > --leak-check=no \ > --gen-suppressions=all \ > > the error-exitcode makes it a whole lot easier to see an error, because > it triggers a crash-restart cycle at backend exit ;) > OK, this did the trick. And just as I suspected, it seems to be due to doing memcpy+offsetof when serializing the statistic into a bytea. The attached patch fixes that for me. Can you test it on your build? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Вложения
В списке pgsql-hackers по дате отправления: