sst: assertion failed ... code fragment does not contain the given arm address

I have been using 0.0.462 for a while without problems. Yesterday I decided to upgrade to 0.0.535 and started getting problems with sst dev and sst deploy.

One part of that was that when running dev or deploy I would intermittently (possibly alternate runs) see a ‘log’ message (even without verbose mode) which mentioned the error in the title of this issue.

I downgraded to 0.0.462 and the issue persisted. I assume that its coming from a dependency that gets installed when sst install runs after the upgrade/downgrade.

It appears to affect all sst commands that touch the cloud, so refresh is also affected.

When this log message appears, the command then halts indefinitely (no further output however long I wait).

Ctrl-C to abort and then running again often then succeeds, although sst deploy seems to fail every time, whereas sst dev will succeed (on alternate invocations).

time=2024-07-17T08:27:03.003+01:00 level=INFO msg=publishing type=*project.StackEvent
time=2024-07-17T08:27:03.003+01:00 level=INFO msg=publishing type=*project.StackEvent
time=2024-07-17T08:27:03.033+01:00 level=INFO msg=publishing type=*project.StackEvent
time=2024-07-17T08:27:03.034+01:00 level=INFO msg=publishing type=*project.StackEvent
time=2024-07-17T08:27:03.284+01:00 level=INFO msg=publishing type=*project.StackEvent                                                                                                                      
time=2024-07-17T08:27:03.285+01:00 level=INFO msg=publishing type=*project.StackEvent
|  Log         assertion failed [arm_interval().contains(address)]: code fragment does not contain the given arm address
|  Log         (CodeFragmentMetadata.cpp:48 instruction_extents_for_arm_address)
⠏  Deploying   [3 skipped]       

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (5 by maintainers)

Most upvoted comments

I had a similar issue.

When I installed sst… npm i sst sst install … I kept seeing that running pulumi processes were Intel.

I also saw Intel when looking at running pulumi processes in activity monitor like @dmeehan1968 did above. (I have a “Kind” column, don’t remember if I added that somehow).

I’d go through a few rounds of deleting them (double clicking on the process in activity monitor tells you where they are), but every time I’d reinstallthey’d still come back running as Intel, not “apple” or arm.

When I ran npx which sst it would return node_modules/.bin/sst

I looked at that file, and saw this line (constructing the file to execute) const name = sst-${process.platform}-${process.arch}

So I ran this command to figure out what node thought process.platform and process.arch were… node -e 'console.log(process.platform, process.arch)'

It returned darwin x64

Thinking “wtf? x64?”, I ran this command because I thought maybe I was nuts and my laptop wasn’t apple silicon arch It returns arm64

Going back to that line from node_modules/.bin/sst, I found this folder node_modules/sst-darwin-x64 and it dawned on me.

Somehow my version of node was Intel. It turned out I had an old version of node installed globally. I think it was around from an old intel based laptop. When I bought this new macbook pro, I ported everything over from the old laptop. That included an intel version of node.

So, I deleted that version of node, that I found with this command which node And reinstalled node (arm this time) with n

I then re-deleted all the sst and pulumi binaries I could find. Then reran npm i sst sst install

And now I had node_modules/sst-darwin-arm64 When I ran sst dev and checked activity monitor, I starting seeing “Apple” next to the pulumi processes.

My world was right as rain again.

So, my guess is that pinning to 6.41.0 for @emlegweak helps because that’s an Arm/Apple version of the plugin, while new ones are coming in as Intel because of the version of Node.

Running this command from terminal should help… arch && node -e 'console.log(process.arch)'

If you don’t see arm64 on two lines (first line being OS/container architecture, second being node’s), then it’s definitely your problem.

@jayair In addition to the above, I can see from MacOS Activity Monitor that the pulumi instances do seem to be using Rosetta (so will be intel binaries) (Note the references to rosetta in the open files list for the processes).

Screenshot 2024-07-20 at 08 45 45 Screenshot 2024-07-20 at 08 45 59

This is also the case when using the either of the workarounds, so the issue existed prior to the 6.41.0 Pulumi release and as noted in https://github.com/pulumi/pulumi-aws/issues/4190 this is actually a GO issue at source.

For that reason, I would recommend using the GODEBUG workaround rather than pinning the version as hopefully it will be resolved in time. As this isn’t a direct SST issue, you could probably close this issue, but it might be worth pinning it as an alternative (or some other way of highlighting it) so others don’t spend time trying to figure out a workaround).

It should be noted that after running SST I’m seeing stuck node processes after these failed runs, and indeed, even with the workaround on either of the Pulumi versions mentioned. In the testing I did for my comments today I ended up with multiple Pulumi and node processes that had to be force quit - indeed going by the accumulated time they’ve been there for a few days since this problem started). It’s possible that this was IDE related, as closing the IDE did kill them off. I mentioned before that I thought that some of the deploy steps seems to be taking a lot longer, and I suspect this is a side effect of rosetta and stuck processes that might be interferring with the normal deploy process.

With either workaround it appears that the Pulumi processes correctly exit, but I’m still left with 3 node processes, one of which isn’t anywhere near idle (no sst dev running), but subsequent dev or deploy commands seem to reuse these instances so its not a big issue.

Screenshot 2024-07-20 at 08 22 59

Oh that’s surprising. I don’t know enough about SST internals but it seems like it is somehow downloading an x86_64 version of the aws provider.

I found a workaround, which is to fix the @pulumi/aws version via the sst.config.ts file:

      home: "aws",
      providers: {
        aws: {
          version: "6.41.0"
        }
      },

It seems that https://github.com/pulumi/pulumi-aws/issues/4190 is indeed relevant (sst by default installs ‘latest’ which is currently 6.45.0).