Closed
Description
I use bblfshd v2.11.4 and csharp-driver v1.2.0.
To reproduce the bug I use this simple program:
package main
import (
"context"
"fmt"
"time"
bblfsh "gopkg.in/bblfsh/client-go.v3"
)
const code = `// A Hello World! program in C#.
using System;
namespace HelloWorld
{
class Hello
{
static void Main()
{
Console.WriteLine("Hello World!");
// Keep the console window open in debug mode.
Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
}
}`
func main() {
client, err := bblfsh.NewClient("127.0.0.1:9432")
if err != nil {
panic(err)
}
go func() {
started := time.Now()
for {
time.Sleep(time.Second)
fmt.Println("Time since request started", time.Now().Sub(started))
}
}()
_, _, err = client.
NewParseRequest().
Context(context.Background()).
Language("csharp").
Content(code).
UAST()
if err != nil {
fmt.Println(err)
}
fmt.Println("success")
}
$ go run bblfsh_csharp.go
Time since request started 1.004217185s
...
Time since request started 5m3.852441925s
there are no logs on the server side except when I Ctrl-C
the program:
[2019-02-06T12:27:00Z] WARN unable to allocate a driver instance: context canceled language=csharp
[2019-02-06T12:27:00Z] ERROR request processed content 341 bytes error: context canceled elapsed=5m4.8500838s language=csharp
I see this processes in the container:
$ docker top 044c7dcebcc6
PID USER TIME COMMAND
3993 root 0:19 bblfshd
4061 root 0:00 bash
4178 root 0:00 /opt/driver/bin/driver --log-level info --log-format text --log-fields {"id":"01d31bjzsfzdahqx476ptgadrg","language":"csharp"} --network unix --address /tmp/rpc.sock
4195 root 0:00 sh /opt/driver/bin/native
4196 root 0:00 dotnet native.dll