[Chicken-users] [patch] remove the initial check on directory existance

2013-02-02 Thread richo
This patch removes the internal check for directory existance in create-directory, meaning that it can be treated as atomic on platforms where mkdir(2) is. -- richo || Today's excuse: IRQ dropout http://blog.psych0tik.net From 3e1d5c55b3673403a8a1a69638ffe7083c09967c Mon Sep 17 00:00:00 2001

Re: [Chicken-users] [patch] remove the initial check on directory existance

2013-02-02 Thread Peter Bex
On Sun, Feb 03, 2013 at 02:20:59AM +1100, richo wrote: This patch removes the internal check for directory existance in create-directory, meaning that it can be treated as atomic on platforms where mkdir(2) is. This makes it inconsistent with the documentation (which, iiuc is already the case

Re: [Chicken-users] [patch] remove the initial check on directory existance

2013-02-02 Thread Mario Domenech Goulart
Hi, On Sat, 2 Feb 2013 16:54:19 +0100 Peter Bex peter@xs4all.nl wrote: On Sun, Feb 03, 2013 at 02:20:59AM +1100, richo wrote: This patch removes the internal check for directory existance in create-directory, meaning that it can be treated as atomic on platforms where mkdir(2) is.

Re: [Chicken-users] [patch] remove the initial check on directory existance

2013-02-02 Thread Jim Ursetto
I am positive this is a case where the documentation was written to explain an implementation artifact. That note wasn't added until 11 months ago ... by Mario. The current implementation returns foo if a file foo (not just a directory foo) already exists. No one is ever going to check this

[Chicken-users] Segfault with large data-structures

2013-02-02 Thread Arthur Maciel
Hello! I don't know if it is related to Ivan's problem, but when I compile and run this code: (use srfi-69) (define NODES 25) (define EDGES 1000) (define graph (make-hash-table)) (define (insert-edges) (printf ~N Hash-tables - Inserting edges ~N) (do ((n 1 (+ n 1))) ((= n NODES))

Re: [Chicken-users] Segfault with large data-structures

2013-02-02 Thread Jim Ursetto
What version of chicken, and if 4.8.0 for example could you try 4.7? On Feb 2, 2013, at 11:51, Arthur Maciel arthurmac...@gmail.com wrote: Hello! I don't know if it is related to Ivan's problem, but when I compile and run this code: (use srfi-69) (define NODES 25) (define EDGES

Re: [Chicken-users] Segfault with large data-structures

2013-02-02 Thread Kristian Lein-Mathisen
I'm getting the same result here, when I run it through csc. When I run it through csi, though, it never seems to finish - is the task that big? I had to kill it after 2-3 hours. [klm@kth ~]$ csi -version CHICKEN (c)2008-2012 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.8.1 (rev

Re: [Chicken-users] Segfault with large data-structures

2013-02-02 Thread Arthur Maciel
Jim, I was running 4.8.0.1, but I tried 4.7.0.6 and got the same results. Thanks for the attention. 2013/2/2 Jim Ursetto zbignie...@gmail.com What version of chicken, and if 4.8.0 for example could you try 4.7? On Feb 2, 2013, at 11:51, Arthur Maciel arthurmac...@gmail.com wrote: Hello! I

Re: [Chicken-users] Segfault with large data-structures

2013-02-02 Thread Ivan Raikov
I can also confirm experiencing the same kind of problems with 4.7.0. However, this was always in conjunction with some FFI code, and only recently I began suspecting that segfaults can occur in pure Scheme code. Ivan On Feb 3, 2013 9:11 AM, Arthur Maciel arthurmac...@gmail.com wrote: Jim, I

Re: [Chicken-users] some questions about easyffi and foreign code

2013-02-02 Thread Hugo Arregui
Hi again, 1) .. $ csc -X easyffi test.scm -c++; ./test Error: unbound variable: foreign-parse Call history: foreign-parse I have no idea of what's going on. Could this be a problem in my installation? The example in the wiki is not working either: #! #ifndef CHICKEN

Re: [Chicken-users] Segfault with large data-structures

2013-02-02 Thread Jim Ursetto
On Feb 2, 2013, at 3:46 PM, Kristian Lein-Mathisen wrote: I'm getting the same result here, when I run it through csc. When I run it through csi, though, it never seems to finish - is the task that big? I had to kill it after 2-3 hours. It's a hash table with 250,000 entries and 1,000 items

Re: [Chicken-users] Segfault with large data-structures

2013-02-02 Thread Arthur Maciel
Kristian, thanks for reporting that. I've been running through csi for aproxiamtely 10 hours and it never seems to finish. I'm not sure this task is that big. 2013/2/2 Kristian Lein-Mathisen kristianl...@gmail.com I'm getting the same result here, when I run it through csc. When I run it

Re: [Chicken-users] Segfault with large data-structures (bug)

2013-02-02 Thread Jim Ursetto
(bug found -- tl;dr see end of message) Figured it out: you're exceeding the default maximal heap size, which is 2GB. For whatever reason, Chicken doesn't terminate reliably and with an error in this situation, it just tries to continue. Simply run your program with -:d to see: $

Re: [Chicken-users] Segfault with large data-structures (bug)

2013-02-02 Thread Jim Ursetto
On Feb 2, 2013, at 8:06 PM, Jim Ursetto wrote: Uh oh, we've hit an actual bug now. Although we can get nodes up to 85000 by increasing max heap size from 2GB to 8GB, it appears to bomb after the heap exceeds 4GB, maybe indicating some 32-bit sizes left laying around in the code. Hmm, could

Re: [Chicken-users] Segfault with large data-structures (bug)

2013-02-02 Thread Jim Ursetto
OK, I patched the core and the program runs to completion. Patch forthcoming. $ ./list-partials -:d -:hm16G [debug] application startup... [debug] heap resized to 1048576 bytes [debug] stack bottom is 0x7fff6f80f4b0. [debug] entering toplevel toplevel... [debug] entering toplevel