{"thread":{"id":"31742","subject":"[PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak","startedAt":"2012-10-06T17:33:08Z","lastAt":"2012-10-11T20:17:41Z","messageCount":11,"participants":["Ramsay Jones","Junio C Hamano","Elia Pinto","Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"200676","messageId":"50706B54.8090004@ramsay1.demon.co.uk","threadId":"31742","inReplyTo":null,"subject":"[PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2012-10-06T17:33:08Z","receivedAt":"2012-10-06T17:33:08Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nThe malloc checks can be disabled using the TEST_NO_MALLOC_CHECK\nvariable, either from the environment or command line of an\n'make test' invocation. In order to allow the malloc checks to be\ndisabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK\nto the environment using an export directive.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Junio,\n\nNow that the malloc checks have been enabled, running the tests has\nbecome somewhat noisy with \"malloc: using debugging hooks\" messages\nspewing continuously to the terminal. [I usually run the tests like\nso:\n\n    ramsay$ time $(make test >test-out 2>&1)\n    malloc: using debugging hooks\n    malloc: using debugging hooks\n    ...\n    malloc: using debugging hooks\n\n    real    16m11.408s\n    user    5m17.412s\n    sys     4m54.786s\n    ramsay$ \n]\nstrace tells me that the controlling terminal, /dev/tty, is being\nopened directly in order to write these messages. I find this\nannoying, so I tried to disable the malloc checks from config.mak ...\n\nNote that I decided not to write the TEST_NO_MALLOC_CHECK setting\nto the GIT-BUILD-OPTIONS file, since I prefer to enable/disable\nthe malloc checks myself when running the test script directly.\n\nATB,\nRamsay Jones\n\n Makefile | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Makefile b/Makefile\nindex 8413606..f69979e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2636,6 +2636,7 @@ bin-wrappers/%: wrap-for-bin.sh\n # with that.\n \n export NO_SVN_TESTS\n+export TEST_NO_MALLOC_CHECK\n \n ### Testing rules\n \n-- \n1.7.12\n"},{"id":"200689","messageId":"7vbogfquc8.fsf@alter.siamese.dyndns.org","threadId":"31742","inReplyTo":"50706B54.8090004@ramsay1.demon.co.uk","subject":"Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-06T19:22:15Z","receivedAt":"2012-10-06T19:22:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n\n> The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK\n> variable, either from the environment or command line of an\n> 'make test' invocation. In order to allow the malloc checks to be\n> disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK\n> to the environment using an export directive.\n\nWe would want to encourage people to test with cheap but effective\nchecks when available.  I do not see \"malloc: using debugging hooks\"\nmessage anywhere when I run tests, but if you do, I'd rather see us\ncheck if we can tell glibc to stop doing so first without disabling\nthe whole test.  Your patch feels like the first step to a slipperly\nslope whose destination would make us say \"we get too many messages\nso let's do nothing in \"make test\" with this configuration.\" when\ntaken to the extreme, and obviously we would not want to go there\n;-).\n\nElia, you brought the MALLOC_CHECK_ up.  Did you hear about this\nissue elsewhere before, and if you did, do you know how other\nprojects solves it?\n\nBesides, doesn't a simple instruction to export TEST_NO_MALLOC_CHECK\nto your environment before running \"make test\" suffice?\n"},{"id":"200697","messageId":"CA+EOSBm-Z7RMb16Vk36+ek3Y1aRVTZ0mp0OPMB2iwU5_rtLOjA@mail.gmail.com","threadId":"31742","inReplyTo":"7vbogfquc8.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2012-10-07T13:13:46Z","receivedAt":"2012-10-07T13:13:46Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"Hi Julio.\n\nNo, i don't know this message before. Difficult that can be related to\na recent glibc change, i think. Perhaps eglibc ? I tomorrow take a\nlook, i am on travel now.\nBest\n\n2012/10/6, Junio C Hamano <gitster@pobox.com>:\n> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n>\n>> The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK\n>> variable, either from the environment or command line of an\n>> 'make test' invocation. In order to allow the malloc checks to be\n>> disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK\n>> to the environment using an export directive.\n>\n> We would want to encourage people to test with cheap but effective\n> checks when available.  I do not see \"malloc: using debugging hooks\"\n> message anywhere when I run tests, but if you do, I'd rather see us\n> check if we can tell glibc to stop doing so first without disabling\n> the whole test.  Your patch feels like the first step to a slipperly\n> slope whose destination would make us say \"we get too many messages\n> so let's do nothing in \"make test\" with this configuration.\" when\n> taken to the extreme, and obviously we would not want to go there\n> ;-).\n>\n> Elia, you brought the MALLOC_CHECK_ up.  Did you hear about this\n> issue elsewhere before, and if you did, do you know how other\n> projects solves it?\n>\n> Besides, doesn't a simple instruction to export TEST_NO_MALLOC_CHECK\n> to your environment before running \"make test\" suffice?\n>\n>\n\n-- \nInviato dal mio dispositivo mobile\n"},{"id":"200746","messageId":"CA+EOSBnKqkQ_nLyEKzxsMYnB04X9ABMp3P3CuDy3ohfcoEbQtA@mail.gmail.com","threadId":"31742","inReplyTo":"7vbogfquc8.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2012-10-08T13:19:45Z","receivedAt":"2012-10-08T13:19:45Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"2012/10/6 Junio C Hamano <gitster@pobox.com>:\n> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n>\n>> The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK\n>> variable, either from the environment or command line of an\n>> 'make test' invocation. In order to allow the malloc checks to be\n>> disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK\n>> to the environment using an export directive.\n>\n> We would want to encourage people to test with cheap but effective\n> checks when available.  I do not see \"malloc: using debugging hooks\"\n> message anywhere when I run tests, but if you do, I'd rather see us\n> check if we can tell glibc to stop doing so first without disabling\n> the whole test.  Your patch feels like the first step to a slipperly\n> slope whose destination would make us say \"we get too many messages\n> so let's do nothing in \"make test\" with this configuration.\" when\n> taken to the extreme, and obviously we would not want to go there\n> ;-).\n>\n> Elia, you brought the MALLOC_CHECK_ up.  Did you hear about this\n> issue elsewhere before, and if you did, do you know how other\n> projects solves it?\nOk. I have found. For me this is not a problem any more these days.\nWas fixed in glibc 2.8.90-9 2008\n\n* Wed Jul 16 2008 Jakub Jelinek <jakub@redhat.com> 2.8.90-9\n- update from trunk\n  - fix unbuffered vfprintf if writing to the stream fails (#455360)\n  - remove useless \"malloc: using debugging hooks\" message (#455355)\n  - nscd fixes\n(from glibc rpm changelog)\n\nThis is the bugzilla filled and closed\nhttps://bugzilla.redhat.com/show_bug.cgi?id=455355\n\nRamsay, what version of glibc you have and in what distro? thanks\n"},{"id":"200833","messageId":"CAP8UFD2k9HjAKq-1WrRpk3NtqWnewDmqT0dqKfN9vYDk9fnBQg@mail.gmail.com","threadId":"31742","inReplyTo":"CA+EOSBnKqkQ_nLyEKzxsMYnB04X9ABMp3P3CuDy3ohfcoEbQtA@mail.gmail.com","subject":"Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2012-10-09T12:33:15Z","receivedAt":"2012-10-09T12:33:15Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Hi,\n\nOn Mon, Oct 8, 2012 at 3:19 PM, Elia Pinto <gitter.spiros@gmail.com> wrote:\n> Ok. I have found. For me this is not a problem any more these days.\n> Was fixed in glibc 2.8.90-9 2008\n>\n> * Wed Jul 16 2008 Jakub Jelinek <jakub@redhat.com> 2.8.90-9\n> - update from trunk\n>   - fix unbuffered vfprintf if writing to the stream fails (#455360)\n>   - remove useless \"malloc: using debugging hooks\" message (#455355)\n>   - nscd fixes\n> (from glibc rpm changelog)\n>\n> This is the bugzilla filled and closed\n> https://bugzilla.redhat.com/show_bug.cgi?id=455355\n>\n> Ramsay, what version of glibc you have and in what distro? thanks\n\nI have the same problem on a RHEL 5.3 (2.6.18-128.el5 #1 SMP Wed Dec\n17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux) with\nglibc-2.5-34.\n\nBest,\nChristian.\n"},{"id":"200931","messageId":"5075B47C.6030607@ramsay1.demon.co.uk","threadId":"31742","inReplyTo":"7vbogfquc8.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2012-10-10T17:46:36Z","receivedAt":"2012-10-10T17:46:36Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Junio C Hamano wrote:\n> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n> \n>> The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK\n>> variable, either from the environment or command line of an\n>> 'make test' invocation. In order to allow the malloc checks to be\n>> disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK\n>> to the environment using an export directive.\n> \n> We would want to encourage people to test with cheap but effective\n> checks when available.  I do not see \"malloc: using debugging hooks\"\n> message anywhere when I run tests, but if you do, I'd rather see us\n> check if we can tell glibc to stop doing so first without disabling\n> the whole test.  Your patch feels like the first step to a slipperly\n> slope whose destination would make us say \"we get too many messages\n> so let's do nothing in \"make test\" with this configuration.\" when\n> taken to the extreme, and obviously we would not want to go there\n> ;-).\n\n[sorry for the late reply, I've been away ...]\n\nYes, but ... I really don't see that this patch would encourage anyone\nto skip the malloc checks, who wasn't going to anyway! I didn't notice\nmuch of an increase in the running time of the tests, so that wouldn't\ndiscourage me. This idiotic message spewage is a different issue.\n(the complete loss of terminal scroll-back is particularly annoying)\n\nI had intended to run the tests with malloc checks enabled before\nsubmitting patches, testing -rc* builds etc., but have them disabled\nfor day-to-day programming.\n\n> Besides, doesn't a simple instruction to export TEST_NO_MALLOC_CHECK\n> to your environment before running \"make test\" suffice?\n\nYes, so I can simply disable the malloc checks in my ~/.bashrc file.\nHowever, it would be disappointing to have my config tweeks in two\nplaces ... :(\n\nI guess I can live with it ...\n\nATB,\nRamsay Jones\n"},{"id":"200932","messageId":"5075B68A.2010404@ramsay1.demon.co.uk","threadId":"31742","inReplyTo":"CA+EOSBnKqkQ_nLyEKzxsMYnB04X9ABMp3P3CuDy3ohfcoEbQtA@mail.gmail.com","subject":"Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2012-10-10T17:55:22Z","receivedAt":"2012-10-10T17:55:22Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Elia Pinto wrote:\n> 2012/10/6 Junio C Hamano <gitster@pobox.com>:\n>> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n>> Elia, you brought the MALLOC_CHECK_ up.  Did you hear about this\n>> issue elsewhere before, and if you did, do you know how other\n>> projects solves it?\n> Ok. I have found. For me this is not a problem any more these days.\n> Was fixed in glibc 2.8.90-9 2008\n> \n> * Wed Jul 16 2008 Jakub Jelinek <jakub@redhat.com> 2.8.90-9\n> - update from trunk\n>   - fix unbuffered vfprintf if writing to the stream fails (#455360)\n>   - remove useless \"malloc: using debugging hooks\" message (#455355)\n>   - nscd fixes\n> (from glibc rpm changelog)\n> \n> This is the bugzilla filled and closed\n> https://bugzilla.redhat.com/show_bug.cgi?id=455355\n> \n> Ramsay, what version of glibc you have and in what distro? thanks\n\nThe glibc version is 2.5, if I believe the changelog, along with:\n\n    ramsay$ ls -l /lib/libc.so.6\n    lrwxrwxrwx 1 root root 11 2007-06-24 19:44 /lib/libc.so.6 -> libc-2.5.so*\n    ramsay$ \n\n... but the header files tell a different story:\n\n    ramsay$ grep 'define     __GLIBC_' /usr/include/features.h\n    #define __GLIBC__       2\n    #define __GLIBC_MINOR__ 4\n    ramsay$ \n\nThe distro is Ubuntu (but I can't remember which version; I would have\nto re-boot to find out so ...).\n\nHTH\n\nATB,\nRamsay Jones\n"},{"id":"200935","messageId":"CA+EOSB=NQTsSCs-EJF80h2L+xMULcu_HbaW+mc=yr-3u2hEKbQ@mail.gmail.com","threadId":"31742","inReplyTo":"5075B47C.6030607@ramsay1.demon.co.uk","subject":"Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2012-10-10T18:35:26Z","receivedAt":"2012-10-10T18:35:26Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"Hemm, too old release distro , no ? 4-5 year ago. It is time to\nupgrade to something more recent , 5.7 5.8 . Rhel5.3 is not a good\ndistro for a developer isn't it ?\n\n2012/10/10, Ramsay Jones <ramsay@ramsay1.demon.co.uk>:\n> Junio C Hamano wrote:\n>> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n>>\n>>> The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK\n>>> variable, either from the environment or command line of an\n>>> 'make test' invocation. In order to allow the malloc checks to be\n>>> disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK\n>>> to the environment using an export directive.\n>>\n>> We would want to encourage people to test with cheap but effective\n>> checks when available.  I do not see \"malloc: using debugging hooks\"\n>> message anywhere when I run tests, but if you do, I'd rather see us\n>> check if we can tell glibc to stop doing so first without disabling\n>> the whole test.  Your patch feels like the first step to a slipperly\n>> slope whose destination would make us say \"we get too many messages\n>> so let's do nothing in \"make test\" with this configuration.\" when\n>> taken to the extreme, and obviously we would not want to go there\n>> ;-).\n>\n> [sorry for the late reply, I've been away ...]\n>\n> Yes, but ... I really don't see that this patch would encourage anyone\n> to skip the malloc checks, who wasn't going to anyway! I didn't notice\n> much of an increase in the running time of the tests, so that wouldn't\n> discourage me. This idiotic message spewage is a different issue.\n> (the complete loss of terminal scroll-back is particularly annoying)\n>\n> I had intended to run the tests with malloc checks enabled before\n> submitting patches, testing -rc* builds etc., but have them disabled\n> for day-to-day programming.\n>\n>> Besides, doesn't a simple instruction to export TEST_NO_MALLOC_CHECK\n>> to your environment before running \"make test\" suffice?\n>\n> Yes, so I can simply disable the malloc checks in my ~/.bashrc file.\n> However, it would be disappointing to have my config tweeks in two\n> places ... :(\n>\n> I guess I can live with it ...\n>\n> ATB,\n> Ramsay Jones\n>\n>\n>\n>\n\n-- \nInviato dal mio dispositivo mobile\n"},{"id":"200936","messageId":"CA+EOSBkpWhYbJKxT-JZ1FkLp8mctVcqKmvAEN0aKvC_Ni3Pf6Q@mail.gmail.com","threadId":"31742","inReplyTo":"CA+EOSB=NQTsSCs-EJF80h2L+xMULcu_HbaW+mc=yr-3u2hEKbQ@mail.gmail.com","subject":"Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2012-10-10T18:38:36Z","receivedAt":"2012-10-10T18:38:36Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"No reboot.  lsb-release -a from memory or something similar, always on travel...\n\nRegards\n\n2012/10/10, Elia Pinto <gitter.spiros@gmail.com>:\n> Hemm, too old release distro , no ? 4-5 year ago. It is time to\n> upgrade to something more recent , 5.7 5.8 . Rhel5.3 is not a good\n> distro for a developer isn't it ?\n>\n> 2012/10/10, Ramsay Jones <ramsay@ramsay1.demon.co.uk>:\n>> Junio C Hamano wrote:\n>>> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n>>>\n>>>> The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK\n>>>> variable, either from the environment or command line of an\n>>>> 'make test' invocation. In order to allow the malloc checks to be\n>>>> disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK\n>>>> to the environment using an export directive.\n>>>\n>>> We would want to encourage people to test with cheap but effective\n>>> checks when available.  I do not see \"malloc: using debugging hooks\"\n>>> message anywhere when I run tests, but if you do, I'd rather see us\n>>> check if we can tell glibc to stop doing so first without disabling\n>>> the whole test.  Your patch feels like the first step to a slipperly\n>>> slope whose destination would make us say \"we get too many messages\n>>> so let's do nothing in \"make test\" with this configuration.\" when\n>>> taken to the extreme, and obviously we would not want to go there\n>>> ;-).\n>>\n>> [sorry for the late reply, I've been away ...]\n>>\n>> Yes, but ... I really don't see that this patch would encourage anyone\n>> to skip the malloc checks, who wasn't going to anyway! I didn't notice\n>> much of an increase in the running time of the tests, so that wouldn't\n>> discourage me. This idiotic message spewage is a different issue.\n>> (the complete loss of terminal scroll-back is particularly annoying)\n>>\n>> I had intended to run the tests with malloc checks enabled before\n>> submitting patches, testing -rc* builds etc., but have them disabled\n>> for day-to-day programming.\n>>\n>>> Besides, doesn't a simple instruction to export TEST_NO_MALLOC_CHECK\n>>> to your environment before running \"make test\" suffice?\n>>\n>> Yes, so I can simply disable the malloc checks in my ~/.bashrc file.\n>> However, it would be disappointing to have my config tweeks in two\n>> places ... :(\n>>\n>> I guess I can live with it ...\n>>\n>> ATB,\n>> Ramsay Jones\n>>\n>>\n>>\n>>\n>\n> --\n> Inviato dal mio dispositivo mobile\n>\n\n-- \nInviato dal mio dispositivo mobile\n"},{"id":"200939","messageId":"7v391mcf3p.fsf@alter.siamese.dyndns.org","threadId":"31742","inReplyTo":"5075B47C.6030607@ramsay1.demon.co.uk","subject":"Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-10T19:16:26Z","receivedAt":"2012-10-10T19:16:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n\n> Yes, so I can simply disable the malloc checks in my ~/.bashrc file.\n> However, it would be disappointing to have my config tweeks in two\n> places ... :(\n>\n> I guess I can live with it ...\n\nYou could write \"export that-variable\" in your config.mak yourself\n;-)  Let's apply the patch as-is.\n"},{"id":"201020","messageId":"50772965.7070607@ramsay1.demon.co.uk","threadId":"31742","inReplyTo":"7v391mcf3p.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2012-10-11T20:17:41Z","receivedAt":"2012-10-11T20:17:41Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Junio C Hamano wrote:\n> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n> \n>> Yes, so I can simply disable the malloc checks in my ~/.bashrc file.\n>> However, it would be disappointing to have my config tweeks in two\n>> places ... :(\n>>\n>> I guess I can live with it ...\n> \n> You could write \"export that-variable\" in your config.mak yourself\n> ;-)  Let's apply the patch as-is.\n\n*smacks forehead* ;-P ... now why didn't I think of that! *blush* [1]\n\nThanks!\n\nATB,\nRamsay Jones\n\n[1] I am more than a little disappointed in myself, because I have done\nexactly this, *several* times, on other (much older) projects.\n"}]}