|
From: Scott K. <val...@ke...> - 2004-09-15 14:33:55
|
Hi all, I've created a very simple test program that causes valgrind (both memcheck and addrcheck) to assert with: valgrind: vg_signals.c:1997 (vg_async_signalhandler): Assertion `vgPlain_ksigismember(&uc->uc_sigmask, sigNo)' failed. All the program does is create a pthread, and from that pthread it calls popen() to open a pipe to qmail to send an email. Is this a known limitation? Or something I should file a proper bug report for? (Yes, I have more details, I just thought I'd check first). Thanks, Scott. |
|
From: Scott K. <val...@ke...> - 2004-09-15 15:34:28
|
Oops, it's even simpler than that. Doesn't even need to involve
pthreads:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
FILE *mailer;
mailer = popen("/usr/sbin/sendmail -t", "w");
if (mailer) {
fprintf(mailer, "To: %s\n", getenv("USER"));
fprintf(mailer, "Subject: Test email\n");
fprintf(mailer, "\n");
fprintf(mailer, "This is a test!\n");
pclose(mailer);
}
return 0;
}
.......................
[scott@localhost scott]$ valgrind --tool=memcheck --num-callers=40
./test
==8794== Memcheck, a memory error detector for x86-linux.
==8794== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==8794== Using valgrind-2.2.0, a program supervision framework for
x86-linux.
==8794== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==8794== For more details, rerun with: -v
==8794==
got signal 17 in LWP 8794 (8794)
valgrind: vg_signals.c:1997 (vg_async_signalhandler): Assertion
`vgPlain_ksigismember(&uc->uc_sigmask, sigNo)' failed.
.......................
/usr/sbin/sendmail is actually a just a wrapper for qmail here.
Signal 17 is SIGCHLD (child process has stopped or exited, changed). If
valgrind doesn't support this, is there anyway I can get it to ignore
it?
Thanks,
Scott.
|
|
From: Tom H. <th...@cy...> - 2004-09-15 16:22:16
|
In message <5E4...@ke...>
Scott Kevill <val...@ke...> wrote:
> got signal 17 in LWP 8794 (8794)
>
> valgrind: vg_signals.c:1997 (vg_async_signalhandler): Assertion
> `vgPlain_ksigismember(&uc->uc_sigmask, sigNo)' failed.
> .......................
>
> /usr/sbin/sendmail is actually a just a wrapper for qmail here.
>
> Signal 17 is SIGCHLD (child process has stopped or exited, changed). If
> valgrind doesn't support this, is there anyway I can get it to ignore
> it?
You've got a kernel with a bit of a misfeature. Earlier and later
kernels will both work fine. See bug 82114 for the details and a
fairly horrible patch that will workaround the problem.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Scott K. <val...@ke...> - 2004-09-15 18:09:34
|
Perfect! Thanks, Tom. Scott. On 16/09/2004, at 12:22 AM, Tom Hughes wrote: > In message <5E4...@ke...> > Scott Kevill <val...@ke...> wrote: > >> got signal 17 in LWP 8794 (8794) >> >> valgrind: vg_signals.c:1997 (vg_async_signalhandler): Assertion >> `vgPlain_ksigismember(&uc->uc_sigmask, sigNo)' failed. >> ....................... >> >> /usr/sbin/sendmail is actually a just a wrapper for qmail here. >> >> Signal 17 is SIGCHLD (child process has stopped or exited, changed). >> If >> valgrind doesn't support this, is there anyway I can get it to ignore >> it? > > You've got a kernel with a bit of a misfeature. Earlier and later > kernels will both work fine. See bug 82114 for the details and a > fairly horrible patch that will workaround the problem. > > Tom > > -- > Tom Hughes (th...@cy...) > Software Engineer, Cyberscience Corporation > http://www.cyberscience.com/ > > > ------------------------------------------------------- > This SF.Net email is sponsored by: thawte's Crypto Challenge Vl > Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam > Camcorder. More prizes in the weekly Lunch Hour Challenge. > Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > -- Scott Kevill scott@GameRanger.com http://www.GameRanger.com the Macintosh multiplayer online gaming service |
|
From: Naveen K. <g_n...@ya...> - 2004-09-15 17:54:03
|
valgrind seems to have a problem with fprintf, so you
might need to take that out.
--- Scott Kevill <val...@ke...> wrote:
> Oops, it's even simpler than that. Doesn't even need
> to involve
> pthreads:
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(int argc, char **argv)
> {
> FILE *mailer;
>
> mailer = popen("/usr/sbin/sendmail -t", "w");
> if (mailer) {
> fprintf(mailer, "To: %s\n",
> getenv("USER"));
> fprintf(mailer, "Subject: Test email\n");
> fprintf(mailer, "\n");
> fprintf(mailer, "This is a test!\n");
>
> pclose(mailer);
> }
>
> return 0;
> }
>
> .......................
> [scott@localhost scott]$ valgrind --tool=memcheck
> --num-callers=40
> ./test
> ==8794== Memcheck, a memory error detector for
> x86-linux.
> ==8794== Copyright (C) 2002-2004, and GNU GPL'd, by
> Julian Seward et al.
> ==8794== Using valgrind-2.2.0, a program supervision
> framework for
> x86-linux.
> ==8794== Copyright (C) 2000-2004, and GNU GPL'd, by
> Julian Seward et al.
> ==8794== For more details, rerun with: -v
> ==8794==
> got signal 17 in LWP 8794 (8794)
>
> valgrind: vg_signals.c:1997
> (vg_async_signalhandler): Assertion
> `vgPlain_ksigismember(&uc->uc_sigmask, sigNo)'
> failed.
> .......................
>
> /usr/sbin/sendmail is actually a just a wrapper for
> qmail here.
>
> Signal 17 is SIGCHLD (child process has stopped or
> exited, changed). If
> valgrind doesn't support this, is there anyway I can
> get it to ignore
> it?
>
> Thanks,
> Scott.
>
>
>
>
-------------------------------------------------------
> This SF.Net email is sponsored by: thawte's Crypto
> Challenge Vl
> Crack the code and win a Sony DCRHC40 MiniDV Digital
> Handycam
> Camcorder. More prizes in the weekly Lunch Hour
> Challenge.
> Sign up NOW
> http://ad.doubleclick.net/clk;10740251;10262165;m
> _______________________________________________
> Valgrind-users mailing list
> Val...@li...
>
https://lists.sourceforge.net/lists/listinfo/valgrind-users
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|
|
From: Tom H. <th...@cy...> - 2004-09-15 18:35:02
|
In message <200...@we...>
Naveen Kumar <g_n...@ya...> wrote:
> valgrind seems to have a problem with fprintf, so you
> might need to take that out.
It has no problems with fprintf that we are aware of, so if you
think you know otherwise I suggest you report it.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Naveen K. <g_n...@ya...> - 2004-09-15 22:48:20
|
Oops maybe I spoke too soon about the particular program in question but I think there is a problem with fprintf. Look at the header in vg_libpthread.c. It says /*Later ... it appears we cannot call file-related stuff in libc here, perhaps fair enough. Be careful what you call from here. Even exit() doesn't work (gives infinite recursion and then stack overflow); hence myexit(). Also fprintf doesn't seem safe.*/ I did use fprintf in one of my apps(multi-threaded) and valgrind didn't work. Naveen --- Robert Walsh <rj...@du...> wrote: > On Wed, 2004-09-15 at 10:53 -0700, Naveen Kumar > wrote: > > valgrind seems to have a problem with fprintf, so > you > > might need to take that out. > > Valgrind doesn't have any problems with fprintf that > we're aware of. > > Regards, > Robert. > > --- Tom Hughes <th...@cy...> wrote: > In message > <200...@we...> > Naveen Kumar <g_n...@ya...> wrote: > > > valgrind seems to have a problem with fprintf, so > you > > might need to take that out. > > It has no problems with fprintf that we are aware > of, so if you > think you know otherwise I suggest you report it. > > Tom > > -- > Tom Hughes (th...@cy...) > Software Engineer, Cyberscience Corporation > http://www.cyberscience.com/ > > > ------------------------------------------------------- > This SF.Net email is sponsored by: thawte's Crypto > Challenge Vl > Crack the code and win a Sony DCRHC40 MiniDV Digital > Handycam > Camcorder. More prizes in the weekly Lunch Hour > Challenge. > Sign up NOW > http://ad.doubleclick.net/clk;10740251;10262165;m > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail |