Oops, secure memory pool already initialized (only when using docker buildx and arm64)

I am hoping to get some pointers into where I may need to look for a solution here. I am currently building a docker container in ec2 for both arm64 and amd64 and they work perfectly fine; however, when using docker buildx on an amd64 instance to build an arm64 image, I run into this weird error.

So just to summarize, these are the two scenarios/results that I am running into:

  • EC2 instance (amd64): Successful
  • EC2 instance (arm64): Successful
  • EC2 instance (amd64 instance using docker buildx w/ platform set to amd64): Successful
  • EC2 instance (amd64 instance using docker buildx w/ platform set to arm64): Unsuccessful

This is the error that I receive pretty consistently:

#0 1182.1 read_ls_etc_rc_d.nasl
          3,232 100%    4.50kB/s    0:00:00 (xfr#2903, ir-chk=2689/5593)
#0 1182.1 read_lsmod_kernel
#0 1182.1 [output clipped, log limit 1MiB reached]
#0 1650.1 ERROR:systemctl:the service is already running on PID 46319
#0 3052.3 <28>Jun 24 14:32:44 greenbone-nvt-sync: The log facility is not working as expected. All messages will be written to the standard error stream.
#0 3052.3 <29>Jun 24 14:32:44 greenbone-nvt-sync: No Greenbone Security Feed access key found, falling back to Greenbone Community Feed
#0 3057.3 <29>Jun 24 14:32:49 greenbone-nvt-sync: Configured NVT rsync feed: rsync://feed.community.greenbone.net:/nvt-feed
#0 3109.4 Oops, secure memory pool already initialized
------
error: failed to solve: executor failed running (long docker output here)
(docker quits)

I believe this is caused by running one of the following lines:

    service postgresql start && \
    runuser -u _gvm -- gvm-manage-certs -a -f && \
    runuser -u _gvm -- greenbone-nvt-sync && \
    runuser -u _gvm -- greenbone-feed-sync --type CERT

However, this only happens when running buildx and trying to emulate an arm64 architecture.

Apologies if this isn’t posted in the right section, but just hoping to get some pointers at the very minimum.

The error in the subject line(“Oops, secure memory pool already initialized”) I see every time my containers start on all platforms. It’s from gsad. But I don’t think that is the error you are trying to debug? In the past, I’ve debugged things like this with a sleep 1d in the entrypoint, then shell into the container to run things one by one to isolate. If you already have the cross compile setup, you can still do this with “docker run --platform”, just make sure you have pulled the arm64 image and/or use a tag specific to the arm64 image. Once you’re in the container, you can run arch to make sure you are running the arm64 image.

Feel free to take a look and pull anything you need from mine if you need to. It’s working pretty well at this point.

https://github.com/immauss/openvas

And if I can help, feel free to PM me.

-Scott

1 Like

Gotcha. Thanks so much for this help. Going to PM you. Not 100% sure if this is the error I’m looking to fix BTW, it’s just the last thing I see before the docker build stops. Hit you up in a bit!