RSS/Atom feed Twitter
Site is read-only, email is disabled

Temp file stops at 2GB

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

9 of 9 messages available
Toggle history

Please log in to manage your subscriptions.

Temp file stops at 2GB Michael 16 Aug 20:09
  Temp file stops at 2GB Sven Neumann 19 Aug 12:55
Temp file stops at 2GB Michael 05 Sep 05:02
  Temp file stops at 2GB Sven Neumann 05 Sep 13:04
Temp file stops at 2GB Michael 06 Sep 00:20
  Temp file stops at 2GB Sven Neumann 06 Sep 00:33
Temp file stops at 2GB Michael 06 Sep 03:55
  Temp file stops at 2GB Sven Neumann 06 Sep 03:46
  Temp file stops at 2GB Malcolm Tredinnick 06 Sep 03:51
Michael
2002-08-16 20:09:16 UTC (over 21 years ago)

Temp file stops at 2GB

I have compiled Gimp 1.2.3 with -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 and it can see files over 2GB ok, but if I create a new image that is over say 3GB then the swap file fills up until gets to 2GB and then stops. Gimp then starts to use up the rest of physical memory until the kernel jumps in and then sends it to its rest. Is there a variable in the source that I can increase to make the swap file bigger?

Michael

Sven Neumann
2002-08-19 12:55:03 UTC (over 21 years ago)

Temp file stops at 2GB

Hi,

Michael writes:

I have compiled Gimp 1.2.3 with -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 and it can see files over 2GB ok, but if I create a new image that is over say 3GB then the swap file fills up until gets to 2GB and then stops. Gimp then starts to use up the rest of physical memory until the kernel jumps in and then sends it to its rest.
Is there a variable in the source that I can increase to make the swap file bigger?

there are several places that need to be tweaked. I have done a couple of changes in the 1.3 development tree that should allow to use large swap files as well as large tile cache sizes. These changes haven't yet seen much testing however. I'd appreciate your feedback if you want to give it a try.

Salut, Sven

Michael
2002-09-05 05:02:03 UTC (over 21 years ago)

Temp file stops at 2GB

Sven Neumann wrote:

Hi,

Michael writes:

I have compiled Gimp 1.2.3 with -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 and it can see files over 2GB ok, but if I create a new image that is over say 3GB then the swap file fills up until gets to 2GB and then stops. Gimp then starts to use up the rest of physical memory until the kernel jumps in and then sends it to its rest.
Is there a variable in the source that I can increase to make the swap file bigger?

there are several places that need to be tweaked. I have done a couple of changes in the 1.3 development tree that should allow to use large swap files as well as large tile cache sizes. These changes haven't yet seen much testing however. I'd appreciate your feedback if you want to give it a try.

Salut, Sven

Hello again,

I have compiled the 1.3.8 release after finally getting hold of the required files (I only have a modem so they were a bit big for me) and grepped the resulting binaries to check that fopen64 was there. If I set the image size to 65536 x 65536 the file size indocator says 0 kb, after messing with the sizes a bit more it seems that the indicator wraps around at 4096 MB. If I then open a file it seems that this version does things the other way and fills up the memory first and then attacks the kernel's swapfile so I couldn't check Gimps swap file because it didn't seem to create one before the kernel killed it. I must say that I was impressed at the speed at which the Gimp filled up the memory it was very fast.

Michael.

Sven Neumann
2002-09-05 13:04:23 UTC (over 21 years ago)

Temp file stops at 2GB

Hi,

Michael writes:

I have compiled the 1.3.8 release after finally getting hold of the required files (I only have a modem so they were a bit big for me) and grepped the resulting binaries to check that fopen64 was there. If I set the image size to 65536 x 65536 the file size indocator says 0 kb,

hmm, that's a bug in the user interface. Could you file a bug-report for it, please ?

after messing with the sizes a bit more it seems that the indicator wraps around at 4096 MB. If I then open a file it seems that this version does things the other way and fills up the memory first and then attacks the kernel's swapfile so I couldn't check Gimps swap file because it didn't seem to create one before the kernel killed it. I must say that I was impressed at the speed at which the Gimp filled up the memory it was very fast.

hmm, we didn't do any significant changes to the way GIMP handles the tile cache so it should actually behave just like GIMP-1.2. The only difference should be that it should now be possible to use a cache of size > 2GB and that the core should be able to deal with swap files larger than 2GB. I say "should" since these changes haven't seen much testing yet.

Salut, Sven

Michael
2002-09-06 00:20:49 UTC (over 21 years ago)

Temp file stops at 2GB

Hello,

Sven Neumann wrote:
> Hi,
>
> Michael writes:
>
>
>>I have compiled the 1.3.8 release after finally getting hold of the >>required files (I only have a modem so they were a bit big for me) and >>grepped the resulting binaries to check that fopen64 was there. If I >>set the image size to 65536 x 65536 the file size indocator says 0 kb, >
>
> hmm, that's a bug in the user interface. Could you file a bug-report > for it, please ?
>
I'm not actually running Gnome 2, I only have the libraries required to compile Gimp 1.3. Should I then just be filing the report against gtk+2? >
>>after messing with the sizes a bit more it seems that the indicator >>wraps around at 4096 MB. If I then open a file it seems that this >>version does things the other way and fills up the memory first and >>then attacks the kernel's swapfile so I couldn't check Gimps swap file >>because it didn't seem to create one before the kernel killed it. I >>must say that I was impressed at the speed at which the Gimp filled up >>the memory it was very fast.
>
>
> hmm, we didn't do any significant changes to the way GIMP handles the > tile cache so it should actually behave just like GIMP-1.2. The only > difference should be that it should now be possible to use a cache of > size > 2GB and that the core should be able to deal with swap files > larger than 2GB. I say "should" since these changes haven't seen much > testing yet.
>
Yes they do look the same. I have added some g_print() statements in the code and the config file is being parsed for the temp file location but the value is being lost somewhere. Can you suggest any good places to put some g_prints to see what is going on? Here is some sample output:-

[root@mike bin]# ./gimp-1.3 using MMX: yes
swapfile is: /big/tmp/gimpswap.30852 swap add filename: /big/tmp/gimpswap.30852/n[Invalid UTF-8] swapfile is still: (¹g@(¹g@/gimpswap.30852

so it is being parsed ok if, you ignore my errors, but there is no error to say why the file is not being created in the suggested location.

> > Salut, Sven
>
>

Michael.

p.s. if I turn on conservative memory usage then it does create a few smaller temp files, but still no big one.

Sven Neumann
2002-09-06 00:33:42 UTC (over 21 years ago)

Temp file stops at 2GB

Hi,

Michael writes:

hmm, that's a bug in the user interface. Could you file a bug-report

> for it, please ?
>
I'm not actually running Gnome 2, I only have the libraries required to compile Gimp 1.3. Should I then just be filing the report against gtk+2?

huh? You should report the bug against GIMP. How is this related to GNOME2? Did they do some changes to the bug-reporting interface I'm not aware of? I'd suggest you use http://bugs.gimp.org/.

Salut, Sven

Sven Neumann
2002-09-06 03:46:10 UTC (over 21 years ago)

Temp file stops at 2GB

Hi,

Michael writes:

I was just looking at the above text and suddenly realised that the path had turned to garbage in the third g_print line which I had put into base.c like this:-

[snip]

g_free (path);

paint_funcs_setup ();

g_print ("swapfile is still: %s\n", path);

you are freeing path before you print it. No wonder it turns into garbage.

Salut, Sven

Malcolm Tredinnick
2002-09-06 03:51:53 UTC (over 21 years ago)

Temp file stops at 2GB

On Fri, Sep 06, 2002 at 02:55:43AM +0100, Michael wrote:

[root@mike bin]# ./gimp-1.3

>using MMX: yes
>swapfile is: /big/tmp/gimpswap.30852 >swap add filename: /big/tmp/gimpswap.30852/n[Invalid UTF-8] >swapfile is still: (¹g@(¹g@/gimpswap.30852

I was just looking at the above text and suddenly realised that the path had turned to garbage in the third g_print line which I had put into base.c like this:-

void
base_init (void)
{
gchar *swapfile;
gchar *path;

#ifdef HAVE_ASM_MMX use_mmx = use_mmx && (intel_cpu_features() & (1 << 23)) ? 1 : 0; g_print ("using MMX: %s\n", use_mmx ? "yes" : "no"); #endif

toast_old_temp_files ();

/* Add the swap file */ if (base_config->swap_path == NULL) base_config->swap_path = g_strdup (g_get_tmp_dir ());

swapfile = g_strdup_printf ("gimpswap.%lu", (unsigned long) getpid ());

path = g_build_filename (base_config->swap_path, swapfile, NULL);

g_print ("swapfile is: %s\n", path);

g_free (swapfile);

tile_swap_add (path, NULL, NULL);

g_free (path);

^^^^^^^^^^^^^^^
You free path here...

paint_funcs_setup ();

g_print ("swapfile is still: %s\n", path);

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... but you try to use the it here. Don't do that. :)

}

so for some reason the path is being messed up in the lines between my two added g_prints. Any advice?

Cheers,
Malcolm

Michael
2002-09-06 03:55:43 UTC (over 21 years ago)

Temp file stops at 2GB

>[root@mike bin]# ./gimp-1.3
>using MMX: yes
>swapfile is: /big/tmp/gimpswap.30852 >swap add filename: /big/tmp/gimpswap.30852/n[Invalid UTF-8] >swapfile is still: (¹g@(¹g@/gimpswap.30852

I was just looking at the above text and suddenly realised that the path had turned to garbage in the third g_print line which I had put into base.c like this:-

void
base_init (void)
{
gchar *swapfile;
gchar *path;

#ifdef HAVE_ASM_MMX use_mmx = use_mmx && (intel_cpu_features() & (1 << 23)) ? 1 : 0; g_print ("using MMX: %s\n", use_mmx ? "yes" : "no"); #endif

toast_old_temp_files ();

/* Add the swap file */ if (base_config->swap_path == NULL) base_config->swap_path = g_strdup (g_get_tmp_dir ());

swapfile = g_strdup_printf ("gimpswap.%lu", (unsigned long) getpid ());

path = g_build_filename (base_config->swap_path, swapfile, NULL);

g_print ("swapfile is: %s\n", path);

g_free (swapfile);

tile_swap_add (path, NULL, NULL);

g_free (path);

paint_funcs_setup ();

g_print ("swapfile is still: %s\n", path); }

so for some reason the path is being messed up in the lines between my two added g_prints. Any advice?

Michael.

p.s. Just did a bit more testing and found that if I change the path to /tmp the I get this:-

swapfile is: /tmp/gimpswap.32180 swap add filename: /tmp/gimpswap.32180/n[Invalid UTF-8] swapfile is still: (¹g@(¹g@pswap.32180

so it looks like that corruption eats into the path at some point during initialisation.