Re: glib memory allocation problems
- From: Dimitrios Apostolou <jimis gmx net>
- To: Miklos Szeredi <miklos szeredi hu>
- Cc: timj gtk org, gtk-devel-list gnome org
- Subject: Re: glib memory allocation problems
- Date: Tue, 15 May 2007 18:23:35 +0300
On Tue, 15 May 2007 16:14:26 +0200
Miklos Szeredi <miklos szeredi hu> wrote:
> OK, found the problem: g_thread_init() wasn't called by sshfs, and
> hence the thread private data used by gslice wasn't actually thread
> private.
>
> Now I see that the mandatory use of g_thread_init() is documented, but
> it's very non-obvious without reading the docs. And there are no
> apparent problems if it's not called. Sshfs got away with it for a
> long time even though people do stress it pretty heavily.
>
> So the question is, should glib not make some sanity checking for code
> that is not actually thread related (like gslice).
>
> Dimitrios, there's a patch attached that should fix the crashes.
>
> Thanks,
> Miklos
Thank you Miklos, I am trying the patch now and I'll let you know how it goes. I really hope sshfs won't be crashing again.
I don't understand some things however, so here are some questions to glib devs:
1) Why the crash didn't occur when using G_SLICE=always-malloc?
2) I never got any warning when using G_SLICE=debug-blocks, although I reproduced the crash several times. Is it normal?
3) What about the constantly increasing memory usage that I described in my first email, is it expected when using G_SLICE=always-malloc? I was certainly surprised to witness my system crawl down to a halt, because of swapping...
Thanks in advance,
Dimitris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]