Re: segfault on rollback
От | Sergey E. Koposov |
---|---|
Тема | Re: segfault on rollback |
Дата | |
Msg-id | Pine.LNX.4.64.0608130921500.1391@lnfm1.sai.msu.ru обсуждение исходный текст |
Ответ на | Re: segfault on rollback (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Sat, 12 Aug 2006, Tom Lane wrote: > "Sergey E. Koposov" <math@sai.msu.ru> writes: >> I recently have seen the segfault with Postgres 8.1.4. > > I'm betting that portal->sourceText has already been deallocated when > exec_execute_message tries to print the log message. Getting an actual > segfault from that would very probably be hard to reproduce, but if you > build with --enable-cassert it should not be too hard to reproduce > corruption of the log message, ie, display of garbage instead of > "ROLLBACK" as the command text. Please try that and see if you can > generate a self-contained test case. I succeeded to get the self contained case, but in java (it is just 15 lines, but it crashes the backend). (probably I should forward the mail pgsql-jdbc...) import java.sql.*; public class xx { public static void main(String args[]) throws Exception { Class.forName("org.postgresql.Driver"); Connection dbcon = DriverManager.getConnection("jdbc:postgresql://localhost:5432/template1","postgres",""); dbcon.setAutoCommit(false); Statement stmt = dbcon.createStatement(); stmt.execute("create table xx(a int, bdouble precision)"); dbcon.rollback(); } } I'm not sure that it is possible to reproduce without java, since JDBC do its own query preparing and a lot of other stuff internally which should be non trivial to reproduce without jdbc... Regards, Sergey ******************************************************************* Sergey E. Koposov Max Planck Institute for Astronomy/Sternberg Astronomical Institute Tel: +49-6221-528-349 Web: http://lnfm1.sai.msu.ru/~math E-mail: math@sai.msu.ru
В списке pgsql-hackers по дате отправления: