ossf / package-analysis

Open Source Package Analysis
Apache License 2.0
730 stars 51 forks source link

strace bufio.Scanner fails on exceptionally long lines #239

Closed calebbrown closed 2 years ago

calebbrown commented 2 years ago

Failed log message.

I'll see if I can reproduce this run to extract the gvisor log.

{
  "insertId": "1k5oztrle3y6jq1q",
  "jsonPayload": {
    "stacktrace": "main.handleMessage\n\t/src/cmd/worker/main.go:138\nmain.messageLoop\n\t/src/cmd/worker/main.go:217\nmain.main\n\t/src/cmd/worker/main.go:241\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225",
    "error": "strace parsing failed (bufio.Scanner: token too long)",
    "message": "Analysis run failed",
    "caller": "worker/main.go:138",
    "timestamp": "2022-03-03T02:53:08.850798965Z"
  },
  "resource": {
    "type": "k8s_container",
    "labels": {
      "container_name": "worker",
      "cluster_name": "analysis-cluster",
      "namespace_name": "default",
      "location": "us-central1-c",
      "pod_name": "workers-set-53",
      "project_id": "ossf-malware-analysis"
    }
  },
  "timestamp": "2022-03-03T02:53:08.851227735Z",
  "severity": "ERROR",
  "labels": {
    "k8s-pod/controller-revision-hash": "workers-set-6598d48f9d",
    "ecosystem": "npm",
    "version": "1.2.2",
    "k8s-pod/statefulset_kubernetes_io/pod-name": "workers-set-53",
    "name": "csgostatsgg-scraper",
    "k8s-pod/app": "workers",
    "compute.googleapis.com/resource_name": "gke-analysis-cluster-default-pool-d94f0570-5fvf",
    "phase": "install"
  },
  "logName": "projects/ossf-malware-analysis/logs/stderr",
  "sourceLocation": {
    "file": "/src/cmd/worker/main.go",
    "line": "138",
    "function": "main.handleMessage"
  },
  "receiveTimestamp": "2022-03-03T02:53:10.919967265Z"
}
calebbrown commented 2 years ago

strace_long_log_line.txt