[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby File Copy SEG-FAULT on 64-bit System

Cynthia Jeness

12/14/2006 7:19:00 PM

I have a Ruby script which copies certain files from one subdirectory to
another.
I am running the latest version of Ruby (1.8.51.10) available
from Suse under Suse Linux 9.3. On my 32-bit computer, my Ruby script
executes successfully. However, on my 64-bit AMD computer the script
fails with the following error:

/usr/lib64/ruby/1.8/ftools.rb:27: [BUG] Segmentation faul
ruby 1.8.1 (2003-12-25) [x86_64-linux]

Here is the line from my Ruby script which copies the file:

File::syscopy(path1, path2)

"path1" is the source file name and "path2" is the target file name.
I
have verified that both names are correct. The file being copied is
130
Mb and the copy consistently fails on the 64-bit computer afterr 77 Mb
have
been copied. I have tried the script on 2 64-bit computers running
Suse
9.3 and the copy fails in an idential manner. I have also tried the
scrip
on 1 32-bit computer running Suse 9.3 and the copy consistently
succeeds.
There is no issue on any of the computers on smaller files.

Since the failure occurs midway through the execution of "syscopy", it
seems to me that the issue may lie with the 64-bit version of ftools.rb.

Any suggestions would be greatly appreciated.

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

5 Answers

Daniel Berger

12/14/2006 7:47:00 PM

0


Cynthia Jeness wrote:
> I have a Ruby script which copies certain files from one subdirectory to
> another.
> I am running the latest version of Ruby (1.8.51.10) available
> from Suse under Suse Linux 9.3. On my 32-bit computer, my Ruby script
> executes successfully. However, on my 64-bit AMD computer the script
> fails with the following error:
>
> /usr/lib64/ruby/1.8/ftools.rb:27: [BUG] Segmentation faul
> ruby 1.8.1 (2003-12-25) [x86_64-linux]

I'm confused - are you running 1.8.5 or 1.8.1 on your 64 bit machine?

<snip>

> Since the failure occurs midway through the execution of "syscopy", it
> seems to me that the issue may lie with the 64-bit version of ftools.rb.

Quite possible, as I've hit obscure segfaults with ftools that I've
never been able to narrow down. My suggestion, for the immediate time,
is to use FileUtils.cp instead. In the meantime, consider submitting a
bug on RubyForge (assuming this really is for 1.8.5 and not 1.8.1).

Regards,

Dan

Cynthia Jeness

12/14/2006 8:56:00 PM

0

Daniel Berger wrote:
> Cynthia Jeness wrote:
>> I have a Ruby script which copies certain files from one subdirectory to
>> another.
>> I am running the latest version of Ruby (1.8.51.10) available
>> from Suse under Suse Linux 9.3. On my 32-bit computer, my Ruby script
>> executes successfully. However, on my 64-bit AMD computer the script
>> fails with the following error:
>>
>> /usr/lib64/ruby/1.8/ftools.rb:27: [BUG] Segmentation faul
>> ruby 1.8.1 (2003-12-25) [x86_64-linux]
>
> I'm confused - are you running 1.8.5 or 1.8.1 on your 64 bit machine?
>
> <snip>

I am running the same version on all computers: 1.8.1-51.10. In my
original post I neglected to include the "1-" in front of the "51". I
also went back to the Suse site and verified that nothing later is
available through their update process.
>
>> Since the failure occurs midway through the execution of "syscopy", it
>> seems to me that the issue may lie with the 64-bit version of ftools.rb.
>
> Quite possible, as I've hit obscure segfaults with ftools that I've
> never been able to narrow down. My suggestion, for the immediate time,
> is to use FileUtils.cp instead. In the meantime, consider submitting a
> bug on RubyForge (assuming this really is for 1.8.5 and not 1.8.1).
>

I changed to FileUtils.cp but received a similar segmentation fault.
Of course, it occurred on a different line number (423). However, in
both the case of fstools and FileUtils, the line is simply copying using
sysread and syswrite.

Cindy



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

Cynthia Jeness

12/14/2006 9:19:00 PM

0

Cynthia Jeness wrote:
> Daniel Berger wrote:
>> Cynthia Jeness wrote:
>>> I have a Ruby script which copies certain files from one subdirectory to
>>> another.
>>> I am running the latest version of Ruby (1.8.51.10) available
>>> from Suse under Suse Linux 9.3. On my 32-bit computer, my Ruby script
>>> executes successfully. However, on my 64-bit AMD computer the script
>>> fails with the following error:
>>>
>>> /usr/lib64/ruby/1.8/ftools.rb:27: [BUG] Segmentation faul
>>> ruby 1.8.1 (2003-12-25) [x86_64-linux]
>>
>> I'm confused - are you running 1.8.5 or 1.8.1 on your 64 bit machine?
>>
>> <snip>
>
> I am running the same version on all computers: 1.8.1-51.10. In my
> original post I neglected to include the "1-" in front of the "51". I
> also went back to the Suse site and verified that nothing later is
> available through their update process.
>>
>>> Since the failure occurs midway through the execution of "syscopy", it
>>> seems to me that the issue may lie with the 64-bit version of ftools.rb.
>>
>> Quite possible, as I've hit obscure segfaults with ftools that I've
>> never been able to narrow down. My suggestion, for the immediate time,
>> is to use FileUtils.cp instead. In the meantime, consider submitting a
>> bug on RubyForge (assuming this really is for 1.8.5 and not 1.8.1).
>>
>
> I changed to FileUtils.cp but received a similar segmentation fault.
> Of course, it occurred on a different line number (423). However, in
> both the case of fstools and FileUtils, the line is simply copying using
> sysread and syswrite.
>
> Cindy

I downloaded the latest source code from the Ruby site (1.8.5-p2) and
compiled it. This resolved my problem. So Suse needs to upgrade
their rpm to a more recent version so that Ruby can be handled by the
normal Suse update process (especially for security bugs.)

Cindy


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

The Peeler

8/24/2012 9:53:00 AM

0

On Fri, 24 Aug 2012 10:51:36 +0200, Dumb Heini, the Dutch resident Nazi
troll of sci and scj, wrote:

>> i think the good rev.will be very disappointed when he sees these pictures
>> of one of his countrymen
>
> Why will he be disappointed, inferior kaaskop?
>
> you are not in a position to ask questions, lullo you were only born to
> answer questions

We ARE in a position to ask questions, Dutch retard! And obviously you were
only born to get clobbered by everyone who feels like clobbering you, you
hilarious stupid Dutch cretin! LOL


--
The Dutch Nazitard: why do you americans always have to call me hei9nnie
while my posatings clearly indicaate my name is heinrich?
MID: <4dad5b41$0$20532$2e0edba0@news.tweakdsl.nl>

The Peeler

8/24/2012 9:55:00 AM

0

On Fri, 24 Aug 2012 11:14:00 +0200, Dumb Heini, the Dutch resident Nazi
troll of sci and scj, wrote:

>
> [stupidity snipped]
>
> Answer the question, inferior dog-murdering kaaskop.
>
> forget it, swine

Answer the question, you sick senile Dutch Nazi swine and fag!


--
Dumb Dutch Nazi Heini commenting on his misery: "si9nce we are talking to
each other my mood has improved"
Message-ID: <DPgVo.27315$My1.20853@newsfe16.iad>