Skip to content

Check if turning off parallelism when building the stdlib gets it not to segfault #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

finagolfin
Copy link

No description provided.

@finagolfin
Copy link
Author

Alright, memory exhaustion is not the problem.

@futurejones
Copy link
Owner

good to know and rule it out.

@finagolfin
Copy link
Author

Let me see if I can reproduce by building a standalone armv7 stdlib on my AArch64 phone with my 32-bit Android armv7 Swift compiler, which I've never tried since I cross-compile my Android armv7 toolchain from linux x86_64.

If I cannot, this is likely an issue specific to linux armv7, some regression that has crept in. If so, I would need to debug more closely and need a shell account to figure this out.

@futurejones
Copy link
Owner

@buttaface I tested the same build on a Raspberry Pi 4 with 32bit OS installed and no Docker used.
It fails at exactly the same point with the same errors.

@futurejones
Copy link
Owner

How will a shell account to the server help?

@finagolfin
Copy link
Author

I can check if memory is running out for this swift-frontend process that crashes, run it through a debugger in different configurations and so on, basic investigation that I can't do on this CI.

Of course, if it's reproducible on my phone, I can just do all that there instead, so I'll let you know.

@finagolfin
Copy link
Author

finagolfin commented May 29, 2022

Alright, tried building a standalone 5.6 stdlib for armv7 by running an Android armv7 compiler, no problem. I've been meaning to try running the compiler validation suite on the armv7 compiler for some time now and never bothered, but this finally spurred me to kick that off too.

Some possibilities for why the build is failing for you, let me know what you think:

  1. I notice that this failing command takes around 100s to execute on my phone. Since each of the Ampere cores are weaker than the main core on my Snapdragon 888 phone, maybe some kind of timeout on your server is killing the compiler once it goes past two minutes?
  2. I diffed the failing command here against mine and noticed some Swift flags are different, for example, you don't have these flags, but I do. Never mind, see below.
  3. I'm building with the final Swift 5.6.1 compiler that's linked against the Swift stdlib, whereas this failing command is with the initial bootstrap compiler. It is unlikely that is the problem, but it is possible. I checked if this bootstrap step uses the same missing flags in 2. with my Android AArch64 bootstrap build and it does, so the bootstrap difference is not why those flags are missing for you. Update: I then checked an old bootstrap build of Swift 5.6 for AArch64 and it didn't apply those extra flags either, so those different flags were probably added later in trunk and are not the reason for this build failure.
  4. Some other difference in the linux/glibc environment on this CI compared to my linux/bionic environment on my Android phone

@finagolfin
Copy link
Author

@futurejones, what do you think?

@futurejones
Copy link
Owner

@buttaface, sorry I haven't had any spare time to look at this recently.

@finagolfin
Copy link
Author

@futurejones, what do you think about that shell account so I can debug this? Ideally, it would be in the Docker image, so I can just run the armv7 build without having to set all this up again.

@futurejones
Copy link
Owner

@buttaface direct access to the server with a shell account is not possible.
The docker image itself is not accessible. A docker container has to be built using the image and the other setup variables to create a build environment.
Swift is then built inside this build environment within the new container.
There are full console build logs for all the builds which gives all the information about the build failures.
https://ci.swiftlang.xyz/job/swift-5.6.1-debian-bullseye-armv7-pr-testing/12/console

@finagolfin
Copy link
Author

direct access to the server with a shell account is not possible.

Not possible to your server at all, or just to the Docker? If you can give me ssh access to an AArch64 kvm or some other container, that would work too.

There are full console build logs for all the builds which gives all the information about the build failures.

I've looked at those, they are useless since the newly-built Swift compiler is crashing. I would need a shell account with a debugger to track that down.

@futurejones
Copy link
Owner

@buttaface,
That is correct, I cannot provide any shell access to the server at all.
The Armv7 Docker images are available on - Docker Hub if you want to build test containers on your own hardware.

@finagolfin
Copy link
Author

Alright, I don't have access to any linux ARM hardware to debug this, as opposed to Android where the armv7 compiler runs fine, so closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants