duanlangwen9597 2019-08-15 07:26
浏览 35

Cloud-Run进程失败,并显示500个状态代码和一个错误的gvisor错误

Backround

The service is a simple Go program that pipes a file from Cloud Storage to the browser.

Everything works fine on my Macbook, but fails on Cloud-Run (managed) for some requests. Mostly large mp4 files.

Problem

The logs just show a 500 status, as does the browser. But my service doesn't log anything other than starting to copy the file. No IO errors or anything.

This message is shown 4 seconds before the 500 status:

Container Sandbox Limitation: Unsupported syscall membarrier(0x10,0x0,0x0,0x8,0x775dce0b030,0x775dce0b000). Please, refer to https://gvisor.dev/c/linux/amd64/membarrier for more information.

I cannot reproduce this locally. Works fine locally with the same configuration and GCP buckets.

The service works fine on Cloud-Run with smaller files, like images. Just not the videos I've tried.

I've tried

  • Logging everything up to the io.Copy. No errors, hangs afte io.Copy is called.
  • Increasing the memory of the container. It's now running a 1G. No change from 512M.
  • Running in a Docker container locally with the same configuration, same credentials. No problems.
  • Reaching out to GCP on Twitter

Update 2019-08-16

I created a very simple service that prints 'A' to a http responsewriter. It also works perfectly locally, yet returns 500 on cloud-run with larg-ish sizes. 1MB OK, 5MB OK, 50 MB fails, 100MB fails, etc. There are no membarrier messages when this service runs.

Code is available here: https://github.com/andrioid/reproduce-cloud-run-bug

Reported on issue-tracker as well: https://issuetracker.google.com/issues/139511257

Update 2: Probable cause

Seems like there is a hard limit on response sizes to 32MB.

https://cloud.google.com/run/quotas

Very disappointing that this cannot be increased and that the error doesn't mention this limit, neither does the log file.

  • 写回答

3条回答 默认 最新

  • dse3168 2019-08-15 22:54
    关注

    There is an outstanding issue at https://github.com/google/gvisor/issues/267 to implement membarrier, but for now this is not allowed by the container sandbox.

    评论

报告相同问题?

悬赏问题

  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条