I'm not sure if this is the best subject line, and I apologize in advanced for the cross-posting, but I've been trying to get past a piece of code for two days now, and seem to have narrowed where a show stopping crash is occurring... I keep getting: psql:../sql/schedpak.sql:257: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. psql:../sql/schedpak.sql:257: connection to server was lost Process SQL exited abnormally with code 2 when I return from a plr function: select * from pareto_set_as_gpx( 1, 20678 ); I'm a little handicapped as I'm not used to debugging by trial and error, and just don't know what else I can do. I've attached a crash report, and don't know if this is a problem with the PL/R module, the libR.dylib module, or something I'm doing incorrectly. I've been using this code for months now, and added another column to the type definition, which seemed to break something. Does the following indicate that libR.dylib is causing this crash? Thread 0 Crashed: 0 libR.dylib 0x015d4a35 R_CHAR + 21 (memory.c:2573) 1 plr.so 0x007ce329 get_frame_tuplestore + 1001 2 plr.so 0x007ce854 r_get_pg + 356 3 plr.so 0x007cc2ab plr_call_handler + 363 4 postgres 0x0010483a ExecMakeTableFunctionResult + 314 5 postgres 0x00112dc0 FunctionNext + 128 6 postgres 0x00107325 ExecScan + 357 7 postgres 0x001129e2 ExecFunctionScan + 34 8 postgres 0x000ffc2f ExecProcNode + 447 9 postgres 0x000fd9eb ExecutorRun + 827 10 postgres 0x001abf5f PortalRunSelect + 655 11 postgres 0x001acd41 PortalRun + 433 12 postgres 0x001a7b45 exec_simple_query + 661 13 postgres 0x001a97ff PostgresMain + 4751 14 postgres 0x00178774 ServerLoop + 2964 15 postgres 0x00179798 PostmasterMain + 2760 16 postgres 0x0012329b main + 1227 17 postgres 0x00001676 start + 54 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: postgres_2009-02-27-151418_jeff-hamanns-macbook-pro.crash URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20090227/fbaadc28/attachment.pl> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 258 bytes Desc: OpenPGP digital signature URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20090227/fbaadc28/attachment.bin>
Joe Conway
2009-Feb-28 01:43 UTC
[Rd] [Plr-general] R_CHAR + 21 (memory.c:2573) in crash report...
Jeff Hamann wrote:> I've been using > this code for months now, and added another column to the type > definition, which seemed to break something.Undoubtedly the above has something to do with the problem, and I would guess the issue is in PL/R, not R. However, in order to get to the bottom of it I'll need a self contained minimal test case that will reproduce the crash (i.e. related table definitions, some sample data, PL/R function, and other functions that are dependencies, sample use of said function). If you want you can send it to me off list. In any case, please drop r-devel from the thread from this point forward (I only maintained the cross-post so they could see that I was responding). Joe
Apparently Analagous Threads
- R strings from C
- another fix for R crashes under enable-strict-barrier, lto, trunk@72156
- another fix for R crashes under enable-strict-barrier, lto, trunk@72156
- AIX 5.3 --enable-R-shlib --with-x ---with-iconv make error with R-2.7.0 and R-2.7.1
- R CMD check, interfacing c++ linking errors