[Bug libstdc++/42624] libstdc++ parallel mode deadlocks in barrier
edwintorok at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jan 13 20:39:00 GMT 2010
------- Comment #15 from edwintorok at gmail dot com 2010-01-13 20:39 -------
(In reply to comment #14)
> (In reply to comment #13)
>
> > This code is compiled with -fno-exceptions, could that be a problem?
>
> No, that should rather help.
>
> Still, it is very difficult to debug this. Is there at least a way to access
> clamd's stdout and/or stderr?
>
The usual way to debug clamd is by setting 'Foreground yes' in clamd.conf,
however the bug doesn't reproduce then.
You can however still get stderr/stdout by applying the patch below, and
starting clamd like this:
$ clamd/clamd -c etc/clamd.conf >stdout.log 2>stderr.log
or even without redirection:
$ clamd/clamd -c etc/clamd.conf
diff --git a/shared/misc.c b/shared/misc.c
index 080d4ec..656dda5 100644
--- a/shared/misc.c
+++ b/shared/misc.c
@@ -247,7 +247,7 @@ int daemonize(void)
int fds[3], i;
pid_t pid;
-
+#if 0
fds[0] = open("/dev/null", O_RDONLY);
fds[1] = open("/dev/null", O_WRONLY);
fds[2] = open("/dev/null", O_WRONLY);
@@ -272,7 +272,7 @@ int daemonize(void)
for(i = 0; i <= 2; i++)
if(fds[i] > 2)
close(fds[i]);
-
+#endif
pid = fork();
if(pid == -1)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42624
More information about the Gcc-bugs
mailing list