From erlangsiri@REDACTED Fri Jul 1 15:51:31 2011 From: erlangsiri@REDACTED (Siri Hansen) Date: Fri, 1 Jul 2011 15:51:31 +0200 Subject: [erlang-bugs] Code path of application In-Reply-To: References: Message-ID: Hi Andrew! I finally had the time to look at this. It seems there is a bug - and a simple workaround. The bug is that the code path is not at all updated unless the relup contains an instruction for at least one of the application's modules. The workaround is to use the {update_paths,true} option to release_handler:install_release/2. The documentation for this option says: "The option {update_paths,Bool} indicates if all application code paths should be updated (Bool==true), or if only code paths for modified applications should be updated (Bool==false, default)." Since your application is indeed updated, the path should of course have been updated anyway. I will correct this for OTP R14B04. Regards /siri 2011/6/20 Siri Hansen > Hi Andrew - thanks for reporting this. I will have a look at it. > Regards > siri@REDACTED > > 2011/6/20 Andrew Gopienko > >> Hi, >> >> Code path of application can specify to old location after release >> upgrade. >> >> It's possible if we change only vsn of application, no erlang code of >> modules is changed. (In my case under priv directory I have JavaScript >> code). >> >> Generated relup doesnt contains instructions for reload application... >> no 'load_object_code,{OurApp,NewVsn,Mods}'. >> >> After release upgraded we have: >> application:loaded_applications() >> .... >> {OurApp,Description,NewVsn} >> .... >> >> but >> >> code:priv_dir(OurApp) points to old location. >> >> If relup contains {OurApp,NewVsn,[]} then location of application is correctly >> updated. >> >> >> Andrew Gopienko >> ThreeLine LLC >> >> >> _______________________________________________ >> erlang-bugs mailing list >> erlang-bugs@REDACTED >> http://erlang.org/mailman/listinfo/erlang-bugs >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgmentzer@REDACTED Sat Jul 2 06:29:14 2011 From: sgmentzer@REDACTED (sgm) Date: Sat, 2 Jul 2011 00:29:14 -0400 Subject: [erlang-bugs] R14B02+ crashes on older hardware, Windows XP Message-ID: We have a field data collection application recently re-written to use CouchDB. It requires minimal computer resources, so a number of the notebooks we use are circa 2001/2002. All run Windows XP with SP2 or SP3, and we are using CouchDB 1.1. On the older machines, Erlang R14B02 and R14B03 crash almost immediately upon running werl or erl. R14B01 does not. I'm attaching a screenshot of the crash on one of the machines. In all cases it happens at the same point, almost immediately, is 100% reproducible, and no crash dump is generated. Here are the machines where it crashes: Dell Inspiron 2500, 1.0GHz Pentium III, 160MB RAM, system summary rctc11.txt attached Dell Inspiron 2600, 1.06GHz Celeron, 128MB RAM, system summary rctc12.txt attached Gateway Solo 9300, 750MHz Pentium III, 160MB RAM, system summary rctc16.txt attached For comparison, I'm also including this machine of similar vintage which does NOT crash: Dell Inspiron 2650, 1.7GHz Pentium 4, 256MB RAM, system summary rctc13.txt attached Please let me know if you need more information or if there is anything you'd like me to try. Thanks, Steve -------------- next part -------------- Dell Inspiron 2500 (CRASH) Resource Summary Report - Page: 1 ******************** SYSTEM SUMMARY ******************** Windows Version: Windows 5.1 Service Pack 2 (Build 2600) Registered Owner: User Registered Organization: Computer Name: RCTC11 Machine Type: AT/AT COMPATIBLE System BIOS Version: PTLTD - 6040000 System BIOS Date: 04/26/02 Processor Type: x86 Family 6 Model 8 Stepping 10 Processor Vendor: GenuineIntel Number of Processors: 1 Physical Memory: 158 MB ******************** DISK DRIVE INFO ******************** Drive C: Type: Fixed disk drive Total Space: 19,995,619,328 bytes Free Space: 15,715,389,440 bytes Heads: 255 Cylinders: 2432 Sectors Per Track: 63 Bytes Per Sector: 512 ******************** IRQ SUMMARY ******************** IRQ Usage Summary: (ISA) 0 System timer (ISA) 1 Standard 101/102-Key or Microsoft Natural PS/2 Keyboard (ISA) 4 Communications Port (COM1) (PCI) 5 O2Micro OZ6933 CardBus Controller (PCI) 5 O2Micro OZ6933 CardBus Controller (PCI) 5 Intel 8255x-based PCI Ethernet Adapter (10/100) (PCI) 5 Lucent Win Modem (PCI) 5 Intel(r) 82801BA/BAM USB Universal Host Controller - 2442 (PCI) 5 Intel(R) 82801BA/BAM SMBus Controller - 2443 (PCI) 5 Intel(r) 82801BA/BAM USB Universal Host Controller - 2444 (PCI) 5 Intel(r) 82801BA/BAM AC'97 Audio Controller (ISA) 6 Standard floppy disk controller (ISA) 8 System CMOS/real time clock (ISA) 9 Microsoft ACPI-Compliant System (ISA) 12 PS/2 Compatible Mouse (ISA) 13 Numeric data processor (ISA) 14 Primary IDE Channel (ISA) 15 Secondary IDE Channel ******************** DMA USAGE SUMMARY ******************** DMA Usage Summary: 1 ECP Printer Port (LPT1) 2 Standard floppy disk controller 4 Direct memory access controller ******************** MEMORY SUMMARY ******************** Memory Usage Summary: [000A0000 - 000BFFFF] PCI bus Resource Summary Report - Page: 2 [000A0000 - 000BFFFF] Intel(R) 82815 Graphics Controller (Microsoft Corpo [000D0000 - 000D7FFF] Motherboard resources [000D8000 - 000DBFFF] PCI bus [000DC000 - 000DFFFF] PCI bus [000DE000 - 000DEFFF] O2Micro OZ6933 CardBus Controller [000DF000 - 000DFFFF] O2Micro OZ6933 CardBus Controller [000E0000 - 000E3FFF] PCI bus [09E80000 - 09FFFFFF] PCI bus [0A000000 - FEBFFFFF] PCI bus [EC000000 - EFFFFFFF] O2Micro OZ6933 CardBus Controller [F0000000 - F3FFFFFF] O2Micro OZ6933 CardBus Controller [F4000000 - F407FFFF] Intel(R) 82815 Graphics Controller (Microsoft Corpo [F4100000 - F42FFFFF] PCI standard PCI-to-PCI bridge [F41FFF00 - F41FFFFF] Lucent Win Modem [F4200000 - F42FFFFF] Intel 8255x-based PCI Ethernet Adapter (10/100) [F4200000 - F4200FFF] Intel 8255x-based PCI Ethernet Adapter (10/100) [F8000000 - FBFFFFFF] Intel(R) 82815 Graphics Controller (Microsoft Corpo [FEBFC000 - FEBFCFFF] O2Micro OZ6933 CardBus Controller [FEBFD000 - FEBFDFFF] O2Micro OZ6933 CardBus Controller [FEBFE000 - FEBFEFFF] O2Micro OZ6933 CardBus Controller [FEBFF000 - FEBFFFFF] O2Micro OZ6933 CardBus Controller [FF800000 - FFFFFFFF] Motherboard resources ******************** IO PORT SUMMARY ******************** I/O Ports Usage Summary: [00000000 - 00000CF7] PCI bus [00000000 - 0000000F] Direct memory access controller [00000010 - 0000001F] Motherboard resources [00000020 - 00000021] Programmable interrupt controller [00000024 - 00000025] Motherboard resources [00000028 - 00000029] Motherboard resources [0000002C - 0000002D] Motherboard resources [0000002E - 0000002F] Motherboard resources [00000030 - 00000031] Motherboard resources [00000034 - 00000035] Motherboard resources [00000038 - 00000039] Motherboard resources [0000003C - 0000003D] Motherboard resources [00000040 - 00000043] System timer [00000050 - 00000053] Motherboard resources [00000060 - 00000060] Standard 101/102-Key or Microsoft Natural PS/2 Keyb [00000061 - 00000061] System speaker [00000062 - 00000062] Microsoft ACPI-Compliant Embedded Controller [00000064 - 00000064] Standard 101/102-Key or Microsoft Natural PS/2 Keyb [00000066 - 00000066] Microsoft ACPI-Compliant Embedded Controller [00000070 - 00000071] System CMOS/real time clock [00000072 - 00000077] Motherboard resources [00000080 - 00000080] Motherboard resources [00000081 - 0000008F] Direct memory access controller [00000090 - 0000009F] Motherboard resources [000000A0 - 000000A1] Programmable interrupt controller [000000A4 - 000000A5] Motherboard resources [000000A8 - 000000A9] Motherboard resources [000000AC - 000000AD] Motherboard resources [000000B0 - 000000B5] Motherboard resources [000000B8 - 000000B9] Motherboard resources [000000BC - 000000BD] Motherboard resources [000000C0 - 000000DF] Direct memory access controller Resource Summary Report - Page: 3 [000000F0 - 000000FE] Numeric data processor [00000170 - 00000177] Secondary IDE Channel [000001F0 - 000001F7] Primary IDE Channel [00000274 - 00000277] ISAPNP Read Data Port [00000279 - 00000279] ISAPNP Read Data Port [00000376 - 00000376] Secondary IDE Channel [00000378 - 0000037F] ECP Printer Port (LPT1) [000003B0 - 000003BB] Intel(R) 82815 Graphics Controller (Microsoft Corpo [000003C0 - 000003DF] Intel(R) 82815 Graphics Controller (Microsoft Corpo [000003F0 - 000003F5] Standard floppy disk controller [000003F6 - 000003F6] Primary IDE Channel [000003F7 - 000003F7] Standard floppy disk controller [000003F8 - 000003FF] Communications Port (COM1) [000004D0 - 000004D1] Motherboard resources [00000778 - 0000077F] ECP Printer Port (LPT1) [00000A79 - 00000A79] ISAPNP Read Data Port [00000D00 - 0000FFFF] PCI bus [00001000 - 0000107F] Motherboard resources [00001180 - 000011BF] Motherboard resources [00001800 - 0000180F] Intel(r) 82801BA Bus Master IDE Controller [00001810 - 0000181F] Intel(R) 82801BA/BAM SMBus Controller - 2443 [00001820 - 0000183F] Intel(r) 82801BA/BAM USB Universal Host Controller [00001840 - 0000187F] Intel(r) 82801BA/BAM AC'97 Audio Controller [00001880 - 0000189F] Intel(r) 82801BA/BAM USB Universal Host Controller [00001C00 - 00001CFF] Intel(r) 82801BA/BAM AC'97 Audio Controller [00002000 - 00002FFF] PCI standard PCI-to-PCI bridge [00002800 - 000028FF] Lucent Win Modem [00002CB8 - 00002CBF] Lucent Win Modem [00002CC0 - 00002CFF] Intel 8255x-based PCI Ethernet Adapter (10/100) [0000FB00 - 0000FBFF] O2Micro OZ6933 CardBus Controller [0000FC00 - 0000FCFF] O2Micro OZ6933 CardBus Controller [0000FD00 - 0000FDFF] O2Micro OZ6933 CardBus Controller [0000FE00 - 0000FEFE] Motherboard resources [0000FF00 - 0000FFFF] O2Micro OZ6933 CardBus Controller -------------- next part -------------- A non-text attachment was scrubbed... Name: crash-rctc11.png Type: image/png Size: 70665 bytes Desc: not available URL: -------------- next part -------------- Dell Inspiron 2600 (CRASH) Resource Summary Report - Page: 1 ******************** SYSTEM SUMMARY ******************** Windows Version: Windows 5.1 Service Pack 2 (Build 2600) Registered Owner: User Registered Organization: Computer Name: RCTC12 Machine Type: AT/AT COMPATIBLE System BIOS Version: PTLTD - 6040000 System BIOS Date: 04/22/02 Processor Type: x86 Family 6 Model 11 Stepping 1 Processor Vendor: GenuineIntel Number of Processors: 1 Physical Memory: 126 MB ******************** DISK DRIVE INFO ******************** Drive A: Type: 3.5" 1.44MB floppy disk drive Total Space: 1,474,560 bytes Heads: 2 Cylinders: 80 Sectors Per Track: 18 Bytes Per Sector: 512 Drive C: Type: Fixed disk drive Total Space: 19,962,753,024 bytes Free Space: 16,655,978,496 bytes Heads: 255 Cylinders: 2432 Sectors Per Track: 63 Bytes Per Sector: 512 Drive E: Type: Removable disk drive Total Space: 123,379,200 bytes Heads: 255 Cylinders: 15 Sectors Per Track: 63 Bytes Per Sector: 512 ******************** IRQ SUMMARY ******************** IRQ Usage Summary: (ISA) 0 System timer (ISA) 1 Standard 101/102-Key or Microsoft Natural PS/2 Keyboard (ISA) 6 Standard floppy disk controller (ISA) 8 System CMOS/real time clock (ISA) 9 Microsoft ACPI-Compliant System (PCI) 9 Intel(R) 82830M Graphics Controller (PCI) 9 Standard Universal PCI to USB Host Controller (PCI) 9 Standard Universal PCI to USB Host Controller (PCI) 9 3Com 3C920 Integrated Fast Ethernet Controller (3C905C-TX Compat (PCI) 9 O2Micro OZ6912 CardBus Controller (PCI) 9 Intel(r) 82801CA/CAM AC'97 Audio Controller (PCI) 10 Intel(R) 82801CA/CAM SMBus Controller - 2483 *(PCI) 10 PCI Modem (ISA) 12 PS/2 Compatible Mouse Resource Summary Report - Page: 2 (ISA) 13 Numeric data processor (ISA) 14 Primary IDE Channel (ISA) 15 Secondary IDE Channel ******************** DMA USAGE SUMMARY ******************** DMA Usage Summary: 1 ECP Printer Port (LPT1) 2 Standard floppy disk controller 4 Direct memory access controller ******************** MEMORY SUMMARY ******************** Memory Usage Summary: [00010000 - 0001FFFF] Motherboard resources [000A0000 - 000BFFFF] PCI bus [000A0000 - 000BFFFF] Intel(R) 82830M Graphics Controller [000D0000 - 000D3FFF] PCI bus [000D4000 - 000D7FFF] PCI bus [000D7000 - 000D7FFF] O2Micro OZ6912 CardBus Controller [000E0000 - 000E3FFF] PCI bus [08000000 - FEBFFFFF] PCI bus [E0000000 - E007FFFF] Intel(R) 82830M Graphics Controller [E0080000 - E00FFFFF] Intel(R) 82830M Graphics Controller [E0200000 - E020007F] 3Com 3C920 Integrated Fast Ethernet Controller (3C9 [E8000000 - EFFFFFFF] Intel(R) 82830M Graphics Controller [F0000000 - F7FFFFFF] Intel(R) 82830M Graphics Controller [FABFD000 - FEBFCFFF] O2Micro OZ6912 CardBus Controller [FEBFD000 - FEBFDFFF] O2Micro OZ6912 CardBus Controller [FEBFE000 - FEBFEFFF] O2Micro OZ6912 CardBus Controller [FEBFF800 - FEBFFBFF] Intel(r) 82801CAM Ultra ATA Storage Controller-248A [FEBFFC00 - FEBFFFFF] Motherboard resources [FFF80000 - FFFFFFFF] Motherboard resources ******************** IO PORT SUMMARY ******************** I/O Ports Usage Summary: [00000000 - 00000CF7] PCI bus [00000000 - 0000001F] Direct memory access controller [00000020 - 00000021] Programmable interrupt controller [00000024 - 00000025] Programmable interrupt controller [00000028 - 00000029] Programmable interrupt controller [0000002C - 0000002D] Programmable interrupt controller [0000002E - 0000002F] Motherboard resources [00000030 - 00000031] Programmable interrupt controller [00000034 - 00000035] Programmable interrupt controller [00000038 - 00000039] Programmable interrupt controller [0000003C - 0000003D] Programmable interrupt controller [00000040 - 00000043] System timer [00000050 - 00000053] System timer [00000060 - 00000060] Standard 101/102-Key or Microsoft Natural PS/2 Keyb [00000061 - 00000061] Motherboard resources [00000062 - 00000062] Microsoft ACPI-Compliant Embedded Controller [00000063 - 00000063] Motherboard resources [00000064 - 00000064] Standard 101/102-Key or Microsoft Natural PS/2 Keyb [00000065 - 00000065] Motherboard resources [00000066 - 00000066] Microsoft ACPI-Compliant Embedded Controller [00000067 - 00000067] Motherboard resources Resource Summary Report - Page: 3 [00000070 - 00000077] System CMOS/real time clock [00000080 - 00000080] Motherboard resources [00000081 - 0000008F] Direct memory access controller [00000090 - 00000091] Direct memory access controller [00000092 - 00000092] Motherboard resources [00000093 - 0000009F] Direct memory access controller [000000A0 - 000000A1] Programmable interrupt controller [000000A4 - 000000A5] Programmable interrupt controller [000000A8 - 000000A9] Programmable interrupt controller [000000AC - 000000AD] Programmable interrupt controller [000000B0 - 000000B1] Programmable interrupt controller [000000B4 - 000000B5] Programmable interrupt controller [000000B8 - 000000B9] Programmable interrupt controller [000000BC - 000000BD] Programmable interrupt controller [000000C0 - 000000DF] Direct memory access controller [000000F0 - 000000F0] Numeric data processor [00000170 - 00000177] Secondary IDE Channel [000001F0 - 000001F7] Primary IDE Channel [00000274 - 00000277] ISAPNP Read Data Port [00000279 - 00000279] ISAPNP Read Data Port [00000376 - 00000376] Secondary IDE Channel [00000378 - 0000037F] ECP Printer Port (LPT1) [000003B0 - 000003BB] Intel(R) 82830M Graphics Controller [000003C0 - 000003DF] Intel(R) 82830M Graphics Controller [000003F0 - 000003F5] Standard floppy disk controller [000003F6 - 000003F6] Primary IDE Channel [000003F7 - 000003F7] Standard floppy disk controller [000004D0 - 000004D1] Programmable interrupt controller [00000600 - 0000060F] Motherboard resources [00000700 - 0000070F] Motherboard resources [00000778 - 0000077F] ECP Printer Port (LPT1) [00000A79 - 00000A79] ISAPNP Read Data Port [00000D00 - 0000FFFF] PCI bus [00001000 - 0000107F] Motherboard resources [00001180 - 000011BF] Motherboard resources [00001200 - 0000120F] Motherboard resources [00001800 - 0000181F] Standard Universal PCI to USB Host Controller [00001820 - 0000183F] Standard Universal PCI to USB Host Controller [00001860 - 0000186F] Intel(r) 82801CAM Ultra ATA Storage Controller-248A [00001880 - 0000189F] Intel(R) 82801CA/CAM SMBus Controller - 2483 [000018C0 - 000018FF] Intel(r) 82801CA/CAM AC'97 Audio Controller [00001C00 - 00001CFF] Intel(r) 82801CA/CAM AC'97 Audio Controller *[00002000 - 0000207F] PCI Modem *[00002400 - 000024FF] PCI Modem [00003000 - 0000307F] 3Com 3C920 Integrated Fast Ethernet Controller (3C9 [0000FC00 - 0000FCFF] O2Micro OZ6912 CardBus Controller [0000FD00 - 0000FDFF] O2Micro OZ6912 CardBus Controller [0000FE00 - 0000FE01] Motherboard resources [0000FFF0 - 0000FFFE] Motherboard resources -------------- next part -------------- Dell Inspiron 2650 (NO CRASH) Resource Summary Report - Page: 1 ******************** SYSTEM SUMMARY ******************** Windows Version: Windows 5.1 Service Pack 3 (Build 2600) Registered Owner: Inspiron 2650 Registered Organization: Computer Name: RCTC13 Machine Type: AT/AT COMPATIBLE System BIOS Version: DELL - 6040000 System BIOS Date: 06/04/02 Processor Type: x86 Family 15 Model 2 Stepping 4 Processor Vendor: GenuineIntel Number of Processors: 1 Physical Memory: 255 MB ******************** DISK DRIVE INFO ******************** Drive C: Type: Fixed disk drive Total Space: 29,997,559,808 bytes Free Space: 24,197,402,624 bytes Heads: 255 Cylinders: 3648 Sectors Per Track: 63 Bytes Per Sector: 512 ******************** IRQ SUMMARY ******************** IRQ Usage Summary: (ISA) 0 System timer (ISA) 1 Standard 101/102-Key or Microsoft Natural PS/2 Keyboard (ISA) 6 Standard floppy disk controller (ISA) 8 System CMOS/real time clock (ISA) 9 Microsoft ACPI-Compliant System (PCI) 9 NVIDIA GeForce2 Go (Microsoft Corporation) (PCI) 9 Standard Universal PCI to USB Host Controller (PCI) 9 Standard Universal PCI to USB Host Controller (PCI) 9 3Com 3C920 Integrated Fast Ethernet Controller (3C905C-TX Compat (PCI) 9 O2Micro OZ6912 CardBus Controller (PCI) 9 Intel(r) 82801CA/CAM AC'97 Audio Controller (PCI) 9 AC97 SoftV92 Data Fax Modem (PCI) 10 Intel(R) 82801CA/CAM SMBus Controller - 2483 (ISA) 12 PS/2 Compatible Mouse (ISA) 13 Numeric data processor (ISA) 14 Primary IDE Channel (ISA) 15 Secondary IDE Channel ******************** DMA USAGE SUMMARY ******************** DMA Usage Summary: 1 ECP Printer Port (LPT1) 2 Standard floppy disk controller 4 Direct memory access controller ******************** MEMORY SUMMARY ******************** Memory Usage Summary: [00010000 - 0001FFFF] Motherboard resources [000A0000 - 000BFFFF] PCI bus Resource Summary Report - Page: 2 [000A0000 - 000BFFFF] Intel(R) 82845 Processor to AGP Controller - 1A31 [000A0000 - 000BFFFF] NVIDIA GeForce2 Go (Microsoft Corporation) [000D0000 - 000D3FFF] PCI bus [000D4000 - 000D7FFF] PCI bus [000D8000 - 000DBFFF] PCI bus [000DB000 - 000DBFFF] O2Micro OZ6912 CardBus Controller [10000000 - FEBFFFFF] PCI bus [E0000000 - E7FFFFFF] Intel(R) 82845 Processor to AGP Controller - 1A31 [E0000000 - E0FFFFFF] NVIDIA GeForce2 Go (Microsoft Corporation) [E8000000 - E800007F] 3Com 3C920 Integrated Fast Ethernet Controller (3C9 [EC000000 - EFFFFFFF] Intel(R) 82845 Processor to AGP Controller - 1A31 [F0000000 - F7FFFFFF] Intel(R) 82845 Processor to AGP Controller - 1A31 [F0000000 - F7FFFFFF] NVIDIA GeForce2 Go (Microsoft Corporation) [FABFD000 - FEBFCFFF] O2Micro OZ6912 CardBus Controller [FEBFD000 - FEBFDFFF] O2Micro OZ6912 CardBus Controller [FEBFE000 - FEBFEFFF] O2Micro OZ6912 CardBus Controller [FEBFF800 - FEBFFBFF] Intel(r) 82801CAM Ultra ATA Storage Controller-248A [FEBFFC00 - FEBFFFFF] Motherboard resources [FFF80000 - FFFFFFFF] Motherboard resources ******************** IO PORT SUMMARY ******************** I/O Ports Usage Summary: [00000000 - 00000CF7] PCI bus [00000000 - 0000001F] Direct memory access controller [00000020 - 00000021] Programmable interrupt controller [00000024 - 00000025] Programmable interrupt controller [00000028 - 00000029] Programmable interrupt controller [0000002C - 0000002D] Programmable interrupt controller [0000002E - 0000002F] Motherboard resources [00000030 - 00000031] Programmable interrupt controller [00000034 - 00000035] Programmable interrupt controller [00000038 - 00000039] Programmable interrupt controller [0000003C - 0000003D] Programmable interrupt controller [00000040 - 00000043] System timer [00000050 - 00000053] System timer [00000060 - 00000060] Standard 101/102-Key or Microsoft Natural PS/2 Keyb [00000061 - 00000061] Motherboard resources [00000062 - 00000062] Microsoft ACPI-Compliant Embedded Controller [00000063 - 00000063] Motherboard resources [00000064 - 00000064] Standard 101/102-Key or Microsoft Natural PS/2 Keyb [00000065 - 00000065] Motherboard resources [00000066 - 00000066] Microsoft ACPI-Compliant Embedded Controller [00000067 - 00000067] Motherboard resources [00000070 - 00000077] System CMOS/real time clock [00000080 - 00000080] Motherboard resources [00000081 - 0000008F] Direct memory access controller [00000090 - 00000091] Direct memory access controller [00000092 - 00000092] Motherboard resources [00000093 - 0000009F] Direct memory access controller [000000A0 - 000000A1] Programmable interrupt controller [000000A4 - 000000A5] Programmable interrupt controller [000000A8 - 000000A9] Programmable interrupt controller [000000AC - 000000AD] Programmable interrupt controller [000000B0 - 000000B1] Programmable interrupt controller [000000B4 - 000000B5] Programmable interrupt controller [000000B8 - 000000B9] Programmable interrupt controller [000000BC - 000000BD] Programmable interrupt controller Resource Summary Report - Page: 3 [000000C0 - 000000DF] Direct memory access controller [000000F0 - 000000F0] Numeric data processor [00000170 - 00000177] Secondary IDE Channel [000001F0 - 000001F7] Primary IDE Channel [00000274 - 00000277] ISAPNP Read Data Port [00000279 - 00000279] ISAPNP Read Data Port [00000376 - 00000376] Secondary IDE Channel [00000378 - 0000037F] ECP Printer Port (LPT1) [000003B0 - 000003BB] Intel(R) 82845 Processor to AGP Controller - 1A31 [000003B0 - 000003BB] NVIDIA GeForce2 Go (Microsoft Corporation) [000003C0 - 000003DF] Intel(R) 82845 Processor to AGP Controller - 1A31 [000003C0 - 000003DF] NVIDIA GeForce2 Go (Microsoft Corporation) [000003F0 - 000003F5] Standard floppy disk controller [000003F6 - 000003F6] Primary IDE Channel [000003F7 - 000003F7] Standard floppy disk controller [000004D0 - 000004D1] Programmable interrupt controller [00000600 - 0000060F] Motherboard resources [00000700 - 0000070F] Motherboard resources [00000778 - 0000077F] ECP Printer Port (LPT1) [00000A79 - 00000A79] ISAPNP Read Data Port [00000D00 - 0000FFFF] PCI bus [00001000 - 0000107F] Motherboard resources [00001180 - 000011BF] Motherboard resources [00001200 - 0000120F] Motherboard resources [00001800 - 0000181F] Standard Universal PCI to USB Host Controller [00001820 - 0000183F] Standard Universal PCI to USB Host Controller [00001840 - 0000184F] Intel(r) 82801CAM Ultra ATA Storage Controller-248A [00001860 - 0000187F] Intel(R) 82801CA/CAM SMBus Controller - 2483 [00001880 - 000018BF] Intel(r) 82801CA/CAM AC'97 Audio Controller [00001C00 - 00001CFF] Intel(r) 82801CA/CAM AC'97 Audio Controller [00002000 - 0000207F] AC97 SoftV92 Data Fax Modem [00002400 - 000024FF] AC97 SoftV92 Data Fax Modem [00003000 - 0000307F] 3Com 3C920 Integrated Fast Ethernet Controller (3C9 [0000FC00 - 0000FCFF] O2Micro OZ6912 CardBus Controller [0000FD00 - 0000FDFF] O2Micro OZ6912 CardBus Controller [0000FE00 - 0000FE01] Motherboard resources [0000FFF0 - 0000FFFE] Motherboard resources -------------- next part -------------- Gateway Solo 9300 (CRASH) Resource Summary Report - Page: 1 ******************** SYSTEM SUMMARY ******************** Windows Version: Windows 5.1 Service Pack 3 (Build 2600) Registered Owner: RCR Registered Organization: Computer Name: RCTC16 Machine Type: AT/AT COMPATIBLE System BIOS Version: GATEWA - 20000831 System BIOS Date: 08/31/00 Processor Type: x86 Family 6 Model 8 Stepping 3 Processor Vendor: GenuineIntel Number of Processors: 1 Physical Memory: 160 MB ******************** DISK DRIVE INFO ******************** Drive C: Type: Fixed disk drive Total Space: 20,003,848,192 bytes Free Space: 12,853,624,832 bytes Heads: 255 Cylinders: 2432 Sectors Per Track: 63 Bytes Per Sector: 512 ******************** IRQ SUMMARY ******************** IRQ Usage Summary: (ISA) 0 System timer (ISA) 1 Standard 101/102-Key or Microsoft Natural PS/2 Keyboard (ISA) 4 Communications Port (COM1) (PCI) 5 Intel(r) 82371AB/EB PCI to USB Universal Host Controller (PCI) 5 ESS Maestro2E PCI AudioDrive (WDM) (ISA) 5 MPU-401 Compatible MIDI Device (PCI) 5 Texas Instruments OHCI Compliant IEEE 1394 Host Controller (ISA) 6 Standard floppy disk controller (ISA) 8 System CMOS/real time clock (ISA) 9 Microsoft ACPI-Compliant System (PCI) 9 ATI RAGE Mobility (PCI) 9 Lucent Win Modem (PCI) 9 Texas Instruments PCI-4450 CardBus Controller (PCI) 9 Texas Instruments PCI-4450 CardBus Controller (ISA) 11 Instant Wireless Network PC Card V3.0 (ISA) 12 PS/2 Compatible Mouse (ISA) 13 Numeric data processor (ISA) 14 Primary IDE Channel (ISA) 15 Secondary IDE Channel ******************** DMA USAGE SUMMARY ******************** DMA Usage Summary: 2 Standard floppy disk controller 4 Direct memory access controller ******************** MEMORY SUMMARY ******************** Memory Usage Summary: [000A0000 - 000BFFFF] PCI bus Resource Summary Report - Page: 2 [000A0000 - 000BFFFF] Intel 82443BX Pentium(R) II Processor to AGP Contro [000A0000 - 000BFFFF] ATI RAGE Mobility [000D0000 - 000D3FFF] PCI bus [000D4000 - 000D7FFF] PCI bus [000D8000 - 000DBFFF] PCI bus [000DC000 - 000DFFFF] PCI bus [000DE000 - 000DEFFF] Texas Instruments PCI-4450 CardBus Controller [000DF000 - 000DFFFF] Texas Instruments PCI-4450 CardBus Controller [0A000000 - FFDFFFFF] PCI bus [EC000000 - EFFFFFFF] Texas Instruments PCI-4450 CardBus Controller [F0000000 - F3FFFFFF] Texas Instruments PCI-4450 CardBus Controller [F4000000 - F4003FFF] Texas Instruments OHCI Compliant IEEE 1394 Host Con [F4004000 - F40047FF] Texas Instruments OHCI Compliant IEEE 1394 Host Con [F4004800 - F40048FF] Lucent Win Modem [F4100000 - F5FFFFFF] Intel 82443BX Pentium(R) II Processor to AGP Contro [F4100000 - F4100FFF] ATI RAGE Mobility [F5000000 - F5FFFFFF] ATI RAGE Mobility [F8000000 - FBFFFFFF] Intel 82443BX Pentium(R) II Processor to AGP Contro [FFDFC000 - FFDFCFFF] Texas Instruments PCI-4450 CardBus Controller [FFDFD000 - FFDFDFFF] Texas Instruments PCI-4450 CardBus Controller [FFDFE000 - FFDFEFFF] Texas Instruments PCI-4450 CardBus Controller [FFDFF000 - FFDFFFFF] Texas Instruments PCI-4450 CardBus Controller [FFF80000 - FFFFFFFF] Motherboard resources ******************** IO PORT SUMMARY ******************** I/O Ports Usage Summary: [00000000 - 00000CF7] PCI bus [00000000 - 0000000F] Direct memory access controller [00000010 - 0000001F] Motherboard resources [00000020 - 00000021] EISA programmable interrupt controller [00000024 - 00000025] Motherboard resources [00000028 - 00000029] Motherboard resources [0000002C - 0000002D] Motherboard resources [00000038 - 00000039] Motherboard resources [0000003C - 0000003D] Motherboard resources [00000040 - 00000043] System timer [00000050 - 00000053] Motherboard resources [00000060 - 00000060] Standard 101/102-Key or Microsoft Natural PS/2 Keyb [00000061 - 00000061] System speaker [00000062 - 00000062] Microsoft ACPI-Compliant Embedded Controller [00000064 - 00000064] Standard 101/102-Key or Microsoft Natural PS/2 Keyb [00000066 - 00000066] Microsoft ACPI-Compliant Embedded Controller [00000070 - 00000071] System CMOS/real time clock [00000072 - 00000077] Motherboard resources [00000080 - 00000080] Motherboard resources [00000081 - 0000008F] Direct memory access controller [00000090 - 0000009F] Motherboard resources [000000A0 - 000000A1] EISA programmable interrupt controller [000000A4 - 000000A5] Motherboard resources [000000A8 - 000000A9] Motherboard resources [000000AC - 000000AD] Motherboard resources [000000B0 - 000000B5] Motherboard resources [000000B8 - 000000B9] Motherboard resources [000000BC - 000000BD] Motherboard resources [000000C0 - 000000DF] Direct memory access controller [000000E4 - 000000E4] Motherboard resources [000000F0 - 000000FF] Numeric data processor Resource Summary Report - Page: 3 [00000170 - 00000177] Secondary IDE Channel [000001F0 - 000001F7] Primary IDE Channel [00000200 - 00000207] Standard Game Port [00000274 - 00000277] ISAPNP Read Data Port [00000279 - 00000279] ISAPNP Read Data Port [00000330 - 00000331] MPU-401 Compatible MIDI Device [00000376 - 00000376] Secondary IDE Channel [00000378 - 0000037F] Printer Port (LPT1) [00000398 - 00000399] Motherboard resources [000003B0 - 000003BB] Intel 82443BX Pentium(R) II Processor to AGP Contro [000003B0 - 000003BB] ATI RAGE Mobility [000003C0 - 000003DF] Intel 82443BX Pentium(R) II Processor to AGP Contro [000003C0 - 000003DF] ATI RAGE Mobility [000003F0 - 000003F5] Standard floppy disk controller [000003F6 - 000003F6] Primary IDE Channel [000003F7 - 000003F7] Standard floppy disk controller [000003F8 - 000003FF] Communications Port (COM1) [000004D0 - 000004D1] EISA programmable interrupt controller [00000A79 - 00000A79] ISAPNP Read Data Port [00000D00 - 0000FFFF] PCI bus [00001020 - 0000102F] Intel(r) 82371AB/EB PCI Bus Master IDE Controller [00001030 - 00001037] Lucent Win Modem [00001040 - 0000104F] Motherboard resources [00001400 - 000014FF] ESS Maestro2E PCI AudioDrive (WDM) [00001800 - 000018FF] Lucent Win Modem [00008000 - 00008047] Motherboard resources [00009000 - 00009FFF] Intel 82443BX Pentium(R) II Processor to AGP Contro [00009000 - 000090FF] ATI RAGE Mobility [0000FA00 - 0000FAFF] Texas Instruments PCI-4450 CardBus Controller [0000FC00 - 0000FCFF] Texas Instruments PCI-4450 CardBus Controller [0000FD00 - 0000FDFF] Texas Instruments PCI-4450 CardBus Controller [0000FE00 - 0000FEFF] Texas Instruments PCI-4450 CardBus Controller [0000FF40 - 0000FF7F] Instant Wireless Network PC Card V3.0 [0000FFE0 - 0000FFFF] Intel(r) 82371AB/EB PCI to USB Universal Host Contr From baggett.patrick@REDACTED Sat Jul 2 09:00:56 2011 From: baggett.patrick@REDACTED (Patrick Baggett) Date: Sat, 2 Jul 2011 02:00:56 -0500 Subject: [erlang-bugs] R14B02+ crashes on older hardware, Windows XP In-Reply-To: References: Message-ID: The attached logged are pretty much useless. They are more or less hardware specs, but they don't even say the reason the program crashed (e.g. segfault, bus error, invalid insn, etc.) That error dialog that you have a screenshot of: try clicking the blue underlined link "click here" and reading the crash code. It will be 8 hex digits, usually beginning with C000, for example, C000001D is "illegal instruction" which can occur in an older CPU tries to execute newer instructions. Patrick On Fri, Jul 1, 2011 at 11:29 PM, sgm wrote: > We have a field data collection application recently re-written to use > CouchDB. It requires minimal computer resources, so a number of the > notebooks we use are circa 2001/2002. All run Windows XP with SP2 or > SP3, and we are using CouchDB 1.1. > > On the older machines, Erlang R14B02 and R14B03 crash almost > immediately upon running werl or erl. R14B01 does not. > > I'm attaching a screenshot of the crash on one of the machines. In all > cases it happens at the same point, almost immediately, is 100% > reproducible, and no crash dump is generated. > > Here are the machines where it crashes: > > Dell Inspiron 2500, 1.0GHz Pentium III, 160MB RAM, system summary > rctc11.txt attached > Dell Inspiron 2600, 1.06GHz Celeron, 128MB RAM, system summary > rctc12.txt attached > Gateway Solo 9300, 750MHz Pentium III, 160MB RAM, system summary > rctc16.txt attached > > For comparison, I'm also including this machine of similar vintage > which does NOT crash: > > Dell Inspiron 2650, 1.7GHz Pentium 4, 256MB RAM, system summary > rctc13.txt attached > > Please let me know if you need more information or if there is > anything you'd like me to try. Thanks, > > Steve > > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://erlang.org/mailman/listinfo/erlang-bugs > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikpe@REDACTED Sat Jul 2 12:52:49 2011 From: mikpe@REDACTED (Mikael Pettersson) Date: Sat, 2 Jul 2011 12:52:49 +0200 Subject: [erlang-bugs] R14B02+ crashes on older hardware, Windows XP In-Reply-To: References: Message-ID: <19982.63617.186592.418344@pilspetsen.it.uu.se> sgm writes: > We have a field data collection application recently re-written to use > CouchDB. It requires minimal computer resources, so a number of the > notebooks we use are circa 2001/2002. All run Windows XP with SP2 or > SP3, and we are using CouchDB 1.1. > > On the older machines, Erlang R14B02 and R14B03 crash almost > immediately upon running werl or erl. R14B01 does not. > > I'm attaching a screenshot of the crash on one of the machines. In all > cases it happens at the same point, almost immediately, is 100% > reproducible, and no crash dump is generated. > > Here are the machines where it crashes: > > Dell Inspiron 2500, 1.0GHz Pentium III, 160MB RAM, system summary > rctc11.txt attached > Dell Inspiron 2600, 1.06GHz Celeron, 128MB RAM, system summary > rctc12.txt attached > Gateway Solo 9300, 750MHz Pentium III, 160MB RAM, system summary > rctc16.txt attached > > For comparison, I'm also including this machine of similar vintage > which does NOT crash: > > Dell Inspiron 2650, 1.7GHz Pentium 4, 256MB RAM, system summary > rctc13.txt attached You need to rebuild the Erlang VM with the --enable-ethread-pre-pentium4-compatibility option. This is a big ugly bug in the Erlang VM. From dave@REDACTED Sat Jul 2 13:44:22 2011 From: dave@REDACTED (Dave Cottlehuber) Date: Sat, 2 Jul 2011 23:44:22 +1200 Subject: [erlang-bugs] R14B02+ crashes on older hardware, Windows XP In-Reply-To: <19982.63617.186592.418344@pilspetsen.it.uu.se> References: <19982.63617.186592.418344@pilspetsen.it.uu.se> Message-ID: On 2 July 2011 22:52, Mikael Pettersson wrote: > sgm writes: > ?> We have a field data collection application recently re-written to use > ?> CouchDB. It requires minimal computer resources, so a number of the > ?> notebooks we use are circa 2001/2002. All run Windows XP with SP2 or > ?> SP3, and we are using CouchDB 1.1. > ?> > ?> On the older machines, Erlang R14B02 and R14B03 crash almost > ?> immediately upon running werl or erl. R14B01 does not. > ?> > ?> I'm attaching a screenshot of the crash on one of the machines. In all > ?> cases it happens at the same point, almost immediately, is 100% > ?> reproducible, and no crash dump is generated. > ?> > ?> Here are the machines where it crashes: > ?> > ?> Dell Inspiron 2500, 1.0GHz Pentium III, 160MB RAM, system summary > ?> rctc11.txt attached > ?> Dell Inspiron 2600, 1.06GHz Celeron, 128MB RAM, system summary > ?> rctc12.txt attached > ?> Gateway Solo 9300, 750MHz Pentium III, 160MB RAM, system summary > ?> rctc16.txt attached > ?> > ?> For comparison, I'm also including this machine of similar vintage > ?> which does NOT crash: > ?> > ?> Dell Inspiron 2650, 1.7GHz Pentium 4, 256MB RAM, system summary > ?> rctc13.txt attached > > You need to rebuild the Erlang VM with the --enable-ethread-pre-pentium4-compatibility > option. > > This is a big ugly bug in the Erlang VM. Mikael, Thanks for the info. Is there any performance impact with using this flag, on newer processors/architectures? Steve, I'm wondering which CouchDB build you are using in case its one of mine. Feel free to contact me offlist. A+ Dave From mikpe@REDACTED Sat Jul 2 14:03:00 2011 From: mikpe@REDACTED (Mikael Pettersson) Date: Sat, 2 Jul 2011 14:03:00 +0200 Subject: [erlang-bugs] R14B02+ crashes on older hardware, Windows XP In-Reply-To: References: <19982.63617.186592.418344@pilspetsen.it.uu.se> Message-ID: <19983.2292.892536.41169@pilspetsen.it.uu.se> Dave Cottlehuber writes: > On 2 July 2011 22:52, Mikael Pettersson wrote: > > sgm writes: > > ?> We have a field data collection application recently re-written to use > > ?> CouchDB. It requires minimal computer resources, so a number of the > > ?> notebooks we use are circa 2001/2002. All run Windows XP with SP2 or > > ?> SP3, and we are using CouchDB 1.1. > > ?> > > ?> On the older machines, Erlang R14B02 and R14B03 crash almost > > ?> immediately upon running werl or erl. R14B01 does not. > > ?> > > ?> I'm attaching a screenshot of the crash on one of the machines. In all > > ?> cases it happens at the same point, almost immediately, is 100% > > ?> reproducible, and no crash dump is generated. > > ?> > > ?> Here are the machines where it crashes: > > ?> > > ?> Dell Inspiron 2500, 1.0GHz Pentium III, 160MB RAM, system summary > > ?> rctc11.txt attached > > ?> Dell Inspiron 2600, 1.06GHz Celeron, 128MB RAM, system summary > > ?> rctc12.txt attached > > ?> Gateway Solo 9300, 750MHz Pentium III, 160MB RAM, system summary > > ?> rctc16.txt attached > > ?> > > ?> For comparison, I'm also including this machine of similar vintage > > ?> which does NOT crash: > > ?> > > ?> Dell Inspiron 2650, 1.7GHz Pentium 4, 256MB RAM, system summary > > ?> rctc13.txt attached > > > > You need to rebuild the Erlang VM with the --enable-ethread-pre-pentium4-compatibility > > option. > > > > This is a big ugly bug in the Erlang VM. > > Mikael, > > Thanks for the info. Is there any performance impact with using this > flag, on newer processors/architectures? Presumably yes (it affects the use of *fence instructions in barriers, and some other minor things), but I don't have any data about the performance impact. Rickard Green @ OTP might now. From sgmentzer@REDACTED Sat Jul 2 20:38:44 2011 From: sgmentzer@REDACTED (sgm) Date: Sat, 2 Jul 2011 14:38:44 -0400 Subject: [erlang-bugs] R14B02+ crashes on older hardware, Windows XP In-Reply-To: <19982.63617.186592.418344@pilspetsen.it.uu.se> References: <19982.63617.186592.418344@pilspetsen.it.uu.se> Message-ID: On Sat, Jul 2, 2011 at 6:52 AM, Mikael Pettersson wrote: > sgm writes: > ?> We have a field data collection application recently re-written to use > ?> CouchDB. It requires minimal computer resources, so a number of the > ?> notebooks we use are circa 2001/2002. All run Windows XP with SP2 or > ?> SP3, and we are using CouchDB 1.1. > ?> > ?> On the older machines, Erlang R14B02 and R14B03 crash almost > ?> immediately upon running werl or erl. R14B01 does not. > ?> > ?> I'm attaching a screenshot of the crash on one of the machines. In all > ?> cases it happens at the same point, almost immediately, is 100% > ?> reproducible, and no crash dump is generated. > ?> > ?> Here are the machines where it crashes: > ?> > ?> Dell Inspiron 2500, 1.0GHz Pentium III, 160MB RAM, system summary > ?> rctc11.txt attached > ?> Dell Inspiron 2600, 1.06GHz Celeron, 128MB RAM, system summary > ?> rctc12.txt attached > ?> Gateway Solo 9300, 750MHz Pentium III, 160MB RAM, system summary > ?> rctc16.txt attached > ?> > ?> For comparison, I'm also including this machine of similar vintage > ?> which does NOT crash: > ?> > ?> Dell Inspiron 2650, 1.7GHz Pentium 4, 256MB RAM, system summary > ?> rctc13.txt attached > > You need to rebuild the Erlang VM with the --enable-ethread-pre-pentium4-compatibility > option. > > This is a big ugly bug in the Erlang VM. > Thanks Mikael, I suspected it was a CPU-related issue. You say it's a bug, but the documented option implies it's intentional. Are you suggesting the VM should detect the CPU at startup and load the appropriate library? Dave - Yes, we're using this build of yours github.com/downloads/dch/couchdb/setup-couchdb-1.1.0+COUCHDB-1152_otp_R14B03.exe. Switching to this one setup-couchdb-1.1.0+COUCHDB-1152_otp_R14B01+OTP-9139.exe works, although we get sporadic Futon test suite failures. However, the failed test usually works when we re-run it individually. Haven't done much testing of our application yet. Thanks for posting these builds! Steve From mikpe@REDACTED Sat Jul 2 21:38:03 2011 From: mikpe@REDACTED (Mikael Pettersson) Date: Sat, 2 Jul 2011 21:38:03 +0200 Subject: [erlang-bugs] R14B02+ crashes on older hardware, Windows XP In-Reply-To: References: <19982.63617.186592.418344@pilspetsen.it.uu.se> Message-ID: <19983.29595.283480.639739@pilspetsen.it.uu.se> sgm writes: > On Sat, Jul 2, 2011 at 6:52 AM, Mikael Pettersson wrote: > > sgm writes: > > ?> We have a field data collection application recently re-written to use > > ?> CouchDB. It requires minimal computer resources, so a number of the > > ?> notebooks we use are circa 2001/2002. All run Windows XP with SP2 or > > ?> SP3, and we are using CouchDB 1.1. > > ?> > > ?> On the older machines, Erlang R14B02 and R14B03 crash almost > > ?> immediately upon running werl or erl. R14B01 does not. > > ?> > > ?> I'm attaching a screenshot of the crash on one of the machines. In all > > ?> cases it happens at the same point, almost immediately, is 100% > > ?> reproducible, and no crash dump is generated. > > ?> > > ?> Here are the machines where it crashes: > > ?> > > ?> Dell Inspiron 2500, 1.0GHz Pentium III, 160MB RAM, system summary > > ?> rctc11.txt attached > > ?> Dell Inspiron 2600, 1.06GHz Celeron, 128MB RAM, system summary > > ?> rctc12.txt attached > > ?> Gateway Solo 9300, 750MHz Pentium III, 160MB RAM, system summary > > ?> rctc16.txt attached > > ?> > > ?> For comparison, I'm also including this machine of similar vintage > > ?> which does NOT crash: > > ?> > > ?> Dell Inspiron 2650, 1.7GHz Pentium 4, 256MB RAM, system summary > > ?> rctc13.txt attached > > > > You need to rebuild the Erlang VM with the --enable-ethread-pre-pentium4-compatibility > > option. > > > > This is a big ugly bug in the Erlang VM. > > > > Thanks Mikael, I suspected it was a CPU-related issue. You say it's a > bug, but the documented option implies it's intentional. Are you > suggesting the VM should detect the CPU at startup and load the > appropriate library? The bug is that the default is unsafe. It would have been far better to maintain compatibility by default, but offer an opt-in option for enabling higher performance. It's not a matter of selecting the right version of some small library, the option affects micro-optimized instruction sequences for synchronization, which are visible to and potentially inlined in many parts of the VM. From baggett.patrick@REDACTED Sat Jul 2 21:40:01 2011 From: baggett.patrick@REDACTED (Patrick Baggett) Date: Sat, 2 Jul 2011 14:40:01 -0500 Subject: [erlang-bugs] R14B02+ crashes on older hardware, Windows XP In-Reply-To: <19983.29595.283480.639739@pilspetsen.it.uu.se> References: <19982.63617.186592.418344@pilspetsen.it.uu.se> <19983.29595.283480.639739@pilspetsen.it.uu.se> Message-ID: aren't mfence/sfence instructions only really useful in SMP systems where visibility of load/stores with respect to other CPUs is required? On Sat, Jul 2, 2011 at 2:38 PM, Mikael Pettersson wrote: > sgm writes: > > On Sat, Jul 2, 2011 at 6:52 AM, Mikael Pettersson > wrote: > > > sgm writes: > > > > We have a field data collection application recently re-written to > use > > > > CouchDB. It requires minimal computer resources, so a number of the > > > > notebooks we use are circa 2001/2002. All run Windows XP with SP2 > or > > > > SP3, and we are using CouchDB 1.1. > > > > > > > > On the older machines, Erlang R14B02 and R14B03 crash almost > > > > immediately upon running werl or erl. R14B01 does not. > > > > > > > > I'm attaching a screenshot of the crash on one of the machines. In > all > > > > cases it happens at the same point, almost immediately, is 100% > > > > reproducible, and no crash dump is generated. > > > > > > > > Here are the machines where it crashes: > > > > > > > > Dell Inspiron 2500, 1.0GHz Pentium III, 160MB RAM, system summary > > > > rctc11.txt attached > > > > Dell Inspiron 2600, 1.06GHz Celeron, 128MB RAM, system summary > > > > rctc12.txt attached > > > > Gateway Solo 9300, 750MHz Pentium III, 160MB RAM, system summary > > > > rctc16.txt attached > > > > > > > > For comparison, I'm also including this machine of similar vintage > > > > which does NOT crash: > > > > > > > > Dell Inspiron 2650, 1.7GHz Pentium 4, 256MB RAM, system summary > > > > rctc13.txt attached > > > > > > You need to rebuild the Erlang VM with the > --enable-ethread-pre-pentium4-compatibility > > > option. > > > > > > This is a big ugly bug in the Erlang VM. > > > > > > > Thanks Mikael, I suspected it was a CPU-related issue. You say it's a > > bug, but the documented option implies it's intentional. Are you > > suggesting the VM should detect the CPU at startup and load the > > appropriate library? > > The bug is that the default is unsafe. It would have been far better > to maintain compatibility by default, but offer an opt-in option for > enabling higher performance. > > It's not a matter of selecting the right version of some small library, > the option affects micro-optimized instruction sequences for > synchronization, > which are visible to and potentially inlined in many parts of the VM. > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://erlang.org/mailman/listinfo/erlang-bugs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From majek04@REDACTED Wed Jul 6 13:06:14 2011 From: majek04@REDACTED (Marek Majkowski) Date: Wed, 6 Jul 2011 12:06:14 +0100 Subject: [erlang-bugs] LATEST.LOG grows without limits on a Mnesia node which stores only RAM tables Message-ID: In some cases, on a two-node erlang cluster, LATEST.LOG grows and isn't collected on a node which handles only ram mnesia tables. LATEST.LOG seems to contain only transaction metadata, like: $ mnesia_log:view(). {decision,{tid,32746729,<7505.131.0>},committed,[],[rbt2@REDACTED]} {decision,{tid,32746731,<7505.133.0>}, unclear, [rbt1@REDACTED], [rbt2@REDACTED]} {decision,{tid,32746731,<7505.133.0>}, committed, [rbt1@REDACTED], [rbt2@REDACTED]} I was able to reproduce this situation on stock Ubuntu R13B03 and R14B01. In order to trigger this behaviour a transaction needs to span across two tables, one of them needs to be ram/ram, the other disc/ram. Like: [*] uno: [{a@REDACTED,disc_copies},{b@REDACTED,ram_copies}] [*] duo: [{a@REDACTED,ram_copies},{b@REDACTED,ram_copies}] G = fun() -> mnesia:delete({uno, a}), mnesia:delete({duo, a}) end, mnesia:transaction(G), (record 'a' doesn't even need to be in the tables, so this deletion is essentially a no-op) In this case, LATEST.LOG on a node b@REDACTED (which doesn't have any disc_copies table) will grow without bounds: $ ls -la Mnesia.b@REDACTED/ total 172104 154 DECISION_TAB.LOG 176211786 LATEST.LOG 7233 schema.DAT See attached code for a full test case. Cheers, Marek Majkowski -------------- next part -------------- A non-text attachment was scrubbed... Name: a.erl Type: text/x-erlang Size: 1311 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: b.erl Type: text/x-erlang Size: 924 bytes Desc: not available URL: From majek04@REDACTED Wed Jul 6 13:33:34 2011 From: majek04@REDACTED (Marek Majkowski) Date: Wed, 6 Jul 2011 12:33:34 +0100 Subject: [erlang-bugs] LATEST.LOG grows without limits on a Mnesia node which stores only RAM tables In-Reply-To: References: Message-ID: On Wed, Jul 6, 2011 at 12:06, Marek Majkowski wrote: > I was able to reproduce this situation on stock Ubuntu R13B03 and R14B01. The same thing happens on R14B03. From dgud@REDACTED Wed Jul 6 14:24:11 2011 From: dgud@REDACTED (Dan Gudmundsson) Date: Wed, 6 Jul 2011 14:24:11 +0200 Subject: [erlang-bugs] LATEST.LOG grows without limits on a Mnesia node which stores only RAM tables In-Reply-To: References: Message-ID: <4E1453EB.5050601@erix.ericsson.se> Thanks will have a look at it. /Dan On 07/06/2011 01:33 PM, Marek Majkowski wrote: > On Wed, Jul 6, 2011 at 12:06, Marek Majkowski wrote: >> I was able to reproduce this situation on stock Ubuntu R13B03 and R14B01. > > The same thing happens on R14B03. > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://erlang.org/mailman/listinfo/erlang-bugs > From alex.demidenko@REDACTED Thu Jul 7 15:17:39 2011 From: alex.demidenko@REDACTED (Alexander Demidenko) Date: Thu, 7 Jul 2011 20:17:39 +0700 Subject: [erlang-bugs] erl_parse, different argument processing for "-module" and "-import" Message-ID: Hi, friends! Module erl_parse have different AST processing for "-module" and "-include" directive. This bug tested on erlang 13B03, 13B04 and 14B03. Bug demonstration: Erlang R13B03 (erts-5.7.4) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [hipe] [kernel-poll:false] Eshell V5.7.4 ?(abort with ^G) 1> Str2AST = fun (S) -> {ok, Tokens, _} = erl_scan:string(S), {ok, R} = erl_parse:parse_form(Tokens), R end. #Fun 2> AST1 = Str2AST("-import(m)."). {attribute,1,import,[m]} Look at module name in result. You can see list of atoms: [m]. But they must be list only for complex module name (for example: -import(namespace.m)) Continue... 3> {Tree, _} = erl_syntax_lib:mapfold(fun (T, Acc) -> {T, Acc} end, [], AST1). {{tree,attribute, ? ? ? ?{attr,1,[],none}, ? ? ? ?{attribute,{tree,atom,{attr,1,[],none},import}, ? ? ? ? ? ? ? ? ? [{tree,qualified_name, ? ? ? ? ? ? ? ? ? ? ? ? ?{attr,0,[],none}, ? ? ? ? ? ? ? ? ? ? ? ? ?[{tree,atom,{attr,0,[],none},m}]}]}}, ?[]} 4> AST2 = erl_syntax:revert(Tree). {attribute,1,import,m} 5> AST1 == AST2. false Ops, magic, inside AST2, module name is atom! But if we try run example with "-module(m)", everything ok. We have module name like atom in anyway. 6> AST3 = Str2AST("-module(m)."). {attribute,1,module,m} Ok, now lets look at source of erl_parse: Part of import processing (should be fixed): build_attribute({atom,La,import}, Val) -> ? ? case Val of ? ? [Name] -> ? ? ? ? case package_segments(Name) of ? ?% <--- Here we always take list ? ? ? ? error -> ? ? ? ? ? ? error_bad_decl(La, import); ? ? ? ? Module -> ? ? ? ? ? ? {attribute,La,import,Module} ? ? ?% <--- as result we have list of atom, like [module_name] ? ? ? ? end; ? ? [{atom,_Lm,Mod},ImpList] -> ? ? ? ? {attribute,La,import,{Mod,farity_list(ImpList)}}; ? ? [Name, ImpList] -> ? ? ? ? case package_segments(Name) of ? ? ? ? error -> ? ? ? ? ? ? error_bad_decl(La, import); ? ? ? ? Module -> ? ? ? ? ? ? {attribute,La,import,{Module,farity_list(ImpList)}} ? ? ? ? end; ? ? _Other -> error_bad_decl(La, import) ? ? end; Part of module processing (correct version): build_attribute({atom,La,module}, Val) -> ? ? case Val of ? ? [{atom,_Lm,Module}] -> ? ? ? ? ? ? ? ? ? ?% <--- I think, we must have same special case clause for 'import' version of build_attribute() ? ? ? ? {attribute,La,module,Module}; ? ? [{atom,_Lm,Module},ExpList] -> ? ? ? ? {attribute,La,module,{Module,var_list(ExpList)}}; ? ? [Name] -> ? ? ? ? case package_segments(Name) of ? ? ? ? error -> ? ? ? ? ? ? error_bad_decl(La, module); ? ? ? ? Module -> ? ? ? ? ? ? {attribute,La,module,Module} ? ? ? ? end; ? ? [Name,ExpList] -> ? ? ? ? case package_segments(Name) of ? ? ? ? error -> ? ? ? ? ? ? error_bad_decl(La, module); ? ? ? ? Module -> ? ? ? ? ? ? {attribute,La,module,{Module,var_list(ExpList)}} ? ? ? ? end; ? ? _Other -> ? ? ? ? error_bad_decl(La, module) ? ? end; -- --------------------------------------------- With best regards, Alexander. From majek04@REDACTED Thu Jul 7 16:57:23 2011 From: majek04@REDACTED (Marek Majkowski) Date: Thu, 7 Jul 2011 15:57:23 +0100 Subject: [erlang-bugs] io:format causes whole Erlang VM to hang on slow stdout Message-ID: Erlang VM hangs if no one is picking up data from stdout. Or in other words: io:format causes a blocking writev() system call from within a main process. If writev() hangs - whole erlang vm hangs. See the attached testcase: mkfifo b ./erlang-stdout-hangs.erl > b ## the program won't run until we start listeninig from the fifo ## so in new console: cat b You should be able to see 'ping' messages flowing. After a while, suspend cat, by CONTROL+Z. Erlang will continue printing "ping" for a while, until fifo buffer fills. When fifo buffer fills, the whole erlang VM will stop. Strace proves that the main thread is blocked: writev(1, [{"", 0}, {"erlang sucks<<\"payloadpayloadpay"..., 96}], 2) = ? ERESTARTSYS (To be restarted) Although the test program disables smp (-smp disable), it's possible to block the smp erlang - you just need to do io:format from multiple erlang processes. Tested on R14B03. Cheers, Marek Majkowski -------------- next part -------------- A non-text attachment was scrubbed... Name: erlang-stdout-hangs.erl Type: text/x-erlang Size: 384 bytes Desc: not available URL: From essen@REDACTED Tue Jul 12 18:27:21 2011 From: essen@REDACTED (=?ISO-8859-1?Q?Lo=EFc_Hoguin?=) Date: Tue, 12 Jul 2011 18:27:21 +0200 Subject: [erlang-bugs] [erlang-questions] inet.erl socket_setopt type incomplete In-Reply-To: <4E15FE64.9010709@2600hz.com> References: <4E15FE64.9010709@2600hz.com> Message-ID: <4E1C75E9.4050000@dev-extend.eu> This probably should be in erlang-bugs@ instead. I confirm having seen this issue before too. On 07/07/2011 08:43 PM, James Aimonetti wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > In R14B03, the type socket_setopt() in inet.erl does not allow for the > convenience options 'binary' and 'list' (which internally get translated > to {'mode', 'binary' | 'list'} which *is* in the type), and this causes > Dialyzer to complain about inet:setopts(Socket, [{active, once}, > binary]) (in my case). > > Setting the options list to [{active, once}, {mode, binary}] alleviates > the Dialyzer warning but doesn't reflect what the function actually allows. > > - -- > James Aimonetti > Distributed Systems Engineer / DJ MC_ > > 2600hz | http://2600hz.com > sip:james@REDACTED > tel: 415.886.7905 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQEcBAEBAgAGBQJOFf5kAAoJENc77s1OYoGgCAsH/3avCJlBdnJ0c78naoclMWre > +AC9amjmTrVCkp6dg5mkCnMFsGpImCba171qMx3005pVS/e123px+6ek86cda9Gy > rhIusElV8TR6r08QNzcbcdEHW89vbzYN6Gmc0AhnJX1gS6yBQ6vhn9tH3HxgaroZ > N3VZCUAuyKaun2sWii7WfI0LdtxmWBxsZmUnpywPZhNOFm9A0hyY1rH533y+KIKJ > kfleH3iO2E4tasE9U8eRNX2E9+fM00sXlVE84RUxVAonMcRTZyqBFxBa3nRStgii > ShClwNH3CXnRiCgUgZhu6bW7Zd1Umq7Ru3gRRxcJTrTMJ2T8MfsD8EQ8/rgtVhw= > =qgkH > -----END PGP SIGNATURE----- > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -- Lo?c Hoguin Dev:Extend From zma@REDACTED Wed Jul 13 11:18:48 2011 From: zma@REDACTED (=?UTF-8?B?0JfRgNCw0LbQtdCy0YHQutC40Lkg0JzQsNC60YHQuNC8INCQ0LvQtdC60YE=?= =?UTF-8?B?0LDQvdC00YDQvtCy0LjRhw==?=) Date: Wed, 13 Jul 2011 13:18:48 +0400 Subject: [erlang-bugs] asn1ct compiler bug with parametrized types Message-ID: <4E1D62F8.4000909@sp-sys.ru> Hi, I found the strange bug when compiling ASN.1 specification: T DEFINITIONS IMPLICIT TAGS ::= BEGIN Sub{Type} ::= SEQUENCE { val Type } Base{Type, TypeExt} ::= CHOICE { v1 [0] Type, v2 [1] TypeExt, v3 [2] Sub{Type} } -- Impl ::= Base{INTEGER, REAL} -- Hangup asn1 compiler SubOk{TypeOk} ::= SEQUENCE { val TypeOk } BaseOk{Type, TypeExt} ::= CHOICE { v1 [0] Type, v2 [1] TypeExt, v3 [2] SubOk{Type} } Impl1 ::= BaseOk{INTEGER, REAL} END From mmzeeman@REDACTED Wed Jul 13 14:28:05 2011 From: mmzeeman@REDACTED (mmzeeman@REDACTED) Date: Wed, 13 Jul 2011 14:28:05 +0200 Subject: [erlang-bugs] inets httpc cookie parsing bug Message-ID: <6af6849243417bd017429ddaed0cb093.squirrel@webmail.xs4all.nl> Some servers use expire dates which look different. This sometimes causes the inets httpc client to fail. For instance: 1> application:start(inets). 2> httpc:set_options([{cookies, enabled}]). 3> httpc:request("http://www.amazon.com"). Fails with a function_clause exception. The expiry date used here looks like this: Tue Jan 01 08:00:01 2036 GMT Looking at the most recent specification regarding cookies (rfc-6265) the current format is described and quite flexible. The spec also states that if an error occurs during parsing of the date it should be ignored. Now what is the correct way to fix this? Ignoring parsing errors can be done easily. %% Backwards compatibility with netscape cookies cookie_attributes([{"expires", Value}| Attributes], Cookie) -> try http_util:convert_netscapecookie_date(Value) of Time -> ExpireTime = calendar:datetime_to_gregorian_seconds(Time), cookie_attributes(Attributes, Cookie#http_cookie{max_age = ExpireTime}) catch _:_ -> cookie_attributes(Attributes, Cookie) end; Maas From pguyot@REDACTED Sat Jul 16 19:18:26 2011 From: pguyot@REDACTED (Paul Guyot) Date: Sat, 16 Jul 2011 19:18:26 +0200 Subject: [erlang-bugs] dialyzer does not like queue:out Message-ID: Hello, Dialyzer seems to consider that the second element of the output of queue:out/1 is not a queue. The following code reproduces the error: -------------------------- -module(dialyzer_queue). -export([f/1]). -record(rec, { q :: queue() }). -spec f(#rec{}) -> ok. f(Rec) -> case g(Rec) of {ok, _Value, _NewRec} -> ok; {none, _NewRec} -> ok end. g(#rec{q = Queue} = Rec) -> case queue:out(Queue) of {empty, _} -> {none, Rec}; {{value, Elem}, NewQueue} -> {ok, Elem, #rec{q = NewQueue}} end. -------------------------- Dialyzer will say: dialyzer_queue.erl:11: The pattern {'ok', _Value, _NewRec} can never match the type {'none',#rec{q::queue()}} The error disappears if g returns {ok, Elem, Rec} instead of {ok, Elem, #rec{q = NewQueue}}, or if rec.q is typed as any(). Paul -- Semiocast http://semiocast.com/ +33.183627948 - 20 rue Lacaze, 75014 Paris From kostis@REDACTED Sat Jul 16 19:15:07 2011 From: kostis@REDACTED (Kostis Sagonas) Date: Sat, 16 Jul 2011 20:15:07 +0300 Subject: [erlang-bugs] dialyzer does not like queue:out In-Reply-To: References: Message-ID: <4E21C71B.9080801@cs.ntua.gr> Paul Guyot wrote: > Hello, > > Dialyzer seems to consider that the second element of the output of queue:out/1 is not a queue. > > The following code reproduces the error: > > ... > Dialyzer will say: > > dialyzer_queue.erl:11: The pattern {'ok', _Value, _NewRec} can never match the type {'none',#rec{q::queue()}} > > The error disappears if g returns {ok, Elem, Rec} instead of {ok, Elem, #rec{q = NewQueue}}, or if rec.q is typed as any(). This is a known problem. Can you please try the 'dev' version because I think it is fixed there. Kostis From pguyot@REDACTED Sat Jul 16 19:48:27 2011 From: pguyot@REDACTED (Paul Guyot) Date: Sat, 16 Jul 2011 19:48:27 +0200 Subject: [erlang-bugs] dialyzer does not like queue:out In-Reply-To: <4E21C71B.9080801@cs.ntua.gr> References: <4E21C71B.9080801@cs.ntua.gr> Message-ID: <68540D1E-728F-43B1-A917-FAEE0F9D49F7@kallisys.net> Le 16 juil. 2011 ? 19:15, Kostis Sagonas a ?crit : > Paul Guyot wrote: >> Hello, >> Dialyzer seems to consider that the second element of the output of queue:out/1 is not a queue. >> The following code reproduces the error: >> ... >> Dialyzer will say: >> dialyzer_queue.erl:11: The pattern {'ok', _Value, _NewRec} can never match the type {'none',#rec{q::queue()}} >> The error disappears if g returns {ok, Elem, Rec} instead of {ok, Elem, #rec{q = NewQueue}}, or if rec.q is typed as any(). > > This is a known problem. > > Can you please try the 'dev' version because I think it is fixed there. Kostis, thank you for your quick reply. I forgot to mention I just did pull dev and am running dialyzer v2.4.3. Paul -- Semiocast http://semiocast.com/ +33.183627948 - 20 rue Lacaze, 75014 Paris From pguyot@REDACTED Mon Jul 18 13:59:47 2011 From: pguyot@REDACTED (Paul Guyot) Date: Mon, 18 Jul 2011 13:59:47 +0200 Subject: [erlang-bugs] dialyzer does not like queue:out In-Reply-To: <4E21C71B.9080801@cs.ntua.gr> References: <4E21C71B.9080801@cs.ntua.gr> Message-ID: > Paul Guyot wrote: >> Hello, >> Dialyzer seems to consider that the second element of the output of queue:out/1 is not a queue. >> The following code reproduces the error: >> ... >> Dialyzer will say: >> dialyzer_queue.erl:11: The pattern {'ok', _Value, _NewRec} can never match the type {'none',#rec{q::queue()}} >> The error disappears if g returns {ok, Elem, Rec} instead of {ok, Elem, #rec{q = NewQueue}}, or if rec.q is typed as any(). > > This is a known problem. > > Can you please try the 'dev' version because I think it is fixed there. Kostis, It seems I messed up something in the upgrade process and cannot reproduce the bug today, after having rebuilt the plt. So indeed, it looks like it's fixed. Paul -- Semiocast http://semiocast.com/ +33.183627948 - 20 rue Lacaze, 75014 Paris From joant@REDACTED Tue Jul 19 19:27:33 2011 From: joant@REDACTED (wohali) Date: Tue, 19 Jul 2011 10:27:33 -0700 (PDT) Subject: [erlang-bugs] filename:join breaks Windows UNC paths In-Reply-To: <201007180913.40475.khirin@zahav.net.il> References: <201007180913.40475.khirin@zahav.net.il> Message-ID: <1311096453808-3678716.post@n4.nabble.com> Sorry to resurrect an old post, but this just bit me and cost me a day or two. Evgeny's patch works and applies to R14B01 and R14B03, though the line numbers are now a bit off. I've edited the patch below. Not sure what the proper convention is, but I'd like to vote for this being included in a future release if possible. The current assumption that all paths on win32 start with a drive letter is no longer valid, especially if extended-path name notation is being used (\\?\very\long\path). This is an increasingly common need. ------------------- patch -------------------------------- diff --git a/lib/stdlib/src/filename.erl b/lib/stdlib/src/filename.erl index 01c06e4..8da54ef 100644 --- a/lib/stdlib/src/filename.erl +++ b/lib/stdlib/src/filename.erl @@ -426,6 +426,10 @@ join(Name1, Name2) when is_atom(Name2) -> %% It is the responsibility of the caller to ensure that RelativeName %% is relative. +join1([$/, $/ | Rest], RelativeName, [], win32) -> [$/, $/ | join1(Rest, RelativeName, [], win32)]; +join1([$/, $\\ | Rest], RelativeName, [], win32) -> [$/, $/ | join1(Rest, RelativeName, [], win32)]; +join1([$\\, $/ | Rest], RelativeName, [], win32) -> [$/, $/ | join1(Rest, RelativeName, [], win32)]; +join1([$\\, $\\ | Rest], RelativeName, [], win32) -> [$/, $/ | join1(Rest, RelativeName, [], win32)]; join1([UcLetter, $:|Rest], RelativeName, [], win32) when is_integer(UcLetter), UcLetter >= $A, UcLetter =< $Z -> join1(Rest, RelativeName, [$:, UcLetter+$a-$A], win32); ------------------- patch -------------------------------- -- View this message in context: http://erlang.2086793.n4.nabble.com/filename-join-breaks-Windows-UNC-paths-tp2292894p3678716.html Sent from the Erlang Bugs mailing list archive at Nabble.com. From klas.johansson@REDACTED Wed Jul 20 12:11:45 2011 From: klas.johansson@REDACTED (Klas Johansson) Date: Wed, 20 Jul 2011 12:11:45 +0200 Subject: [erlang-bugs] function clause in io_lib_fread:fread/4 when running out of input before format Message-ID: Hi, Stumbled upon a bug in io_lib (rather in io_lib_fread) when parsing ISO 8601 timestamps. Given that I parse something like "2009-10-17T18:37:26Z" but (by mistake) leave out the trailing "Z" in the input string I get a function clause: 1> io_lib:fread("~4d-~2d-~2dT~2d:~2d:~2dZ", "2009-10-17T18:37:26"). ** exception error: no function clause matching io_lib_fread:fread("Z",[],19,[26,37,18,17,10,2009]) Same thing if I stop at any of the non-control characters (like a dash or colon): 2> io_lib:fread("~4d-~2d-~2dT~2d:~2d:~2dZ", "2009"). ** exception error: no function clause matching io_lib_fread:fread("-~2d-~2dT~2d:~2d:~2dZ",[],4,[2009]) Minimal (and silly) test case: 3> io_lib:fread("Z", ""). ** exception error: no function clause matching io_lib_fread:fread("Z",[],0,[]) I'd expect something like this: 4> io_lib:fread("~4d-~2d-~2dT~2d:~2d:~2dZ", "2009"). {more,"~2d-~2dT~2d:~2d:~2dZ",4,[2009]} Should be easy to fix, but I've resorted to using re.erl for now. Cheers, Klas From raimo+erlang-bugs@REDACTED Thu Jul 21 16:52:18 2011 From: raimo+erlang-bugs@REDACTED (Raimo Niskanen) Date: Thu, 21 Jul 2011 16:52:18 +0200 Subject: [erlang-bugs] function clause in io_lib_fread:fread/4 when running out of input before format In-Reply-To: References: Message-ID: <20110721145218.GA11580@erix.ericsson.se> On Wed, Jul 20, 2011 at 12:11:45PM +0200, Klas Johansson wrote: > Hi, > > Stumbled upon a bug in io_lib (rather in io_lib_fread) when parsing > ISO 8601 timestamps. > > Given that I parse something like "2009-10-17T18:37:26Z" but (by > mistake) leave out the trailing "Z" in the input string I get a > function clause: > > 1> io_lib:fread("~4d-~2d-~2dT~2d:~2d:~2dZ", "2009-10-17T18:37:26"). > ** exception error: no function clause matching > io_lib_fread:fread("Z",[],19,[26,37,18,17,10,2009]) > > Same thing if I stop at any of the non-control characters (like a dash > or colon): > > 2> io_lib:fread("~4d-~2d-~2dT~2d:~2d:~2dZ", "2009"). > ** exception error: no function clause matching > io_lib_fread:fread("-~2d-~2dT~2d:~2d:~2dZ",[],4,[2009]) > > Minimal (and silly) test case: > > 3> io_lib:fread("Z", ""). > ** exception error: no function clause matching > io_lib_fread:fread("Z",[],0,[]) > > I'd expect something like this: > > 4> io_lib:fread("~4d-~2d-~2dT~2d:~2d:~2dZ", "2009"). > {more,"~2d-~2dT~2d:~2d:~2dZ",4,[2009]} > > Should be easy to fix, but I've resorted to using re.erl for now. I confirm it must be a bug, and I will put this solution into the daily builds 'dev' branch: --- a/lib/stdlib/src/io_lib_fread.erl +++ b/lib/stdlib/src/io_lib_fread.erl @@ -121,6 +121,14 @@ fread([C|Format], [C|Line], N, Results) -> fread(Format, Line, N+1, Results); fread([_F|_Format], [_C|_Line], _N, _Results) -> fread_error(input); +fread([_|_]=Format, [], N, Results) -> + {more,Format,N,Results}; +fread([_|_], eof, _N, []) -> + %% This is at start of format string so no error. + eof; +fread([_|_], eof, _N, _Results) -> + %% This is an error as there is no more input. + fread_error(input); fread([], Line, _N, Results) -> {ok,reverse(Results),Line}. I'll have a look at one other pecularity while I'm at it; reading using io:fread(F, " X") from an io server that gives some whitespaces followed by EOF will return 'eof' while I think it should return {error,{fread,input}}. The same for io:fread(F, " ~d"). I think this is a misinterpeted feature of when being at EOF an io:fread should immediately return 'eof'. > > > Cheers, > Klas > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://erlang.org/mailman/listinfo/erlang-bugs -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From klas.johansson@REDACTED Fri Jul 22 12:20:45 2011 From: klas.johansson@REDACTED (Klas Johansson) Date: Fri, 22 Jul 2011 12:20:45 +0200 Subject: [erlang-bugs] function clause in io_lib_fread:fread/4 when running out of input before format In-Reply-To: <20110721145218.GA11580@erix.ericsson.se> References: <20110721145218.GA11580@erix.ericsson.se> Message-ID: On Thu, Jul 21, 2011 at 4:52 PM, Raimo Niskanen wrote: > On Wed, Jul 20, 2011 at 12:11:45PM +0200, Klas Johansson wrote: >> Hi, >> >> Stumbled upon a bug in io_lib (rather in io_lib_fread) when parsing >> ISO 8601 timestamps. >> >> Given that I parse something like "2009-10-17T18:37:26Z" but (by >> mistake) leave out the trailing "Z" in the input string I get a >> function clause: >> >> ? ? 1> io_lib:fread("~4d-~2d-~2dT~2d:~2d:~2dZ", "2009-10-17T18:37:26"). >> ? ? ** exception error: no function clause matching >> ? ? ? ? ? ? ? ? ? ? ? ? io_lib_fread:fread("Z",[],19,[26,37,18,17,10,2009]) >> >> Same thing if I stop at any of the non-control characters (like a dash >> or colon): >> >> ? ? 2> io_lib:fread("~4d-~2d-~2dT~2d:~2d:~2dZ", "2009"). >> ? ? ** exception error: no function clause matching >> ? ? ? ? ? ? ? ? ? ? ? ? io_lib_fread:fread("-~2d-~2dT~2d:~2d:~2dZ",[],4,[2009]) >> >> Minimal (and silly) test case: >> >> ? ? 3> io_lib:fread("Z", ""). >> ? ? ** exception error: no function clause matching >> ? ? ? ? ? ? ? ? ? ? io_lib_fread:fread("Z",[],0,[]) >> >> I'd expect something like this: >> >> ? ? 4> io_lib:fread("~4d-~2d-~2dT~2d:~2d:~2dZ", "2009"). >> ? ? {more,"~2d-~2dT~2d:~2d:~2dZ",4,[2009]} >> >> Should be easy to fix, but I've resorted to using re.erl for now. > > I confirm it must be a bug, and I will put this solution > into the daily builds 'dev' branch: > --- a/lib/stdlib/src/io_lib_fread.erl > +++ b/lib/stdlib/src/io_lib_fread.erl > @@ -121,6 +121,14 @@ fread([C|Format], [C|Line], N, Results) -> > ? ? fread(Format, Line, N+1, Results); > ?fread([_F|_Format], [_C|_Line], _N, _Results) -> > ? ? fread_error(input); > +fread([_|_]=Format, [], N, Results) -> > + ? ?{more,Format,N,Results}; > +fread([_|_], eof, _N, []) -> > + ? ?%% This is at start of format string so no error. > + ? ?eof; > +fread([_|_], eof, _N, _Results) -> > + ? ?%% This is an error as there is no more input. > + ? ?fread_error(input); > ?fread([], Line, _N, Results) -> > ? ? {ok,reverse(Results),Line}. > > I'll have a look at one other pecularity while I'm at it; > reading using io:fread(F, " X") from an io server that > gives some whitespaces followed by EOF will return > 'eof' while I think it should return {error,{fread,input}}. > The same for io:fread(F, " ~d"). > > I think this is a misinterpeted feature of when being at EOF > an io:fread should immediately return 'eof'. > >> >> >> Cheers, >> Klas >> _______________________________________________ >> erlang-bugs mailing list >> erlang-bugs@REDACTED >> http://erlang.org/mailman/listinfo/erlang-bugs > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > Thanks for a quick reply! Cheers, Klas From afterforeverx@REDACTED Mon Jul 25 15:21:48 2011 From: afterforeverx@REDACTED (Dima no-name) Date: Mon, 25 Jul 2011 15:21:48 +0200 Subject: [erlang-bugs] Parser bug with lists of records Message-ID: Hallo! I have found some strange parser behavior with a list of records. The bug has been verified on Erlang R14B03, on Ubuntu 11.04 Linux and Mac OS X. -------------------- Test Module -module(bugtest). -export([test/0]). -record(rec, {x}). test() -> [#rec{x = 1}, #rec{x = 2} % <-- missing comma #rec{x = 3}]. -------------------- Shell Output Eshell V5.8.4 (abort with ^G) 1> c(bugtest). {ok,bugtest} 2> bugtest:test(). [{rec,1},{rec,3}] -------------- next part -------------- An HTML attachment was scrubbed... URL: From ess@REDACTED Mon Jul 25 15:45:33 2011 From: ess@REDACTED (=?ISO-8859-1?Q?Erik_S=F8e_S=F8rensen?=) Date: Mon, 25 Jul 2011 15:45:33 +0200 Subject: [erlang-bugs] Parser bug with lists of records In-Reply-To: References: Message-ID: <4E2D737D.10808@trifork.com> This appears to be not a bug, but just that the code is parsed as a combination of "create record" with "modify record". Compare with this: X = #rec{x = 2}, [#rec{x = 1}, X, #rec{x = 3}]. % with comma X = #rec{x = 2}, [#rec{x = 1}, X#rec{x = 3}]. % without comma The "modify record" syntax is used most often with a variable (here "X") in the place of the original record, but it can by used with other subexpressions as well. In your example, it is of course a bit of a gotcha, and I guess you could argue for adding a compiler warning for this particular combination (modification of a record just created). Dima no-name wrote: > Hallo! > I have found some strange parser behavior with a list of records. > The bug has been verified on Erlang R14B03, on Ubuntu 11.04 Linux and > Mac OS X. > > -------------------- Test Module > > -module(bugtest). > -export([test/0]). > > -record(rec, {x}). > > test() -> > [#rec{x = 1}, > #rec{x = 2} % <-- missing comma > #rec{x = 3}]. > > -------------------- Shell Output > Eshell V5.8.4 (abort with ^G) > 1> c(bugtest). > {ok,bugtest} > 2> bugtest:test(). > [{rec,1},{rec,3}] From info@REDACTED Tue Jul 26 18:29:50 2011 From: info@REDACTED (cymoon) Date: Tue, 26 Jul 2011 09:29:50 -0700 (PDT) Subject: [erlang-bugs] odbc module lacks in a mode after executing stored procedures Message-ID: <1311697790265-3696283.post@n4.nabble.com> I am using Erlang together with an Oracle 11g database on a windows machine. When I execute a stored procedure using param_query, the odbc module executes further statements as if they where also stored procedures. %%%%%%%%%%%%%%%%%%%%%%%%%%%% odbc:start(permanent), {ok, Ref} = odbc:connect(ConnectStr, Options), Result1 =odbc:param_query(Ref, "select ? from dual",[{ sql_integer,[1]}]), io:format("~p~n",[Result1]), % returns: {selected,[":1"],[{1.0}]} Result2 =odbc:param_query(Ref, "{ ? = call NVL (2,2) }",[{sql_integer,out,[1]}]), io:format("~p~n",[Result2]), % returns: {executed,1,[{2}]} Result3 =odbc:param_query(Ref, "select ? from dual",[{ sql_integer,[3]}]), io:format("~p~n",[Result3]), % returns: {executed,0,[{}]} but should return {selected,[":1"],[{3.0}]} %%%%%%%%%%%%%%%%%%%%%%%%%%%% To make sure that it is a bug in erlang, I wrote the same test in C#. It works as expected: ///////////////////////////////////////// OdbcConnection con = new OdbcConnection(); con.ConnectionString = "DSN=flexdoc_dev;UID=nn2;PWD=nn2"; con.Open(); OdbcCommand cmd; OdbcDataReader dr; cmd = new OdbcCommand("SELECT ? val FROM dual", con); cmd.Parameters.AddWithValue("", 1); dr = cmd.ExecuteReader(); dr.Read(); Console.WriteLine(dr["val"].ToString()); // returns 1 cmd = new OdbcCommand("{ ? = CALL NVL(2,2) }", con); cmd.CommandType = CommandType.StoredProcedure; OdbcParameter parameter = cmd.Parameters.Add("returnVal", OdbcType.Int); parameter.Direction = ParameterDirection.ReturnValue; dr = cmd.ExecuteReader(); dr.Close(); Console.WriteLine(cmd.Parameters["returnVal"].Value); // returns 2 cmd = new OdbcCommand("SELECT ? val FROM dual", con); cmd.Parameters.AddWithValue("", 3); dr = cmd.ExecuteReader(); dr.Read(); Console.WriteLine(dr["val"].ToString()); // returns 3 ///////////////////////////////////////// -- View this message in context: http://erlang.2086793.n4.nabble.com/odbc-module-lacks-in-a-mode-after-executing-stored-procedures-tp3696283p3696283.html Sent from the Erlang Bugs mailing list archive at Nabble.com. From gordon@REDACTED Wed Jul 27 00:44:45 2011 From: gordon@REDACTED (Gordon Guthrie) Date: Tue, 26 Jul 2011 23:44:45 +0100 Subject: [erlang-bugs] Code should not compile Message-ID: I attach a module and a header file. The module hmac_api_lib.erl has a bug on line 9 - the define is incomplete. It should not compile, but it does. Gordon -- Gordon Guthrie CEO hypernumbers http://hypernumbers.com t: hypernumbers +44 7776 251669 -------------- next part -------------- -module(hmac_api_lib). -include("hmac_api.hrl"). -include_lib("eunit/include/eunit.hrl"). -author("Hypernumbers Ltd "). -define(RFC2116_SP, "\x20"). -define(RFC2116_HT, "\t" -compile(export_all). %%% this library supports the hmac_sha api on both the client-side %%% AND the server-side %%% %%% sign/5 is used client-side to sign a request %%% - it returns an HTTPAuthorization header %%% %%% authorize_request/1 takes a mochiweb Request as an arguement %%% and checks that the request matches the signature %%% %%% get_api_keypair/0 creates a pair of public/private keys %%% %%% THIS LIB DOESN'T IMPLEMENT THE AMAZON API IT ONLY IMPLEMENTS %%% ENOUGH OF IT TO GENERATE A TEST SUITE. %%% %%% THE AMAZON API MUNGES HOSTNAME AND PATHS IN A CUSTOM WAY %%% THIS IMPLEMENTATION DOESN'T -export([ authorize_request/1, sign/5, get_api_keypair/0 ]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %%% %%% API %%% %%% %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% authorize_request(Req) -> Method = Req:get(method), Path = Req:get(path), Headers = normalise(mochiweb_headers:to_list(Req:get(headers))), ContentMD5 = get_header(Headers, "content-md5"), ContentType = get_header(Headers, "content-type"), Date = get_header(Headers, "date"), IncAuth = get_header(Headers, "authorization"), {_Schema, _PublicKey, _Sig} = breakout(IncAuth), % normally you would use the public key to look up the private key PrivateKey = ?privatekey, Signature = #hmac_signature{method = Method, contentmd5 = ContentMD5, contenttype = ContentType, date = Date, headers = Headers, resource = Path}, Signed = sign_data(PrivateKey, Signature), {_, AuthHeader} = make_HTTPAuth_header(Signed), case AuthHeader of IncAuth -> "match"; _ -> "no_match" end. sign(PrivateKey, Method, URL, Headers, ContentType) -> Headers2 = normalise(Headers), ContentMD5 = get_header(Headers2, "content-md5"), Date = get_header(Headers2, "date"), Signature = #hmac_signature{method = Method, contentmd5 = ContentMD5, contenttype = ContentType, date = Date, headers = Headers, resource = URL}, SignedSig = sign_data(PrivateKey, Signature), make_HTTPAuth_header(SignedSig). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %%% %%% Internal Functions %%% %%% %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% breakout(Header) -> [Schema, Tail] = string:tokens(Header, " "), [PublicKey, Signature] = string:tokens(Tail, ":"), {Schema, PublicKey, Signature}. get_api_keypair() -> Public = mochihex:to_hex(binary_to_list(crypto:strong_rand_bytes(16))), Private = mochihex:to_hex(binary_to_list(crypto:strong_rand_bytes(16))), {Public, Private}. make_HTTPAuth_header(Signature) -> {"Authorization", ?schema ++ " " ++ ?publickey ++ ":" ++ Signature}. make_signature_string(#hmac_signature{} = S) -> Date = get_date(S#hmac_signature.headers, S#hmac_signature.date), string:to_upper(atom_to_list(S#hmac_signature.method)) ++ "\n" ++ S#hmac_signature.contentmd5 ++ "\n" ++ S#hmac_signature.contenttype ++ "\n" ++ Date ++ "\n" ++ canonicalise_headers(S#hmac_signature.headers) ++ canonicalise_resource(S#hmac_signature.resource). sign_data(PrivateKey, #hmac_signature{} = Signature) -> Str = make_signature_string(Signature), sign2(PrivateKey, Str). % this fn is the entry point for a unit test which is why it is broken out... % if yer encryption and utf8 and base45 doo-dahs don't work then % yer Donald is well and truly Ducked so ye may as weel test it... sign2(PrivateKey, Str) -> Sign = xmerl_ucs:to_utf8(Str), binary_to_list(base64:encode(crypto:sha_mac(PrivateKey, Sign))). canonicalise_headers([]) -> "\n"; canonicalise_headers(List) when is_list(List) -> List2 = [{string:to_lower(K), V} || {K, V} <- lists:sort(List)], c_headers2(consolidate(List2, []), []). c_headers2([], Acc) -> string:join(Acc, "\n") ++ "\n"; c_headers2([{[?headerprefix | Rest], Key} | T], Acc) -> Hd = string:strip([?headerprefix | Rest]) ++ ":" ++ string:strip(Key), c_headers2(T, [Hd | Acc]); c_headers2([_H | T], Acc) -> c_headers2(T, Acc). consolidate([H | []], Acc) -> [H | Acc]; consolidate([{H, K1}, {H, K2} | Rest], Acc) -> consolidate([{H, join(K1, K2)} | Rest], Acc); consolidate([{H1, K1}, {H2, K2} | Rest], Acc) -> consolidate([{rectify(H2), rectify(K2)} | Rest], [{H1, K1} | Acc]). join(A, B) -> string:strip(A) ++ ";" ++ string:strip(B). % removes line spacing as per RFC 2616 Section 4.2 rectify(String) -> Re = "[\x20* | \t*]+", re:replace(String, Re, " ", [{return, list}, global]). canonicalise_resource("http://" ++ Rest) -> c_res2(Rest); canonicalise_resource("https://" ++ Rest) -> c_res2(Rest); canonicalise_resource(X) -> c_res3(X). c_res2(Rest) -> N = string:str(Rest, "/"), {_, Tail} = lists:split(N, Rest), c_res3("/" ++ Tail). c_res3(Tail) -> URL = case string:str(Tail, "#") of 0 -> Tail; N -> {U, _Anchor} = lists:split(N, Tail), U end, U3 = case string:str(URL, "?") of 0 -> URL; N2 -> {U2, Q} = lists:split(N2, URL), U2 ++ canonicalise_query(Q) end, string:to_lower(U3). canonicalise_query(List) -> List1 = string:to_lower(List), List2 = string:tokens(List1, "&"), string:join(lists:sort(List2), "&"). %% if there's a header date take it and ditch the date get_date([], Date) -> Date; get_date([{K, _V} | T], Date) -> case string:to_lower(K) of ?dateheader -> []; _ -> get_date(T, Date) end. normalise(List) -> norm2(List, []). norm2([], Acc) -> Acc; norm2([{K, V} | T], Acc) when is_atom(K) -> norm2(T, [{string:to_lower(atom_to_list(K)), V} | Acc]); norm2([H | T], Acc) -> norm2(T, [H | Acc]). get_header(Headers, Type) -> case lists:keyfind(Type, 1, Headers) of false -> []; {_K, V} -> V end. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %%% %%% Unit Tests %%% %%% %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % taken from Amazon docs % http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html hash_test1(_) -> Sig = "DELETE\n\n\n\nx-amz-date:Tue, 27 Mar 2007 21:20:26 +0000\n/johnsmith/photos/puppy.jpg", Key = ?privatekey, Hash = sign2(Key, Sig), Expected = "k3nL7gH3+PadhTEVn5Ip83xlYzk=", ?assertEqual(Expected, Hash). % taken from Amazon docs % http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html hash_test2(_) -> Sig = "GET\n\n\nTue, 27 Mar 2007 19:44:46 +0000\n/johnsmith/?acl", Key = "uV3F3YluFJax1cknvbcGwgjvx4QpvB+leU8dUj2o", Hash = sign2(Key, Sig), Expected = "thdUi9VAkzhkniLj96JIrOPGi0g=", ?assertEqual(Expected, Hash). % taken from Amazon docs % http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html hash_test3(_) -> Sig = "GET\n\n\nWed, 28 Mar 2007 01:49:49 +0000\n/dictionary/" ++ "fran%C3%A7ais/pr%c3%a9f%c3%a8re", Key = "uV3F3YluFJax1cknvbcGwgjvx4QpvB+leU8dUj2o", Hash = sign2(Key, Sig), Expected = "dxhSBHoI6eVSPcXJqEghlUzZMnY=", ?assertEqual(Expected, Hash). signature_test1(_) -> URL = "http://example.com:90/tongs/ya/bas", Method = post, ContentMD5 = "", ContentType = "", Date = "Sun, 10 Jul 2011 05:07:19 UTC", Headers = [], Signature = #hmac_signature{method = Method, contentmd5 = ContentMD5, contenttype = ContentType, date = Date, headers = Headers, resource = URL}, Sig = make_signature_string(Signature), Expected = "POST\n\n\nSun, 10 Jul 2011 05:07:19 UTC\n\n/tongs/ya/bas", ?assertEqual(Expected, Sig). signature_test2(_) -> URL = "http://example.com:90/tongs/ya/bas", Method = get, ContentMD5 = "", ContentType = "", Date = "Sun, 10 Jul 2011 05:07:19 UTC", Headers = [{"x-amz-acl", "public-read"}], Signature = #hmac_signature{method = Method, contentmd5 = ContentMD5, contenttype = ContentType, date = Date, headers = Headers, resource = URL}, Sig = make_signature_string(Signature), Expected = "GET\n\n\nSun, 10 Jul 2011 05:07:19 UTC\nx-amz-acl:public-read\n/tongs/ya/bas", ?assertEqual(Expected, Sig). signature_test3(_) -> URL = "http://example.com:90/tongs/ya/bas", Method = get, ContentMD5 = "", ContentType = "", Date = "Sun, 10 Jul 2011 05:07:19 UTC", Headers = [{"x-amz-acl", "public-read"}, {"yantze", "blast-off"}, {"x-amz-doobie", "bongwater"}, {"x-amz-acl", "public-write"}], Signature = #hmac_signature{method = Method, contentmd5 = ContentMD5, contenttype = ContentType, date = Date, headers = Headers, resource = URL}, Sig = make_signature_string(Signature), Expected = "GET\n\n\nSun, 10 Jul 2011 05:07:19 UTC\nx-amz-acl:public-read;public-write\nx-amz-doobie:bongwater\n/tongs/ya/bas", ?assertEqual(Expected, Sig). signature_test4(_) -> URL = "http://example.com:90/tongs/ya/bas", Method = get, ContentMD5 = "", ContentType = "", Date = "Sun, 10 Jul 2011 05:07:19 UTC", Headers = [{"x-amz-acl", "public-read"}, {"yantze", "blast-off"}, {"x-amz-doobie oobie \t boobie ", "bongwater"}, {"x-amz-acl", "public-write"}], Signature = #hmac_signature{method = Method, contentmd5 = ContentMD5, contenttype = ContentType, date = Date, headers = Headers, resource = URL}, Sig = make_signature_string(Signature), Expected = "GET\n\n\nSun, 10 Jul 2011 05:07:19 UTC\nx-amz-acl:public-read;public-write\nx-amz-doobie oobie boobie:bongwater\n/tongs/ya/bas", ?assertEqual(Expected, Sig). signature_test5(_) -> URL = "http://example.com:90/tongs/ya/bas", Method = get, ContentMD5 = "", ContentType = "", Date = "Sun, 10 Jul 2011 05:07:19 UTC", Headers = [{"x-amz-acl", "public-Read"}, {"yantze", "Blast-Off"}, {"x-amz-doobie Oobie \t boobie ", "bongwater"}, {"x-amz-acl", "public-write"}], Signature = #hmac_signature{method = Method, contentmd5 = ContentMD5, contenttype = ContentType, date = Date, headers = Headers, resource = URL}, Sig = make_signature_string(Signature), Expected = "GET\n\n\nSun, 10 Jul 2011 05:07:19 UTC\nx-amz-acl:public-Read;public-write\nx-amz-doobie oobie boobie:bongwater\n/tongs/ya/bas", ?assertEqual(Expected, Sig). signature_test6(_) -> URL = "http://example.com:90/tongs/ya/bas/?andy&zbish=bash&bosh=burp", Method = get, ContentMD5 = "", ContentType = "", Date = "Sun, 10 Jul 2011 05:07:19 UTC", Headers = [], Signature = #hmac_signature{method = Method, contentmd5 = ContentMD5, contenttype = ContentType, date = Date, headers = Headers, resource = URL}, Sig = make_signature_string(Signature), Expected = "GET\n\n\nSun, 10 Jul 2011 05:07:19 UTC\n\n" ++ "/tongs/ya/bas/?andy&bosh=burp&zbish=bash", ?assertEqual(Expected, Sig). signature_test7(_) -> URL = "http://exAMPLE.Com:90/tONgs/ya/bas/?ANdy&ZBish=Bash&bOsh=burp", Method = get, ContentMD5 = "", ContentType = "", Date = "Sun, 10 Jul 2011 05:07:19 UTC", Headers = [], Signature = #hmac_signature{method = Method, contentmd5 = ContentMD5, contenttype = ContentType, date = Date, headers = Headers, resource = URL}, Sig = make_signature_string(Signature), Expected = "GET\n\n\nSun, 10 Jul 2011 05:07:19 UTC\n\n" ++"/tongs/ya/bas/?andy&bosh=burp&zbish=bash", ?assertEqual(Expected, Sig). signature_test8(_) -> URL = "http://exAMPLE.Com:90/tONgs/ya/bas/?ANdy&ZBish=Bash&bOsh=burp", Method = get, ContentMD5 = "", ContentType = "", Date = "", Headers = [{"x-aMz-daTe", "Tue, 27 Mar 2007 21:20:26 +0000"}], Signature = #hmac_signature{method = Method, contentmd5 = ContentMD5, contenttype = ContentType, date = Date, headers = Headers, resource = URL}, Sig = make_signature_string(Signature), Expected = "GET\n\n\n\n" ++"x-amz-date:Tue, 27 Mar 2007 21:20:26 +0000\n" ++"/tongs/ya/bas/?andy&bosh=burp&zbish=bash", ?assertEqual(Expected, Sig). signature_test9(_) -> URL = "http://exAMPLE.Com:90/tONgs/ya/bas/?ANdy&ZBish=Bash&bOsh=burp", Method = get, ContentMD5 = "", ContentType = "", Date = "Sun, 10 Jul 2011 05:07:19 UTC", Headers = [{"x-amz-date", "Tue, 27 Mar 2007 21:20:26 +0000"}], Signature = #hmac_signature{method = Method, contentmd5 = ContentMD5, contenttype = ContentType, date = Date, headers = Headers, resource = URL}, Sig = make_signature_string(Signature), Expected = "GET\n\n\n\n" ++"x-amz-date:Tue, 27 Mar 2007 21:20:26 +0000\n" ++"/tongs/ya/bas/?andy&bosh=burp&zbish=bash", ?assertEqual(Expected, Sig). amazon_test1(_) -> URL = "http://exAMPLE.Com:90/johnsmith/photos/puppy.jpg", Method = delete, ContentMD5 = "", ContentType = "", Date = "", Headers = [{"x-amz-date", "Tue, 27 Mar 2007 21:20:26 +0000"}], Signature = #hmac_signature{method = Method, contentmd5 = ContentMD5, contenttype = ContentType, date = Date, headers = Headers, resource = URL}, Sig = sign_data(?privatekey, Signature), Expected = "k3nL7gH3+PadhTEVn5Ip83xlYzk=", ?assertEqual(Expected, Sig). unit_test_() -> Setup = fun() -> ok end, Cleanup = fun(_) -> ok end, Series1 = [ fun hash_test1/1, fun hash_test2/1, fun hash_test3/1 ], Series2 = [ fun signature_test1/1, fun signature_test2/1, fun signature_test3/1, fun signature_test4/1, fun signature_test5/1, fun signature_test6/1, fun signature_test7/1, fun signature_test8/1, fun signature_test9/1 ], Series3 = [ fun amazon_test1/1 ], {setup, Setup, Cleanup, [ {with, [], Series1}, {with, [], Series2}, {with, [], Series3} ]}. -------------- next part -------------- A non-text attachment was scrubbed... Name: hmac_api.hrl Type: application/octet-stream Size: 1948 bytes Desc: not available URL: From carlsson.richard@REDACTED Wed Jul 27 13:57:59 2011 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Wed, 27 Jul 2011 14:57:59 +0300 Subject: [erlang-bugs] Code should not compile In-Reply-To: References: Message-ID: <4E2FFD47.4070209@gmail.com> On 07/27/2011 01:44 AM, Gordon Guthrie wrote: > I attach a module and a header file. > > The module hmac_api_lib.erl has a bug on line 9 - the define is > incomplete. It should not compile, but it does. It's a preprocessor macro definition - they work this way. The first thing that happens (after tokenization) is that the code is split up into "forms" - sections that end with a period followed by either whitespace (including newlines) or EOF. In your example: -define(RFC2116_HT, "\t" -compile(export_all). the form begins with '-' 'define' and ends with 'export_all' ')'. After that, the preprocessor recognizes the form as a macro definition and binds 'RFC2116_HT' to the token sequence "\t" '-' 'compile' '(' 'export_all'. The last parentheses is considered part of the -define directive, so it's not included. (Remember that it used to be that you could even leave out the final parenthesis? It wasn't actually needed, because the period+whitespace tells you where the definition ends, but it caused some confusion, so the end parenthesis must be there nowadays.) It should be possible to make the preprocessor detect this sort of mistake in typical cases and at least emit a warning, but in general, macros must still be allowed to 1) be spread over multiple lines, 2) contain token sequences like '- (', and 3) not require that the definition body is balanced with respect to parentheses and other token pairs like case/end. So, it's not a simple matter of changing how the end-of-macro is detected. /Richard From gordon@REDACTED Wed Jul 27 14:16:02 2011 From: gordon@REDACTED (Gordon Guthrie) Date: Wed, 27 Jul 2011 13:16:02 +0100 Subject: [erlang-bugs] Code should not compile In-Reply-To: <4E2FFD47.4070209@gmail.com> References: <4E2FFD47.4070209@gmail.com> Message-ID: Duh! I get it. It is part of a submission to mochiweb and they raised it as an error. It was only as I tidied it up that I realised I was no longer using these macros. This therefore would have been (but wasn't) a run-time error and not a compile error. Gordon On 27 July 2011 12:57, Richard Carlsson wrote: > On 07/27/2011 01:44 AM, Gordon Guthrie wrote: >> >> I attach a module and a header file. >> >> The module hmac_api_lib.erl has a bug on line 9 - the define is >> incomplete. It should not compile, but it does. > > It's a preprocessor macro definition - they work this way. The first thing > that happens (after tokenization) is that the code is split up into "forms" > - sections that end with a period followed by either whitespace (including > newlines) or EOF. In your example: > > ?-define(RFC2116_HT, "\t" > > ?-compile(export_all). > > the form begins with '-' 'define' and ends with 'export_all' ')'. > > After that, the preprocessor recognizes the form as a macro definition and > binds 'RFC2116_HT' to the token sequence "\t" '-' 'compile' '(' > 'export_all'. The last parentheses is considered part of the -define > directive, so it's not included. (Remember that it used to be that you could > even leave out the final parenthesis? It wasn't actually needed, because the > period+whitespace tells you where the definition ends, but it caused some > confusion, so the end parenthesis must be there nowadays.) > > It should be possible to make the preprocessor detect this sort of mistake > in typical cases and at least emit a warning, but in general, macros must > still be allowed to 1) be spread over multiple lines, 2) contain token > sequences like '- (', and 3) not require that the definition body is > balanced with respect to parentheses and other token pairs like case/end. > So, it's not a simple matter of changing how the end-of-macro is detected. > > ? ?/Richard > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://erlang.org/mailman/listinfo/erlang-bugs > -- Gordon Guthrie CEO hypernumbers http://hypernumbers.com t: hypernumbers +44 7776 251669 From zl9d97p02@REDACTED Wed Jul 27 21:12:21 2011 From: zl9d97p02@REDACTED (Simon Cornish) Date: Wed, 27 Jul 2011 12:12:21 -0700 Subject: [erlang-bugs] Bug when streaming input to xmerl_scan Message-ID: <25564-1311793941-889957@sneakemail.com> Consider the following trivial XML: blah If this is being fed to xmerl_scan:string via a continuation_fun and the current input runs out at the end of an attribute value (in this example, the 2nd " character on the item line) then it will crash. This is demonstrated in the small attached module. One possible fix that has been tested is also attached. Regards, Simon -------------- next part -------------- A non-text attachment was scrubbed... Name: xmerl_scan_bug.erl Type: application/octet-stream Size: 559 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: xmerl_scan.patch Type: application/octet-stream Size: 1410 bytes Desc: not available URL: From maggio.vincenzo@REDACTED Thu Jul 28 22:07:32 2011 From: maggio.vincenzo@REDACTED (Shinji Ikari) Date: Thu, 28 Jul 2011 22:07:32 +0200 Subject: [erlang-bugs] Erlang doesn't connect with "short" long names Message-ID: Hello, the problem, on my laptop (Win XP SP3, OTP/R14B3), can be simply replicated with starting two nodes with "short" long names and try to connect them: c:\> erl -name a@REDACTED (a@REDACTED)1> and c:\> erl -name b@REDACTED (b@REDACTED)1>net_adm:ping(a@REDACTED). pang (b@REDACTED)2>nodes(). [] -----> as expected after a 'pang'! So Erlang doesn't seem to connect this way. But if you simply: c:\> erl -name a@REDACTED (a@REDACTED)1> c:\> erl -name b@REDACTED (b@REDACTED)1>net_adm:ping(a@REDACTED). pong (b@REDACTED)1>nodes(). [a@REDACTED] -----------> as expected after a 'pong'! Really, no clue here, I've also checked standard rules for domain names: there is an upper limit (63 characters) but no lower limit, AFAIK. Thanks in advance! Vincent -------------- next part -------------- An HTML attachment was scrubbed... URL: From garret.smith@REDACTED Fri Jul 29 03:30:08 2011 From: garret.smith@REDACTED (Garret Smith) Date: Thu, 28 Jul 2011 18:30:08 -0700 Subject: [erlang-bugs] Dialyzer hanging Message-ID: I created a small code example, distilled from a couple files in a larger project, that will cause dialyzer to hang indefinitely. At least, in the larger project I left dialyzer running for 42 hours before giving up. I have only left it running for a few minutes on this small code example before deciding that more time would not help. I am running R14B03 on FreeBSD, amd64 architecture: Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:6:6] [rq:6] [async-threads:0] [hipe] [kernel-poll:false] Steps to reproduce: erlc +debug_info test.erl dialyzer --build_plt --output_plt test.plt test.beam test.erl: -module(test). -compile(export_all). -record(property, {name, value}). -opaque property() :: #property{}. -record(collection, {id, values :: [#property{}]}). as_proplist(#collection{values = Values}) -> [{Name, Value} || #property{name = Name, value = Value} <- Values] . If I can provide any more details that will help, please let me know! Thanks, Garret -------------- next part -------------- An HTML attachment was scrubbed... URL: From ess@REDACTED Fri Jul 29 09:02:56 2011 From: ess@REDACTED (=?ISO-8859-1?Q?Erik_S=F8e_S=F8rensen?=) Date: Fri, 29 Jul 2011 09:02:56 +0200 Subject: [erlang-bugs] Erlang doesn't connect with "short" long names In-Reply-To: References: Message-ID: <4E325B20.10907@trifork.com> Shinji Ikari wrote: > Hello, > the problem, on my laptop (Win XP SP3, OTP/R14B3), can be simply > replicated with starting two nodes with "short" long names and try to > connect them: > > c:\> erl -name a@REDACTED > (a@REDACTED)1> > > and Does the host in question in fact have the name 'a.b.c'? I.e. if you run "nslookup a.b.c", do you get the IP of the machine on which you're starting that node? Otherwise, what you try is not expected to work. > > c:\> erl -name b@REDACTED > (b@REDACTED)1>net_adm:ping(a@REDACTED). > pang > (b@REDACTED)2>nodes(). > [] -----> as expected after a 'pang'! > > So Erlang doesn't seem to connect this way. But if you simply: > > c:\> erl -name a@REDACTED > (a@REDACTED)1> > > c:\> erl -name b@REDACTED > (b@REDACTED)1>net_adm:ping(a@REDACTED). > pong > (b@REDACTED)1>nodes(). > [a@REDACTED] -----------> as expected after a 'pong'! > > > Really, no clue here, I've also checked standard rules for domain > names: there is an upper limit (63 characters) but no lower limit, AFAIK. > > Thanks in advance! > > Vincent From maggio.vincenzo@REDACTED Fri Jul 29 12:14:57 2011 From: maggio.vincenzo@REDACTED (Vincenzo Maggio) Date: Fri, 29 Jul 2011 12:14:57 +0200 Subject: [erlang-bugs] Erlang doesn't connect with "short" long names In-Reply-To: <4E325B20.10907@trifork.com> References: , <4E325B20.10907@trifork.com> Message-ID: Hi, you are perfectly right, nslookup reckons mydomain.com (what a bad luck, I didn't think that someone could register "mydomain.com"!) but not b.c. What misled me is the fact that I thought that being on the same host, the epmd deamon could manage to ping the nodes because I added them to hosts file. Indeed, when you issue 'epmd -nodes' it recognizes the nodes names (like 'a' and 'b') without the host and domain part, so I thought that epmd simply uses a simple host lookup, not a domain lookup. I think that it should be pointed out in erlang docs that epmd uses nslookup to route requests between nodes. As far as you know, is this the right place for this kind of suggestions? Many thanks for the help!!! Vincent > Date: Fri, 29 Jul 2011 09:02:56 +0200 > From: ess@REDACTED > To: maggio.vincenzo@REDACTED > CC: erlang-bugs@REDACTED > Subject: Re: [erlang-bugs] Erlang doesn't connect with "short" long names > > Shinji Ikari wrote: > > Hello, > > the problem, on my laptop (Win XP SP3, OTP/R14B3), can be simply > > replicated with starting two nodes with "short" long names and try to > > connect them: > > > > c:\> erl -name a@REDACTED > > (a@REDACTED)1> > > > > and > Does the host in question in fact have the name 'a.b.c'? > I.e. if you run "nslookup a.b.c", do you get the IP of the machine on > which you're starting that node? > Otherwise, what you try is not expected to work. > > > > c:\> erl -name b@REDACTED > > (b@REDACTED)1>net_adm:ping(a@REDACTED). > > pang > > (b@REDACTED)2>nodes(). > > [] -----> as expected after a 'pang'! > > > > So Erlang doesn't seem to connect this way. But if you simply: > > > > c:\> erl -name a@REDACTED > > (a@REDACTED)1> > > > > c:\> erl -name b@REDACTED > > (b@REDACTED)1>net_adm:ping(a@REDACTED). > > pong > > (b@REDACTED)1>nodes(). > > [a@REDACTED] -----------> as expected after a 'pong'! > > > > > > Really, no clue here, I've also checked standard rules for domain > > names: there is an upper limit (63 characters) but no lower limit, AFAIK. > > > > Thanks in advance! > > > > Vincent > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukas@REDACTED Fri Jul 29 12:31:33 2011 From: lukas@REDACTED (Lukas Larsson) Date: Fri, 29 Jul 2011 12:31:33 +0200 Subject: [erlang-bugs] Erlang doesn't connect with "short" long names In-Reply-To: References: , <4E325B20.10907@trifork.com> Message-ID: <4E328C05.1000008@erix.ericsson.se> Hello! If you feel like something is missing to the documentation, please take the time to add it and submit a patch so that it will be clearer to others how Erlang/OTP works. The source for the documentation in question can be found here: https://github.com/erlang/otp/blob/dev/erts/doc/src/epmd.xml Lukas On 29/07/11 12:14, Vincenzo Maggio wrote: > Hi, > you are perfectly right, nslookup reckons mydomain.com (what a bad > luck, I didn't think that someone could register "mydomain.com"!) but > not b.c. > What misled me is the fact that I thought that being on the same host, > the epmd deamon could manage to ping the nodes because I added them to > hosts file. > Indeed, when you issue 'epmd -nodes' it recognizes the nodes names > (like 'a' and 'b') without the host and domain part, so I thought that > epmd simply uses a simple host lookup, not a domain lookup. > I think that it should be pointed out in erlang docs that epmd uses > nslookup to route requests between nodes. > As far as you know, is this the right place for this kind of suggestions? > > Many thanks for the help!!! > > Vincent > > > Date: Fri, 29 Jul 2011 09:02:56 +0200 > > From: ess@REDACTED > > To: maggio.vincenzo@REDACTED > > CC: erlang-bugs@REDACTED > > Subject: Re: [erlang-bugs] Erlang doesn't connect with "short" long > names > > > > Shinji Ikari wrote: > > > Hello, > > > the problem, on my laptop (Win XP SP3, OTP/R14B3), can be simply > > > replicated with starting two nodes with "short" long names and try to > > > connect them: > > > > > > c:\> erl -name a@REDACTED > > > (a@REDACTED)1> > > > > > > and > > Does the host in question in fact have the name 'a.b.c'? > > I.e. if you run "nslookup a.b.c", do you get the IP of the machine on > > which you're starting that node? > > Otherwise, what you try is not expected to work. > > > > > > c:\> erl -name b@REDACTED > > > (b@REDACTED)1>net_adm:ping(a@REDACTED). > > > pang > > > (b@REDACTED)2>nodes(). > > > [] -----> as expected after a 'pang'! > > > > > > So Erlang doesn't seem to connect this way. But if you simply: > > > > > > c:\> erl -name a@REDACTED > > > (a@REDACTED)1> > > > > > > c:\> erl -name b@REDACTED > > > (b@REDACTED)1>net_adm:ping(a@REDACTED). > > > pong > > > (b@REDACTED)1>nodes(). > > > [a@REDACTED] -----------> as expected after a 'pong'! > > > > > > > > > Really, no clue here, I've also checked standard rules for domain > > > names: there is an upper limit (63 characters) but no lower limit, > AFAIK. > > > > > > Thanks in advance! > > > > > > Vincent > > > > > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://erlang.org/mailman/listinfo/erlang-bugs -------------- next part -------------- An HTML attachment was scrubbed... URL: From maggio.vincenzo@REDACTED Fri Jul 29 14:24:57 2011 From: maggio.vincenzo@REDACTED (Vincenzo Maggio) Date: Fri, 29 Jul 2011 14:24:57 +0200 Subject: [erlang-bugs] Erlang doesn't connect with "short" long names In-Reply-To: <4E328C05.1000008@erix.ericsson.se> References: , <4E325B20.10907@trifork.com> , <4E328C05.1000008@erix.ericsson.se> Message-ID: Hi Lukas, thanks for the tip, I'll look into it ASAP. Vincenzo Date: Fri, 29 Jul 2011 12:31:33 +0200 From: lukas@REDACTED To: erlang-bugs@REDACTED; maggio.vincenzo@REDACTED Subject: Re: [erlang-bugs] Erlang doesn't connect with "short" long names Hello! If you feel like something is missing to the documentation, please take the time to add it and submit a patch so that it will be clearer to others how Erlang/OTP works. The source for the documentation in question can be found here: https://github.com/erlang/otp/blob/dev/erts/doc/src/epmd.xml Lukas On 29/07/11 12:14, Vincenzo Maggio wrote: Hi, you are perfectly right, nslookup reckons mydomain.com (what a bad luck, I didn't think that someone could register "mydomain.com"!) but not b.c. What misled me is the fact that I thought that being on the same host, the epmd deamon could manage to ping the nodes because I added them to hosts file. Indeed, when you issue 'epmd -nodes' it recognizes the nodes names (like 'a' and 'b') without the host and domain part, so I thought that epmd simply uses a simple host lookup, not a domain lookup. I think that it should be pointed out in erlang docs that epmd uses nslookup to route requests between nodes. As far as you know, is this the right place for this kind of suggestions? Many thanks for the help!!! Vincent > Date: Fri, 29 Jul 2011 09:02:56 +0200 > From: ess@REDACTED > To: maggio.vincenzo@REDACTED > CC: erlang-bugs@REDACTED > Subject: Re: [erlang-bugs] Erlang doesn't connect with "short" long names > > Shinji Ikari wrote: > > Hello, > > the problem, on my laptop (Win XP SP3, OTP/R14B3), can be simply > > replicated with starting two nodes with "short" long names and try to > > connect them: > > > > c:\> erl -name a@REDACTED > > (a@REDACTED)1> > > > > and > Does the host in question in fact have the name 'a.b.c'? > I.e. if you run "nslookup a.b.c", do you get the IP of the machine on > which you're starting that node? > Otherwise, what you try is not expected to work. > > > > c:\> erl -name b@REDACTED > > (b@REDACTED)1>net_adm:ping(a@REDACTED). > > pang > > (b@REDACTED)2>nodes(). > > [] -----> as expected after a 'pang'! > > > > So Erlang doesn't seem to connect this way. But if you simply: > > > > c:\> erl -name a@REDACTED > > (a@REDACTED)1> > > > > c:\> erl -name b@REDACTED > > (b@REDACTED)1>net_adm:ping(a@REDACTED). > > pong > > (b@REDACTED)1>nodes(). > > [a@REDACTED] -----------> as expected after a 'pong'! > > > > > > Really, no clue here, I've also checked standard rules for domain > > names: there is an upper limit (63 characters) but no lower limit, AFAIK. > > > > Thanks in advance! > > > > Vincent > _______________________________________________ erlang-bugs mailing list erlang-bugs@REDACTED http://erlang.org/mailman/listinfo/erlang-bugs -------------- next part -------------- An HTML attachment was scrubbed... URL: From tuncer.ayaz@REDACTED Fri Jul 29 21:16:13 2011 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Fri, 29 Jul 2011 21:16:13 +0200 Subject: [erlang-bugs] Dialyzer hanging In-Reply-To: References: Message-ID: On Fri, Jul 29, 2011 at 3:30 AM, Garret Smith wrote: > I created a small code example, distilled from a couple files in a > larger project, that will cause dialyzer to hang indefinitely. > At least, in the larger project I left dialyzer running for 42 hours > before giving up. I have only left it running for a few minutes on > this small code example before deciding that more time would not help. > > I am running R14B03 on FreeBSD, amd64 architecture: > Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:6:6] [rq:6] > [async-threads:0] [hipe] [kernel-poll:false] > > Steps to reproduce: > erlc +debug_info test.erl > dialyzer --build_plt --output_plt test.plt test.beam > > test.erl: > -module(test). > > -compile(export_all). > > > -record(property, {name, value}). > -opaque property() :: #property{}. > > -record(collection, {id, values :: [#property{}]}). > > as_proplist(#collection{values = Values}) -> > [{Name, Value} || #property{name = Name, value = Value} <- Values] . > > If I can provide any more details that will help, please let me know! Are you sure the record definition -record(collection, {id, values :: [#property{}]}). is correct and wasn't meant to be -record(collection, {id, values :: [property()]}). or -record(collection, {id, values :: list(property())}). ? Only the first definition triggers a hang. From garret.smith@REDACTED Fri Jul 29 21:40:02 2011 From: garret.smith@REDACTED (Garret Smith) Date: Fri, 29 Jul 2011 12:40:02 -0700 Subject: [erlang-bugs] Dialyzer hanging In-Reply-To: References: Message-ID: Yes, the record definition should have been -record(collection, {id, values :: [property()]}). and yes, correcting the record definition also solved the hang problem. -Garret Smith On Fri, Jul 29, 2011 at 12:16 PM, Tuncer Ayaz wrote: > On Fri, Jul 29, 2011 at 3:30 AM, Garret Smith wrote: > > I created a small code example, distilled from a couple files in a > > larger project, that will cause dialyzer to hang indefinitely. > > At least, in the larger project I left dialyzer running for 42 hours > > before giving up. I have only left it running for a few minutes on > > this small code example before deciding that more time would not help. > > > > I am running R14B03 on FreeBSD, amd64 architecture: > > Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:6:6] [rq:6] > > [async-threads:0] [hipe] [kernel-poll:false] > > > > Steps to reproduce: > > erlc +debug_info test.erl > > dialyzer --build_plt --output_plt test.plt test.beam > > > > test.erl: > > -module(test). > > > > -compile(export_all). > > > > > > -record(property, {name, value}). > > -opaque property() :: #property{}. > > > > -record(collection, {id, values :: [#property{}]}). > > > > as_proplist(#collection{values = Values}) -> > > [{Name, Value} || #property{name = Name, value = Value} <- > Values] . > > > > If I can provide any more details that will help, please let me know! > > Are you sure the record definition > -record(collection, {id, values :: [#property{}]}). > is correct and wasn't meant to be > -record(collection, {id, values :: [property()]}). > or > -record(collection, {id, values :: list(property())}). > ? > > Only the first definition triggers a hang. > -------------- next part -------------- An HTML attachment was scrubbed... URL: