Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > `make check' hangs, when the source directory is read-only

Reply
Thread Tools

`make check' hangs, when the source directory is read-only

 
 
Міхаіл Т.
Guest
Posts: n/a
 
      10-20-2009
Hello!

I'm building platform-specific Ruby-binaries (1.8.7-p174) for each of
our several platforms based on a single source-code directory, that's
available read-only.

The build is fine (except in the win32ole directory, which I had to
remove). `make test' succeeds:

# :/tmp/ruby-1.8.7-p174-x86_64-pc-linux-gnu (203) make test
test succeeded

However, when I try to `make check', I get:

# :/tmp/ruby-1.8.7-p174-x86_64-pc-linux-gnu (204) make check
test succeeded
/miniruby -I/src/PUBruby/ruby-1.8.7-p174/lib -I.ext/common -I./-
-r/src/PUBruby/ruby-1.8.7-p174/ext/purelib.rb
/src/PUBruby/ruby-1.8.7-p174/runruby.rb --extout=.ext --
"/src/PUBruby/ruby-1.8.7-p174/test/runner.rb"
--basedir="/src/PUBruby/ruby-1.8.7-p174/test" --runner=console

Launching `top' in another window I can see the ruby process spinning...
I left it running for 3 hours, and it accumulated 3 hours of CPU time...

Please, advise. Thanks!
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Міхаіл Т.
Guest
Posts: n/a
 
      10-20-2009
> I'm building platform-specific Ruby-binaries (1.8.7-p174) for each of
> our several platforms based on a single source-code directory, that's
> available read-only.


Actually, never mind... Something else must be wrong. I copied the
source tree locally and ran the build there -- the most vanilla way to
build things.

`make check' -- as well as a single random test -- still spins...

Running under strace shows:

strace ./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb
/runruby.rb --extout=.ext -- "./test/runner.rb" --basedir="./test"
test/soap/test_basetype.rb
...
lots of output
...
open("/tmp/ruby-1.8.7-p174-x86_64-pc-linux-gnu/test/soap/test_basetype.rb",
O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=27077, ...}) = 0
close(3) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], = 0
open("/tmp/ruby-1.8.7-p174-x86_64-pc-linux-gnu/test/soap/test_basetype.rb",
O_RDONLY) = 3
close(3) = 0
open("/tmp/ruby-1.8.7-p174-x86_64-pc-linux-gnu/test/soap/test_basetype.rb",
O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=27077, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x2b1f51586000
read(3, "require 'test/unit'\nrequire 'soa"..., 4096) = 4096
read(3, "34567890123456789012345678901234"..., 4096) = 4096
<- HANG ->

This is on an RHEL-5.4 machine (RedHat's own older version of Ruby NOT
installed), x86_64. The configure was run thus:

env CC=gcc44 CFLAGS="-O2 -pipe -march=nocona" ./configure
--prefix=/usr/local/pub/ruby__1.8.7-p174
--mandir=/usr/local/pub/ruby__1.8.7-p174/man --enable-pthread
--disable-install-doc

The C-compiler (gcc44) is gcc version 4.4.0 20090514 (Red Hat 4.4.0-6)
(GCC).
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Міхаіл Т.
Guest
Posts: n/a
 
      10-21-2009
Міхаіл Т. wrote:
> The C-compiler (gcc44) is gcc version 4.4.0 20090514 (Red Hat 4.4.0-6)
> (GCC).


Simply recompiling from scratch using gcc-4.1.2 solved the hanging
problem for me. The check is now running (outputting a dot as
progress-report).

Alternatively, using gcc-4.4.0, but with less aggressive optimization
(-O1 instead of -O2) avoids the problem as well.

Increasing the compiler warnings level (-Wall), one can see a lot of
negative comments, including a bunch of strict-aliasing violations...

Indeed, this was is already discussed in:

https://bugzilla.redhat.com/show_bug.cgi?id=489990

The bug is in Ruby...

The work-around is to disable strict-aliasing, when compiling. For gcc
users, this is done with -fno-strict-aliasing after the -O2 optimization
flag (see attached patch).

After rebuilding this way, I can get `make check' to start and proceed
(the errors it reports now are the same as with other compilers and
platforms).

Other (non-gcc) compilers are on their own...

-mi

Attachments:
http://www.ruby-forum.com/attachment...ch-Makefile.in

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() are not returning the specified directory Nathan Sokalski ASP .Net 2 09-06-2007 03:58 PM
Session is lost if a directory is created under virtual directory Jack Wright ASP .Net 1 04-19-2005 03:04 PM
Directory and files names in temporary asp.net directory =?Utf-8?B?QmFzIEhlbmRyaWtz?= ASP .Net 5 01-31-2005 01:56 PM
list all css files in a directory and sub directory TJS ASP .Net 1 06-23-2004 10:49 AM
question regarding overriding of web.config in the root directory..in a web app in a virtual directory dotnetprogram ASP .Net 1 12-27-2003 06:02 AM



Advertisments