From: Guillaume Marcais Date: 2005-09-11T11:23:01+09:00 Subject: Re: Mmap crash when appending Le 10 sept. 05, � 15:01, Ara.T.Howard a �crit : > works fine for me: > > harp:~ > irb -r mmap -r fileutils > irb(main):001:0> FileUtils::touch 'mmap' > => ["mmap"] > irb(main):002:0> mm = Mmap.new("mmap", "rw") Yes, as suggested by Guy, using "rw" instead of "w" fixes the problem, however weird that may seem. His patch in ruby-talk:155557 fixed the problem too. > > thoughts: > > - redhat has had many bugs with there mmap code. a short while ago i > reported a simple c program that would hang the kernel > > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=124626 > > perhaps your linux version is buggy. if so bug the developers - > mmap is > such a fundemental operation (programs are always mmap'd when run > by the > kernel) that it's astounding that bugs like this get released. I am not using RedHat but Mandrake (note that I am not claiming anything about the quality of one over the other). > - did you install ruby via some package manager but compile the mmap > dist? > if you i'd (always) compile ruby vs. trusting the binary dists and > compile > mmap using this ruby, then see if the problem persists. Correct, it is the distro binary of ruby and a self compile mmap. > other than that i can tell you i'm abusing mmap in the most sinister > ways with > no crashes or data corruption on a variety of linux dists. Well, your recent posts on the subject have been inspirational... I have crashed ruby using mmap after forking (haven't nailed down the bug yet). I'll recompile ruby to see if that's the problem. Guillaume.