@@ -41,6 +41,11 @@ func (tx *ValgrindCLI) Execute() (http.Header, []byte, error) {
41
41
// valgrind reports to their tests in the same way we use the appname
42
42
// to link the transaction data. Failing that, perhaps we could use
43
43
// the valgrind process's pid instead.
44
+ //
45
+ // We prevent concurrent invocations by disallowing valgrind when
46
+ // the threads argument is greater than 1. Previously, we used the
47
+ // commented out locks below. This was changed to allow subprocesses
48
+ // (i.e. curl) to run without deadlocking.
44
49
//valgrindMu.Lock()
45
50
//defer valgrindMu.Unlock()
46
51
@@ -122,12 +127,16 @@ func (tx *ValgrindCGI) Execute() (http.Header, []byte, error) {
122
127
// valgrind reports to their tests in the same way we use the appname
123
128
// to link the transaction data. Failing that, perhaps we could use
124
129
// the valgrind process's pid instead.
130
+ //
131
+ // We prevent concurrent invocations by disallowing valgrind when
132
+ // the threads argument is greater than 1. Previously, we used the
133
+ // commented out locks below. This was changed to allow subprocesses
134
+ // (i.e. curl) to run without deadlocking.
125
135
//valgrindMu.Lock()
126
136
//defer valgrindMu.Unlock()
127
137
128
138
cmd := valgrind .Memcheck (tx .Valgrind , "--quiet" )
129
139
cmd .Args = append (cmd .Args , "--xml=yes" )
130
- //cmd.Args = append(cmd.Args, "--child-silent-after-fork=no")
131
140
cmd .Args = append (cmd .Args , "--xml-socket=" + valgrindLn .Addr ().String ())
132
141
cmd .Args = append (cmd .Args , "--" )
133
142
cmd .Args = append (cmd .Args , tx .handler .Path )
0 commit comments