Wine explorer shows incorrect disk space

Questions about Wine on Linux
Locked
southbird
Level 1
Level 1
Posts: 6
Joined: Thu Apr 04, 2013 7:18 pm

Wine explorer shows incorrect disk space

Post by southbird »

Actually, I don't think this is limited to "too big" partitions... something else is afoot. I have a 500GB hard drive which is partitioned down a bit and this has never been a problem for Wine. wine-1.5.26 is the first one where I've noticed this issue when I attempted to install something and it complained of lack of disk space. I've attached a screenshot of Wine Explorer, and it seems to randomly report some tiny amount of free space... as little as 4MB, as much as 100MB or so. Linux itself reports 57GB free, which by no means should be "too big" for Windows (at least Windows 2000 level), Wine, or anything else.

I think a bug needs to be filed somewhere, though other than the fact that they run a Bugzilla, I'm not sure the full process and procedure to bug reporting on Wine. Wouldn't want to upset any developers... but I am well aware they generally don't read the forums. I also would like to rule out something environmental (e.g. Bug in this Linux kernel version or something) so I'd be interested if others are seeing this as well.
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

Re: Icewind Dale - not enough free space

Post by lahmbi5678 »

Maybe you got me wrong. There are Windows applications/games, that have issues with partitions bigger than let's say 32 or 128 GB (don't know about the exact 'limit'). Your issue may be a bug in wine, but you really should try to run it from a 'small' partition.
southbird
Level 1
Level 1
Posts: 6
Joined: Thu Apr 04, 2013 7:18 pm

Re: Icewind Dale - not enough free space

Post by southbird »

lahmbi5678 wrote:Maybe you got me wrong. There are Windows applications/games, that have issues with partitions bigger than let's say 32 or 128 GB (don't know about the exact 'limit'). Your issue may be a bug in wine, but you really should try to run it from a 'small' partition.
Oh, no, I understand what you're getting at, but I believe the problem is that they're tracking free space by an unsigned 32-bit integer, which would wrap around every 4 billion bytes. To prove this idea, I made a 5GB image and mounted it. Note that Linux reports a little under 5GB free, and Wine is reporting under 1GB, which is what I'd expect:

[xx]@[yy]:~$ dd if=/dev/zero of=test.img bs=1G count=5
5+0 records in
5+0 records out
5368709120 bytes (5.4 GB) copied, 118.179 s, 45.4 MB/s
[xx]@[yy]:~$ mkfs.ext4 test.img
...
Writing superblocks and filesystem accounting information: done

[xx]@[yy]:~$ sudo mount -o loop test.img /mnt/temp
[xx]@[yy]:~$ df -h
Filesystem Size Used Avail Use% Mounted on
...
/dev/loop0 5.0G 465M 4.3G 10% /mnt/temp
[xx]@[yy]:~$ wine explorer

See attachment (yellow highlighting mine.) Note that Wine Explorer is reporting incorrectly about both the total size and free space, with the expected wrap-around to 1GB. This is really unacceptable behavior at a partition size of only 5GB, and I wouldn't expect to see issues until we get into 2+ TB, which we're no where close to. This clearly seems to be a bug.
Attachments
explorer.png
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

Re: Icewind Dale - not enough free space

Post by lahmbi5678 »

Afair all that "not enough free space" bugs should have been fixed years ago. Looking at your sample, is a blocksize of 1GB really reasonable? Could you try the same with bs=512 or bs=32k and appropriate count? I just saw, that you are on BSD, do you have a linux installation and could you try the game on it, too?

If all that fails, feel free to file a bug.
southbird
Level 1
Level 1
Posts: 6
Joined: Thu Apr 04, 2013 7:18 pm

Re: Icewind Dale - not enough free space

Post by southbird »

lahmbi5678 wrote:Afair all that "not enough free space" bugs should have been fixed years ago. Looking at your sample, is a blocksize of 1GB really reasonable? Could you try the same with bs=512 or bs=32k and appropriate count? I just saw, that you are on BSD, do you have a linux installation and could you try the game on it, too?
Just because something WAS fixed doesn't mean that someone broke it again. Also, not sure what made you think I'm on BSD, this is an Ubuntu 12.10 installation. And to make it clear, I first noticed this free space issue when I was running an installer which complained that there wasn't sufficient space available. Using Wine Explorer is just the easiest way I can think for it to demonstrate it in a GUI.

As for my "dd" call, given that I'm pulling from /dev/zero, it doesn't really matter how I calculate the space it pulls... it will all end up as a big file of zeros. It might more or less optimize the giant file I'm writing to the hard drive is all. :P

But just to give you benefit of the doubt, I went ahead and did a run with dd if=/dev/zero of=test.img bs=32K count=163840, which amounts to much the same thing. Console output shown below. Wine Explorer still reports the same problem; size of 943MB and free space of 223MB.

Could you (or anyone else looking at this) possibly run the same experiment? I'm currently on wine-1.5.27 doing the steps below. Alternatively just running Wine Explorer and comparing its estimated size with your actual partition size / free space would be good, too.


[xx]@[yy]:~$ dd if=/dev/zero of=test.img bs=32K count=163840
163840+0 records in
163840+0 records out
5368709120 bytes (5.4 GB) copied, 96.897 s, 55.4 MB/s
[xx]@[yy]:~$ mkfs.ext3 test.img
mke2fs 1.42.5 (29-Jul-2012)
...
[xx]@[yy]:~$ sudo mount -o loop test.img /mnt/temp
[xx]@[yy]:~$ df -h
Filesystem Size Used Avail Use% Mounted on
...
/dev/loop0 5.0G 139M 4.6G 3% /mnt/temp
[xx]@[yy]:~$ export WINEPREFIX=/mnt/temp/.wineTEST
[xx]@[yy]:~$ wine explorer
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: Icewind Dale - not enough free space

Post by dimesio »

southbird wrote:Also, not sure what made you think I'm on BSD, this is an Ubuntu 12.10 installation.
Your original post says
I'm running wine-1.5.22 on PC-BSD 9.1 AMD64.
Alternatively just running Wine Explorer and comparing its estimated size with your actual partition size / free space would be good, too.
It's definitely greatly misreporting the size of the Z: drive on my system: I have two 1TB drives that are nowhere near filled, but it gives the available space as only 3.86 GB.

This might be related to http://bugs.winehq.org/show_bug.cgi?id=29706.
southbird
Level 1
Level 1
Posts: 6
Joined: Thu Apr 04, 2013 7:18 pm

Re: Icewind Dale - not enough free space

Post by southbird »

dimesio wrote:
southbird wrote:Also, not sure what made you think I'm on BSD, this is an Ubuntu 12.10 installation.
Your original post says
I'm running wine-1.5.22 on PC-BSD 9.1 AMD64.
Oh, lol, that's not my post... I've just been replying to this thread. :)

Maybe I'll throw a comment there and see if it makes sense to those guys then...
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

Re: Icewind Dale - not enough free space

Post by lahmbi5678 »

Ok, I just tried to create a 5GB loop device on openSuSE 12.2 32bit, and I'm getting the same issue in wine explorer, it shows me a drive with 943MB capacity and 549MB free.
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: Icewind Dale - not enough free space

Post by dimesio »

southbird wrote: Oh, lol, that's not my post... I've just been replying to this thread. :)
Don't hijack threads. I've split your posts and the replies to them from the original.
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: Wine explorer shows incorrect disk space

Post by dimesio »

wine-1.5.26 is the first one where I've noticed this issue when I attempted to install something and it complained of lack of disk space.
I did a quick check in 1.4, and explorer showed the same incorrect values as 1.5.27. I have also not encountered any installers complaining about lack of space. But if you really believe this is a regression you should run a regression test. http://wiki.winehq.org/RegressionTesting
southbird
Level 1
Level 1
Posts: 6
Joined: Thu Apr 04, 2013 7:18 pm

Re: Icewind Dale - not enough free space

Post by southbird »

dimesio wrote:
southbird wrote: Oh, lol, that's not my post... I've just been replying to this thread. :)
Don't hijack threads. I've split your posts and the replies to them from the original.
Misunderstanding ... originally my intention was not to hijack the thread, I thought I was displaying a Wine general malfunction with disk space. However, when I thought about it more, it might be simply a bug in Wine Explorer only (hence your split is justified enough I suppose.)

Anyway, if I encounter another installer situation that complains of incorrect disk space, I'll look into it further. For now it seems like this might only be a Wine Explorer bug.
Locked