2002-12-12 03:55:24

by mdew

[permalink] [raw]
Subject: File still being accessed?

Under Linux 2.5.51 Ive noticed that Downloader4X (Getright-type for
linux) http://www.krasu.ru/soft/chuchelo/

when trying to resume a file, It thinks the file is still being
accessed, however under 2.4, it has no such problem. Is this a bug in
2.5.x still? any patches available that could help?

thanks
-mdew


2002-12-12 10:42:59

by mdew

[permalink] [raw]
Subject: Re: File still being accessed?

On Thu, 2002-12-12 at 21:52, Alex Riesen wrote:
> mdew, Thu, Dec 12, 2002 05:03:06 +0100:
> > Under Linux 2.5.51 Ive noticed that Downloader4X (Getright-type for
> > linux) http://www.krasu.ru/soft/chuchelo/
> >
> > when trying to resume a file, It thinks the file is still being
> > accessed, however under 2.4, it has no such problem. Is this a bug in
> > 2.5.x still? any patches available that could help?
>
> which d4x version, what _exactly_ the message states?
> -alex

I've tried both D4X GTK2 (2.4.0-rc1) based and GTK1.2.x (1.3.0) based, same results.

I add a download, let it partially download, then press
"Continue/Restart Downloads"

-> Retry 1 ...
-> Trying to connect...
-> Socket was opened!
-> Trying to create a file
+ File was created!
!! File is already opened by another download!
!! Downloading was failed...

ok, back in 2.4.20, Same file (everything as above)...however, it carrys on.

-> Retry 1 ...
-> Trying to connect...
-> Socket was opened!
-> Trying to create a file
-> File was created!
-> Sending HTTP request...
-> GET /some-file.zip HTTP/1.1
-> Accept: */*
-> Range: bytes=117364442-
-> User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)
-> Host: some-address.com
-> Authorization: Basic bWdldzpQcm2ja8V5kTIzMw==
-> Cookie: bblastvisit=1037145731;
-> Request was sent, waiting for the answer
-> HTTP/1.1 206 Partial Content
-> All ok, reading file
-> Date: Thu, 12 Dec 2002 10:37:48 GMT
-> Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2
-> Last-Modified: Wed, 11 Dec 2002 02:48:29 GMT
-> ETag: "d8080-1579079c-3df2a55d"
-> Accept-Ranges: bytes
-> Content-Length: 242888898
-> Content-Range: bytes 117364442-360253339/360253340
-> Content-Type: text/plain; charset=iso-8859-1
-> Answer read ok
-> Size for download is 242888898 bytes



Attachments:
.config (17.94 kB)

2002-12-12 11:30:09

by Alex Riesen

[permalink] [raw]
Subject: Re: File still being accessed?

mdew, Thu, Dec 12, 2002 11:50:19 +0100:
> > > Under Linux 2.5.51 Ive noticed that Downloader4X (Getright-type for
> > > linux) http://www.krasu.ru/soft/chuchelo/
> > >
> > > when trying to resume a file, It thinks the file is still being
> > > accessed, however under 2.4, it has no such problem. Is this a bug in
> > > 2.5.x still? any patches available that could help?
> > which d4x version, what _exactly_ the message states?
> > -alex
> I've tried both D4X GTK2 (2.4.0-rc1) based and GTK1.2.x (1.3.0) based, same results.
>
> I add a download, let it partially download, then press
> "Continue/Restart Downloads"
>
> -> Retry 1 ...
> -> Trying to connect...
> -> Socket was opened!
> -> Trying to create a file
> + File was created!
> !! File is already opened by another download!
> !! Downloading was failed...

The problem is advisory file locking. I'll try to debug
it later, but something changed in how
fcntl(fd, F_SETLK,{...,F_WRLCK,...}) works. It return an
error now. Or maybe d4x just fails to unlock it, it doesn't
check if unlock failed.
The program doesn't show the real value of errno, just
handles EINVAL and ENOLCK, so exact analisys is not possible
apart something bad happened ("is already opened").
The EINTR case, for instance, would cause similar behaviour.

I suppose d4x just incorrectly uses it, but cannot say anything
for sure.
The maintainer is notified.

-alex

2002-12-13 10:35:32

by mdew

[permalink] [raw]
Subject: Re: File still being accessed?

On Fri, 2002-12-13 at 00:37, Alex Riesen wrote:
> mdew, Thu, Dec 12, 2002 11:50:19 +0100:
> > > > Under Linux 2.5.51 Ive noticed that Downloader4X (Getright-type for
> > > > linux) http://www.krasu.ru/soft/chuchelo/
> > > >
> > > > when trying to resume a file, It thinks the file is still being
> > > > accessed, however under 2.4, it has no such problem. Is this a bug in
> > > > 2.5.x still? any patches available that could help?
> > > which d4x version, what _exactly_ the message states?
> > > -alex
> > I've tried both D4X GTK2 (2.4.0-rc1) based and GTK1.2.x (1.3.0) based, same results.
> >
> > I add a download, let it partially download, then press
> > "Continue/Restart Downloads"
> >
> > -> Retry 1 ...
> > -> Trying to connect...
> > -> Socket was opened!
> > -> Trying to create a file
> > + File was created!
> > !! File is already opened by another download!
> > !! Downloading was failed...
>
> The problem is advisory file locking. I'll try to debug
> it later, but something changed in how
> fcntl(fd, F_SETLK,{...,F_WRLCK,...}) works. It return an
> error now. Or maybe d4x just fails to unlock it, it doesn't
> check if unlock failed.
> The program doesn't show the real value of errno, just
> handles EINVAL and ENOLCK, so exact analisys is not possible
> apart something bad happened ("is already opened").
> The EINTR case, for instance, would cause similar behaviour.
>
> I suppose d4x just incorrectly uses it, but cannot say anything
> for sure.
> The maintainer is notified.
>
> -alex

email me, whenever its solved ;) other than that, I've found 2.5.51
pretty stable..its getting there.

many thanks
-mdew