0

I am trying to deploy a webserver with dramatiq and RabbitMQ and it seems like RabbitMQ is failing to start in Cloud Run.

The error messages I see are:

Uncaught signal: 10, pid=418, tid=418, fault_addr=0.

and many instances of:

Container Sandbox: Unsupported syscall getsockopt(0x44,0x1,0xc,0x3e18e39fc540,0x3e18e39fc548,0x0).

I used 4GB of memory, so I think it should be enough. Also important: the container does run locally. Any ideas?

Stéphane
  • 105
  • 1
  • 9

1 Answers1

2

Your container runs in a sandox (GVisor) and it prevents some dangerous or abnormal system calls or CPU instructions. Try to change the RabbitMQ client to check if it's better.

In addition of this answer, I have 2 remarks:

  • Keep in mind that Cloud Run can't run in background connexion to RabbitMQ and consume the messages. The CPU is allowed to your instance is processing a request; when not, the CPU is throttle (about 5% of the CPU power). I'm not sure that Cloud Run is the best platform to use Rabbit MQ (if you need to be always connected)
  • A new sandbox is in the pipe. I don't know if it will solve your issue or not. Stay tuned.
guillaume blaquiere
  • 66,369
  • 2
  • 47
  • 76
  • `Try to change the RabbitMQ client to check if it's better.` The RabbitMQ client does not do anything low-level (it is a Python program). `In addition of this answer, I have 2 remarks:` Thank you! A persistent connection to RabbitMQ is not really required. I could try to keep reconnecting if it is not running yet. The server is not supposed to handle a large number of requests, so I see no issue with that. It looks like I might have to use something other than Cloud Run if the RabbitMQ server causes the dangerous OS calls, however. – Stéphane Mar 29 '21 at 03:34
  • Python code often use C libraries to speed up the processing (python isn't really an efficient programming language). These C libraries can performs forbidden calls. Not especially dangerous unitary but the sandbox prevent these calls that can lead to an issue. Many of libraries have fallback to use another less efficient way. It seems not to be the case of yours, that's why using another client could solve the issue. – guillaume blaquiere Mar 29 '21 at 07:10
  • Perhaps some library indeed did something low-level. In the end, I used GCE and that worked fine. Thank you! – Stéphane Mar 29 '21 at 13:12