git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak
@ 2012-10-06 17:33 Ramsay Jones
  2012-10-06 19:22 ` Junio C Hamano
  0 siblings, 1 reply; 11+ messages in thread
From: Ramsay Jones @ 2012-10-06 17:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GIT Mailing-list


The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK
variable, either from the environment or command line of an
'make test' invocation. In order to allow the malloc checks to be
disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK
to the environment using an export directive.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---

Hi Junio,

Now that the malloc checks have been enabled, running the tests has
become somewhat noisy with "malloc: using debugging hooks" messages
spewing continuously to the terminal. [I usually run the tests like
so:

    ramsay$ time $(make test >test-out 2>&1)
    malloc: using debugging hooks
    malloc: using debugging hooks
    ...
    malloc: using debugging hooks

    real    16m11.408s
    user    5m17.412s
    sys     4m54.786s
    ramsay$ 
]
strace tells me that the controlling terminal, /dev/tty, is being
opened directly in order to write these messages. I find this
annoying, so I tried to disable the malloc checks from config.mak ...

Note that I decided not to write the TEST_NO_MALLOC_CHECK setting
to the GIT-BUILD-OPTIONS file, since I prefer to enable/disable
the malloc checks myself when running the test script directly.

ATB,
Ramsay Jones

 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index 8413606..f69979e 100644
--- a/Makefile
+++ b/Makefile
@@ -2636,6 +2636,7 @@ bin-wrappers/%: wrap-for-bin.sh
 # with that.
 
 export NO_SVN_TESTS
+export TEST_NO_MALLOC_CHECK
 
 ### Testing rules
 
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak
  2012-10-06 17:33 [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak Ramsay Jones
@ 2012-10-06 19:22 ` Junio C Hamano
  2012-10-07 13:13   ` Elia Pinto
                     ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Junio C Hamano @ 2012-10-06 19:22 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: GIT Mailing-list, Elia Pinto

Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:

> The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK
> variable, either from the environment or command line of an
> 'make test' invocation. In order to allow the malloc checks to be
> disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK
> to the environment using an export directive.

We would want to encourage people to test with cheap but effective
checks when available.  I do not see "malloc: using debugging hooks"
message anywhere when I run tests, but if you do, I'd rather see us
check if we can tell glibc to stop doing so first without disabling
the whole test.  Your patch feels like the first step to a slipperly
slope whose destination would make us say "we get too many messages
so let's do nothing in "make test" with this configuration." when
taken to the extreme, and obviously we would not want to go there
;-).

Elia, you brought the MALLOC_CHECK_ up.  Did you hear about this
issue elsewhere before, and if you did, do you know how other
projects solves it?

Besides, doesn't a simple instruction to export TEST_NO_MALLOC_CHECK
to your environment before running "make test" suffice?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak
  2012-10-06 19:22 ` Junio C Hamano
@ 2012-10-07 13:13   ` Elia Pinto
  2012-10-08 13:19   ` Elia Pinto
  2012-10-10 17:46   ` Ramsay Jones
  2 siblings, 0 replies; 11+ messages in thread
From: Elia Pinto @ 2012-10-07 13:13 UTC (permalink / raw)
  To: Junio C Hamano, Ramsay Jones, GIT Mailing-list

Hi Julio.

No, i don't know this message before. Difficult that can be related to
a recent glibc change, i think. Perhaps eglibc ? I tomorrow take a
look, i am on travel now.
Best

2012/10/6, Junio C Hamano <gitster@pobox.com>:
> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
>
>> The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK
>> variable, either from the environment or command line of an
>> 'make test' invocation. In order to allow the malloc checks to be
>> disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK
>> to the environment using an export directive.
>
> We would want to encourage people to test with cheap but effective
> checks when available.  I do not see "malloc: using debugging hooks"
> message anywhere when I run tests, but if you do, I'd rather see us
> check if we can tell glibc to stop doing so first without disabling
> the whole test.  Your patch feels like the first step to a slipperly
> slope whose destination would make us say "we get too many messages
> so let's do nothing in "make test" with this configuration." when
> taken to the extreme, and obviously we would not want to go there
> ;-).
>
> Elia, you brought the MALLOC_CHECK_ up.  Did you hear about this
> issue elsewhere before, and if you did, do you know how other
> projects solves it?
>
> Besides, doesn't a simple instruction to export TEST_NO_MALLOC_CHECK
> to your environment before running "make test" suffice?
>
>

-- 
Inviato dal mio dispositivo mobile

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak
  2012-10-06 19:22 ` Junio C Hamano
  2012-10-07 13:13   ` Elia Pinto
@ 2012-10-08 13:19   ` Elia Pinto
  2012-10-09 12:33     ` Christian Couder
  2012-10-10 17:55     ` Ramsay Jones
  2012-10-10 17:46   ` Ramsay Jones
  2 siblings, 2 replies; 11+ messages in thread
From: Elia Pinto @ 2012-10-08 13:19 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Ramsay Jones, GIT Mailing-list

2012/10/6 Junio C Hamano <gitster@pobox.com>:
> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
>
>> The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK
>> variable, either from the environment or command line of an
>> 'make test' invocation. In order to allow the malloc checks to be
>> disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK
>> to the environment using an export directive.
>
> We would want to encourage people to test with cheap but effective
> checks when available.  I do not see "malloc: using debugging hooks"
> message anywhere when I run tests, but if you do, I'd rather see us
> check if we can tell glibc to stop doing so first without disabling
> the whole test.  Your patch feels like the first step to a slipperly
> slope whose destination would make us say "we get too many messages
> so let's do nothing in "make test" with this configuration." when
> taken to the extreme, and obviously we would not want to go there
> ;-).
>
> Elia, you brought the MALLOC_CHECK_ up.  Did you hear about this
> issue elsewhere before, and if you did, do you know how other
> projects solves it?
Ok. I have found. For me this is not a problem any more these days.
Was fixed in glibc 2.8.90-9 2008

* Wed Jul 16 2008 Jakub Jelinek <jakub@redhat.com> 2.8.90-9
- update from trunk
  - fix unbuffered vfprintf if writing to the stream fails (#455360)
  - remove useless "malloc: using debugging hooks" message (#455355)
  - nscd fixes
(from glibc rpm changelog)

This is the bugzilla filled and closed
https://bugzilla.redhat.com/show_bug.cgi?id=455355

Ramsay, what version of glibc you have and in what distro? thanks

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak
  2012-10-08 13:19   ` Elia Pinto
@ 2012-10-09 12:33     ` Christian Couder
  2012-10-10 17:55     ` Ramsay Jones
  1 sibling, 0 replies; 11+ messages in thread
From: Christian Couder @ 2012-10-09 12:33 UTC (permalink / raw)
  To: Elia Pinto; +Cc: Junio C Hamano, Ramsay Jones, GIT Mailing-list

Hi,

On Mon, Oct 8, 2012 at 3:19 PM, Elia Pinto <gitter.spiros@gmail.com> wrote:
> Ok. I have found. For me this is not a problem any more these days.
> Was fixed in glibc 2.8.90-9 2008
>
> * Wed Jul 16 2008 Jakub Jelinek <jakub@redhat.com> 2.8.90-9
> - update from trunk
>   - fix unbuffered vfprintf if writing to the stream fails (#455360)
>   - remove useless "malloc: using debugging hooks" message (#455355)
>   - nscd fixes
> (from glibc rpm changelog)
>
> This is the bugzilla filled and closed
> https://bugzilla.redhat.com/show_bug.cgi?id=455355
>
> Ramsay, what version of glibc you have and in what distro? thanks

I have the same problem on a RHEL 5.3 (2.6.18-128.el5 #1 SMP Wed Dec
17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux) with
glibc-2.5-34.

Best,
Christian.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak
  2012-10-06 19:22 ` Junio C Hamano
  2012-10-07 13:13   ` Elia Pinto
  2012-10-08 13:19   ` Elia Pinto
@ 2012-10-10 17:46   ` Ramsay Jones
  2012-10-10 18:35     ` Elia Pinto
  2012-10-10 19:16     ` Junio C Hamano
  2 siblings, 2 replies; 11+ messages in thread
From: Ramsay Jones @ 2012-10-10 17:46 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GIT Mailing-list, Elia Pinto

Junio C Hamano wrote:
> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
> 
>> The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK
>> variable, either from the environment or command line of an
>> 'make test' invocation. In order to allow the malloc checks to be
>> disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK
>> to the environment using an export directive.
> 
> We would want to encourage people to test with cheap but effective
> checks when available.  I do not see "malloc: using debugging hooks"
> message anywhere when I run tests, but if you do, I'd rather see us
> check if we can tell glibc to stop doing so first without disabling
> the whole test.  Your patch feels like the first step to a slipperly
> slope whose destination would make us say "we get too many messages
> so let's do nothing in "make test" with this configuration." when
> taken to the extreme, and obviously we would not want to go there
> ;-).

[sorry for the late reply, I've been away ...]

Yes, but ... I really don't see that this patch would encourage anyone
to skip the malloc checks, who wasn't going to anyway! I didn't notice
much of an increase in the running time of the tests, so that wouldn't
discourage me. This idiotic message spewage is a different issue.
(the complete loss of terminal scroll-back is particularly annoying)

I had intended to run the tests with malloc checks enabled before
submitting patches, testing -rc* builds etc., but have them disabled
for day-to-day programming.

> Besides, doesn't a simple instruction to export TEST_NO_MALLOC_CHECK
> to your environment before running "make test" suffice?

Yes, so I can simply disable the malloc checks in my ~/.bashrc file.
However, it would be disappointing to have my config tweeks in two
places ... :(

I guess I can live with it ...

ATB,
Ramsay Jones

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak
  2012-10-08 13:19   ` Elia Pinto
  2012-10-09 12:33     ` Christian Couder
@ 2012-10-10 17:55     ` Ramsay Jones
  1 sibling, 0 replies; 11+ messages in thread
From: Ramsay Jones @ 2012-10-10 17:55 UTC (permalink / raw)
  To: Elia Pinto; +Cc: Junio C Hamano, GIT Mailing-list

Elia Pinto wrote:
> 2012/10/6 Junio C Hamano <gitster@pobox.com>:
>> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
>> Elia, you brought the MALLOC_CHECK_ up.  Did you hear about this
>> issue elsewhere before, and if you did, do you know how other
>> projects solves it?
> Ok. I have found. For me this is not a problem any more these days.
> Was fixed in glibc 2.8.90-9 2008
> 
> * Wed Jul 16 2008 Jakub Jelinek <jakub@redhat.com> 2.8.90-9
> - update from trunk
>   - fix unbuffered vfprintf if writing to the stream fails (#455360)
>   - remove useless "malloc: using debugging hooks" message (#455355)
>   - nscd fixes
> (from glibc rpm changelog)
> 
> This is the bugzilla filled and closed
> https://bugzilla.redhat.com/show_bug.cgi?id=455355
> 
> Ramsay, what version of glibc you have and in what distro? thanks

The glibc version is 2.5, if I believe the changelog, along with:

    ramsay$ ls -l /lib/libc.so.6
    lrwxrwxrwx 1 root root 11 2007-06-24 19:44 /lib/libc.so.6 -> libc-2.5.so*
    ramsay$ 

... but the header files tell a different story:

    ramsay$ grep 'define     __GLIBC_' /usr/include/features.h
    #define __GLIBC__       2
    #define __GLIBC_MINOR__ 4
    ramsay$ 

The distro is Ubuntu (but I can't remember which version; I would have
to re-boot to find out so ...).

HTH

ATB,
Ramsay Jones

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak
  2012-10-10 17:46   ` Ramsay Jones
@ 2012-10-10 18:35     ` Elia Pinto
  2012-10-10 18:38       ` Elia Pinto
  2012-10-10 19:16     ` Junio C Hamano
  1 sibling, 1 reply; 11+ messages in thread
From: Elia Pinto @ 2012-10-10 18:35 UTC (permalink / raw)
  To: Ramsay Jones, Junio C Hamano, GIT Mailing-list

Hemm, too old release distro , no ? 4-5 year ago. It is time to
upgrade to something more recent , 5.7 5.8 . Rhel5.3 is not a good
distro for a developer isn't it ?

2012/10/10, Ramsay Jones <ramsay@ramsay1.demon.co.uk>:
> Junio C Hamano wrote:
>> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
>>
>>> The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK
>>> variable, either from the environment or command line of an
>>> 'make test' invocation. In order to allow the malloc checks to be
>>> disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK
>>> to the environment using an export directive.
>>
>> We would want to encourage people to test with cheap but effective
>> checks when available.  I do not see "malloc: using debugging hooks"
>> message anywhere when I run tests, but if you do, I'd rather see us
>> check if we can tell glibc to stop doing so first without disabling
>> the whole test.  Your patch feels like the first step to a slipperly
>> slope whose destination would make us say "we get too many messages
>> so let's do nothing in "make test" with this configuration." when
>> taken to the extreme, and obviously we would not want to go there
>> ;-).
>
> [sorry for the late reply, I've been away ...]
>
> Yes, but ... I really don't see that this patch would encourage anyone
> to skip the malloc checks, who wasn't going to anyway! I didn't notice
> much of an increase in the running time of the tests, so that wouldn't
> discourage me. This idiotic message spewage is a different issue.
> (the complete loss of terminal scroll-back is particularly annoying)
>
> I had intended to run the tests with malloc checks enabled before
> submitting patches, testing -rc* builds etc., but have them disabled
> for day-to-day programming.
>
>> Besides, doesn't a simple instruction to export TEST_NO_MALLOC_CHECK
>> to your environment before running "make test" suffice?
>
> Yes, so I can simply disable the malloc checks in my ~/.bashrc file.
> However, it would be disappointing to have my config tweeks in two
> places ... :(
>
> I guess I can live with it ...
>
> ATB,
> Ramsay Jones
>
>
>
>

-- 
Inviato dal mio dispositivo mobile

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak
  2012-10-10 18:35     ` Elia Pinto
@ 2012-10-10 18:38       ` Elia Pinto
  0 siblings, 0 replies; 11+ messages in thread
From: Elia Pinto @ 2012-10-10 18:38 UTC (permalink / raw)
  To: Ramsay Jones, Junio C Hamano, GIT Mailing-list

No reboot.  lsb-release -a from memory or something similar, always on travel...

Regards

2012/10/10, Elia Pinto <gitter.spiros@gmail.com>:
> Hemm, too old release distro , no ? 4-5 year ago. It is time to
> upgrade to something more recent , 5.7 5.8 . Rhel5.3 is not a good
> distro for a developer isn't it ?
>
> 2012/10/10, Ramsay Jones <ramsay@ramsay1.demon.co.uk>:
>> Junio C Hamano wrote:
>>> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
>>>
>>>> The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK
>>>> variable, either from the environment or command line of an
>>>> 'make test' invocation. In order to allow the malloc checks to be
>>>> disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK
>>>> to the environment using an export directive.
>>>
>>> We would want to encourage people to test with cheap but effective
>>> checks when available.  I do not see "malloc: using debugging hooks"
>>> message anywhere when I run tests, but if you do, I'd rather see us
>>> check if we can tell glibc to stop doing so first without disabling
>>> the whole test.  Your patch feels like the first step to a slipperly
>>> slope whose destination would make us say "we get too many messages
>>> so let's do nothing in "make test" with this configuration." when
>>> taken to the extreme, and obviously we would not want to go there
>>> ;-).
>>
>> [sorry for the late reply, I've been away ...]
>>
>> Yes, but ... I really don't see that this patch would encourage anyone
>> to skip the malloc checks, who wasn't going to anyway! I didn't notice
>> much of an increase in the running time of the tests, so that wouldn't
>> discourage me. This idiotic message spewage is a different issue.
>> (the complete loss of terminal scroll-back is particularly annoying)
>>
>> I had intended to run the tests with malloc checks enabled before
>> submitting patches, testing -rc* builds etc., but have them disabled
>> for day-to-day programming.
>>
>>> Besides, doesn't a simple instruction to export TEST_NO_MALLOC_CHECK
>>> to your environment before running "make test" suffice?
>>
>> Yes, so I can simply disable the malloc checks in my ~/.bashrc file.
>> However, it would be disappointing to have my config tweeks in two
>> places ... :(
>>
>> I guess I can live with it ...
>>
>> ATB,
>> Ramsay Jones
>>
>>
>>
>>
>
> --
> Inviato dal mio dispositivo mobile
>

-- 
Inviato dal mio dispositivo mobile

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak
  2012-10-10 17:46   ` Ramsay Jones
  2012-10-10 18:35     ` Elia Pinto
@ 2012-10-10 19:16     ` Junio C Hamano
  2012-10-11 20:17       ` Ramsay Jones
  1 sibling, 1 reply; 11+ messages in thread
From: Junio C Hamano @ 2012-10-10 19:16 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: GIT Mailing-list, Elia Pinto

Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:

> Yes, so I can simply disable the malloc checks in my ~/.bashrc file.
> However, it would be disappointing to have my config tweeks in two
> places ... :(
>
> I guess I can live with it ...

You could write "export that-variable" in your config.mak yourself
;-)  Let's apply the patch as-is.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak
  2012-10-10 19:16     ` Junio C Hamano
@ 2012-10-11 20:17       ` Ramsay Jones
  0 siblings, 0 replies; 11+ messages in thread
From: Ramsay Jones @ 2012-10-11 20:17 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GIT Mailing-list, Elia Pinto

Junio C Hamano wrote:
> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
> 
>> Yes, so I can simply disable the malloc checks in my ~/.bashrc file.
>> However, it would be disappointing to have my config tweeks in two
>> places ... :(
>>
>> I guess I can live with it ...
> 
> You could write "export that-variable" in your config.mak yourself
> ;-)  Let's apply the patch as-is.

*smacks forehead* ;-P ... now why didn't I think of that! *blush* [1]

Thanks!

ATB,
Ramsay Jones

[1] I am more than a little disappointed in myself, because I have done
exactly this, *several* times, on other (much older) projects.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-10-11 20:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-06 17:33 [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak Ramsay Jones
2012-10-06 19:22 ` Junio C Hamano
2012-10-07 13:13   ` Elia Pinto
2012-10-08 13:19   ` Elia Pinto
2012-10-09 12:33     ` Christian Couder
2012-10-10 17:55     ` Ramsay Jones
2012-10-10 17:46   ` Ramsay Jones
2012-10-10 18:35     ` Elia Pinto
2012-10-10 18:38       ` Elia Pinto
2012-10-10 19:16     ` Junio C Hamano
2012-10-11 20:17       ` Ramsay Jones

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).