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
Process: postgres [26719] Path: /usr/local/pgsql/bin/postgres Identifier: postgres Version: ??? (???) Code Type: X86 (Native) Parent Process: postgres [283] Date/Time: 2009-02-27 15:14:18.098 -0800 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000 Crashed Thread: 0 Thread 0 Crashed: 0 libR.dylib 0x0162ea35 R_CHAR + 21 (memory.c:2573) 1 plr.so 0x0155d329 get_frame_tuplestore + 1001 2 plr.so 0x0155d854 r_get_pg + 356 3 plr.so 0x0155b2ab 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 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x0162ea34 ecx: 0x00d9c208 edx: 0x01c2f000 edi: 0x7fffffff esi: 0x00000000 ebp: 0xbfffd938 esp: 0xbfffd920 ss: 0x0000001f efl: 0x00000282 eip: 0x0162ea35 cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0xa0020528 Binary Images: 0x1000 - 0x329feb +postgres ??? (???) /usr/local/pgsql/bin/postgres 0x69b000 - 0x6b5fe7 +plpgsql.so ??? (???) /usr/local/pgsql/lib/plpgsql.so 0x740000 - 0x790ffb +liblwgeom.so ??? (???) <90c2f28e98be32665def3518626c1ba4> /usr/local/pgsql/lib/liblwgeom.so 0x7b8000 - 0x7c0ff7 +libgeos_c.1.dylib ??? (???) /opt/local/lib/libgeos_c.1.dylib 0x7c9000 - 0x7d0fed +libgcc_s.1.dylib ??? (???) /usr/local/lib/libgcc_s.1.dylib 0x13d8000 - 0x1408fff +libproj.0.dylib ??? (???) <56d1d176a8d5ca75516565dbc37e5c86> /usr/local/lib/libproj.0.dylib 0x1422000 - 0x14d9ffb +libgeos-3.0.0.dylib ??? (???) /opt/local/lib/libgeos-3.0.0.dylib 0x1558000 - 0x1562ffa +plr.so ??? (???) /usr/local/pgsql/lib/plr.so 0x1568000 - 0x17aefef +libR.dylib ??? (???) <ce5d74c0dc8a1cee7773355c36fcc07b> /Library/Frameworks/R.framework/Versions/2.8/Resources/lib/libR.dylib 0x188e000 - 0x18bbfff +libRblas.dylib ??? (???) /Library/Frameworks/R.framework/Versions/2.8/Resources/lib/libRblas.dylib 0x18ea000 - 0x1975fff +libgfortran.2.dylib ??? (???) /usr/local/lib/libgfortran.2.dylib 0x1aea000 - 0x1af1ff3 +libintl.3.dylib ??? (???) <dd75d7279c354e62ccba2a04c77e6840> /sw/lib/libintl.3.dylib 0x1af8000 - 0x1beffe2 +libiconv.2.dylib ??? (???) <049458d73f22f0f3e28e6769189d592c> /sw/lib/libiconv.2.dylib 0x1c08000 - 0x1c1efea libedit.2.dylib ??? (???) <c98b30cb0c9e4252892382daf57fa108> /usr/lib/libedit.2.dylib 0x1d77000 - 0x1d7cff2 +methods.so ??? (???) <bf0456d9ab9d78ba355000624b4d90fd> /Library/Frameworks/R.framework/Resources/library/methods/libs/methods.so 0x1ebd000 - 0x1ee3ffa +grDevices.so ??? (???) <4a8fffcdeb801cb7ec61609646b2bf5d> /Library/Frameworks/R.framework/Resources/library/grDevices/libs/grDevices.so 0x1f11000 - 0x1f68fe7 +stats.so ??? (???) <965e545b7b63e27934e45947796696ab> /Library/Frameworks/R.framework/Resources/library/stats/libs/stats.so 0x8fe00000 - 0x8fe2db43 dyld 97.1 (???) <100d362e03410f181a34e04e94189ae5> /usr/lib/dyld 0x900be000 - 0x900d6ff7 com.apple.CoreVideo 1.6.0 (20.0) <c0d869876af51283a160cd2224a23abf> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x900d7000 - 0x900e4fe7 com.apple.opengl 1.5.9 (1.5.9) <7e5048a2677b41098c84045305f42f7f> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x90153000 - 0x90161ffd libz.1.dylib ??? (???) <545ca09467025f77131cfac09d8b9375> /usr/lib/libz.1.dylib 0x90162000 - 0x9016cfeb com.apple.audio.SoundManager 3.9.2 (3.9.2) <caa41909dcb5a18a94bc68cd13999bd5> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound 0x9016d000 - 0x902d4ff3 libSystem.B.dylib ??? (???) <d68880dfb1f8becdbdac6928db1510fb> /usr/lib/libSystem.B.dylib 0x902d5000 - 0x9038ffe3 com.apple.CoreServices.OSServices 226.5 (226.5) <2a135d4fb16f4954290f7b72b4111aa3> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x903d3000 - 0x9042dff7 com.apple.CoreText 2.0.4 (???) <f9a90116ae34a2b0d84e87734766fb3a> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText 0x904be000 - 0x90739fe7 com.apple.Foundation 6.5.7 (677.22) <8fe77b5d15ecdae1240b4cb604fc6d0b> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x9073a000 - 0x907e1feb com.apple.QD 3.11.54 (???) <b743398c24c38e581a86e91744a2ba6e> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x909b2000 - 0x90c8cff3 com.apple.CoreServices.CarbonCore 786.11 (786.11) <f06fe5d92d56ac5aa52d1ba182745924> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x90c8d000 - 0x90c91fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x90c92000 - 0x90cd1fef libTIFF.dylib ??? (???) <3589442575ac77746ae99ecf724f5f87> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x90cd2000 - 0x90e24ff3 com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x90e25000 - 0x90e25ff8 com.apple.ApplicationServices 34 (34) <e9cd7c823062c4382d89e3c9997f4739> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x90e37000 - 0x90e6efff com.apple.SystemConfiguration 1.9.2 (1.9.2) <8b26ebf26a009a098484f1ed01ec499c> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x90e6f000 - 0x90e9afe7 libauto.dylib ??? (???) <42d8422dc23a18071869fdf7b5d8fab5> /usr/lib/libauto.dylib 0x90ed8000 - 0x90fb9ff7 libxml2.2.dylib ??? (???) <d69560099d9eb32ba7f8a17baa65a28d> /usr/lib/libxml2.2.dylib 0x9109c000 - 0x910bafff libresolv.9.dylib ??? (???) <a8018c42930596593ddf27f7c20fe7af> /usr/lib/libresolv.9.dylib 0x910bb000 - 0x910daffa libJPEG.dylib ??? (???) <e7eb56555109e23144924cd64aa8daec> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x91105000 - 0x91190fff com.apple.framework.IOKit 1.5.1 (???) <f9f5f0d070e197a832d86751e1d44545> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x91191000 - 0x9121bfe3 com.apple.DesktopServices 1.4.7 (1.4.7) <d16642ba22c32f67be793ebfbe67ca3a> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv 0x91467000 - 0x91635ff3 com.apple.security 5.0.4 (34102) <55dda7486df4e8e1d61505be16f83a1c> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x9164c000 - 0x916d3ff7 libsqlite3.0.dylib ??? (???) <6978bbcca4277d6ae9f042beff643f7d> /usr/lib/libsqlite3.0.dylib 0x916d4000 - 0x916efffb libPng.dylib ??? (???) <4780e979d35aa5ec2cea22678836cea5> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x916f0000 - 0x917a2ffb libcrypto.0.9.7.dylib ??? (???) <69bc2457aa23f12fa7d052601d48fa29> /usr/lib/libcrypto.0.9.7.dylib 0x917f4000 - 0x91e94fff com.apple.CoreGraphics 1.407.2 (???) <3a91d1037afde01d1d8acdf9cd1caa14> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x91e95000 - 0x91ecffe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x91f11000 - 0x91f13ff5 libRadiance.dylib ??? (???) <8a844202fcd65662bb9ab25f08c45a62> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x92314000 - 0x923a0ff7 com.apple.LaunchServices 290.3 (290.3) <6f9629f4ed1ba3bb313548e6838b2888> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x923a1000 - 0x923a9fff com.apple.DiskArbitration 2.2.1 (2.2.1) <75b0c8d8940a8a27816961dddcac8e0f> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x923b5000 - 0x923b5ffb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/InstallServer 0x923b6000 - 0x923e5ff7 libncurses.5.4.dylib ??? (???) <00632d5180ac31e2cd437a1ce9d08562> /usr/lib/libncurses.5.4.dylib 0x923e6000 - 0x923f6fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) <06d8fc0307314f8ffc16f206ad3dbf44> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x923f7000 - 0x924d7fff libobjc.A.dylib ??? (???) <7b92613fdf804fd9a0a3733a0674c30b> /usr/lib/libobjc.A.dylib 0x924d8000 - 0x924dcfff libGIF.dylib ??? (???) <572a32e46e33be1ec041c5ef5b0341ae> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x925d7000 - 0x925e0fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <6a6518b392d3d41ace3dcea69d6809d9> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition 0x927ca000 - 0x927d6ffe libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x927d7000 - 0x927d7ffc com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x92819000 - 0x92819ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x9281a000 - 0x92cebf3e libGLProgrammability.dylib ??? (???) <5d283543ac844e7c6fa3440ac56cd265> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib 0x92cec000 - 0x92cecffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x92d5c000 - 0x92d5dffc libffi.dylib ??? (???) <596e0dbf626b211741cecaa9698f271b> /usr/lib/libffi.dylib 0x92d5e000 - 0x92e25ff2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x9300e000 - 0x930befff edu.mit.Kerberos 6.0.12 (6.0.12) <685cc018c133668d0d3ac6a1cb63cff9> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x930bf000 - 0x930c6fe9 libgcc_s.1.dylib ??? (???) <28a7cbc3a5ca2982d124668306f422d9> /usr/lib/libgcc_s.1.dylib 0x930c7000 - 0x931acff3 com.apple.CoreData 100.1 (186) <8e28162ef2288692615b52acc01f8b54> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x93234000 - 0x93291ffb libstdc++.6.dylib ??? (???) <6106b1f2b0b303b06ae476253dbb5f3f> /usr/lib/libstdc++.6.dylib 0x932e4000 - 0x9341cff7 libicucore.A.dylib ??? (???) <18098dcf431603fe47ee027a60006c85> /usr/lib/libicucore.A.dylib 0x9341d000 - 0x93441fff libxslt.1.dylib ??? (???) <0a9778d6368ae668826f446878deb99b> /usr/lib/libxslt.1.dylib 0x93442000 - 0x93493ff7 com.apple.HIServices 1.7.0 (???) <01b690d1f376e400ac873105533e39eb> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x93494000 - 0x935daff7 com.apple.ImageIO.framework 2.0.4 (2.0.4) <6a6623d3d1a7292b5c3763dcd108b55f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x935ed000 - 0x9361cfe3 com.apple.AE 402.3 (402.3) <4cb9ef65cf116d6dd424f0ce98c2d015> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x93e1a000 - 0x93e47feb libvDSP.dylib ??? (???) <b232c018ddd040ec4e2c2af632dd497f> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x93e48000 - 0x93edbff3 com.apple.ApplicationServices.ATS 3.4 (???) <8c51de0ec3deaef416578cd59df38754> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x9416a000 - 0x94192fff libcups.2.dylib ??? (???) <16bec7c6a004f744804e2281a1b1c094> /usr/lib/libcups.2.dylib 0x94193000 - 0x942c6fff com.apple.CoreFoundation 6.5.5 (476.17) <4a70c8dbb582118e31412c53dc1f407f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x94396000 - 0x9439dffe libbsm.dylib ??? (???) <5582985a86ea36504cca31788bccf963> /usr/lib/libbsm.dylib 0x943e5000 - 0x94423ff7 libGLImage.dylib ??? (???) <1123b8a48bcbe9cc7aa8dd8e1a214a66> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x94424000 - 0x94424ffa com.apple.CoreServices 32 (32) <2760719f7a81e8c2bdfd15b0939abc29> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x95563000 - 0x9586bfff com.apple.HIToolbox 1.5.4 (???) <3747086ba21ee419708a5cab946c8ba6> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x95872000 - 0x9590ffe4 com.apple.CFNetwork 422.15.2 (422.15.2) <80851410a5592b7c3b149b2ff849bcc1> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x95910000 - 0x95ccefea libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x95d33000 - 0x95d33ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x95d34000 - 0x95db1feb com.apple.audio.CoreAudio 3.1.1 (3.1.1) <f35477a5e23db0fa43233c37da01ae1c> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x95db2000 - 0x95dc8fff com.apple.DictionaryServices 1.0.0 (1.0.0) <7e9ff586b5c9d02b09e2a5527d98524f> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices 0x95dd6000 - 0x965d4fef com.apple.AppKit 6.5.6 (949.43) <a3a300499bbe4f1dfebf71d752d01916> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x965d5000 - 0x9664fff8 com.apple.print.framework.PrintCore 5.5.3 (245.3) <222dade7b33b99708b8c09d1303f93fc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x96650000 - 0x966a9ff7 libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x966aa000 - 0x966baffc com.apple.LangAnalysis 1.6.4 (1.6.4) <8b7831b5f74a950a56cf2d22a2d436f6> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x966be000 - 0x96707fef com.apple.Metadata 10.5.2 (398.25) <e0572f20350523116f23000676122a8d> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x96708000 - 0x96785fef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x968bf000 - 0x9698afff com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x9698b000 - 0x96d28fef com.apple.QuartzCore 1.5.7 (1.5.7) <2fed2dd7565c84a0f0c608d41d4d172c> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x96db8000 - 0x971c8fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x97200000 - 0x9727fff5 com.apple.SearchKit 1.2.1 (1.2.1) <3140a605db2abf56b237fa156a08b28b> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0xfffe8000 - 0xfffebfff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib 0xffff0000 - 0xffff1780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib
signature.asc
Description: OpenPGP digital signature
______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel