Skip to content
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

CMSG_NXTHDR hits a Bus Error on sparc64-unknown-linux-gnu #1239

Open
asomers opened this issue Feb 4, 2019 · 2 comments
Open

CMSG_NXTHDR hits a Bus Error on sparc64-unknown-linux-gnu #1239

asomers opened this issue Feb 4, 2019 · 2 comments
Labels
E-medium E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
Milestone

Comments

@asomers
Copy link
Contributor

asomers commented Feb 4, 2019

PR #1235 adds a new test program to ensure that the cmsg(3) family of functions are correctly implemented on all targets. However, when run in QEMU CMSG_NXTHDR hits a Bus Error. This could be an error in libc's CMSG_NXTHDR implementation for that platform, or it could be an error in Linux's definition of the macro (doesn't work on unaligned buffers or something like that). Less likely would be an error in QEMU. Lacking access to sparc hardware, I didn't investigate further.

https://travis-ci.com/rust-lang/libc/jobs/175199673

asomers added a commit to asomers/libc that referenced this issue Feb 4, 2019
Skip the CMSG_NXTHDR test on sparc64 linux because it hits a Bus Error.

Skip the entire cmsg test program on s390x because it dumps core
seemingly before the kernel finishes booting.

Issue rust-lang#1239
Issue rust-lang#1240
asomers added a commit to asomers/libc that referenced this issue Feb 5, 2019
Since these are defined in C as macros, they must be reimplemented in
libc as Rust functions.  They're hard to get exactly right, and they
vary from platform to platform.  The test builds custom C code that uses
the real macros, and compares its output to the Rust versions' output
for various inputs.

Skip the CMSG_NXTHDR test on sparc64 linux because it hits a Bus Error.

Issue rust-lang#1239

Skip the entire cmsg test program on s390x because it dumps core
seemingly before the kernel finishes booting.

Issue rust-lang#1240
gnzlbg added a commit to gnzlbg/libc that referenced this issue May 24, 2019
@gnzlbg
Copy link
Contributor

gnzlbg commented May 24, 2019

This reproduces on master, that is, updating the Debian version did not fix this (it did fix the s390x issue).

Chances are, there is a bug in our implementation.

@gnzlbg
Copy link
Contributor

gnzlbg commented May 24, 2019

I'm also seeing sometimes a:

running 5 tests
test t::test_cmsg_data ... ok
error: process didn't exit successfully: `qemu-arm -L /musl-arm /checkout/target/arm-unknown-linux-musleabihf/debug/deps/cmsg-7238071f2e3df703` (signal: 11, SIGSEGV: invalid memory reference)
The command "if [[ $TRAVIS_OS_NAME = "linux" ]] && [[ $BUILD_ONLY != "1" ]]; then sh ci/run-docker.sh $TARGET; else sh ci/run.sh $TARGET; fi" exited with 101.

seg fault on the arm build jobs in the cmsg tests. Restarting the build job fixes the issue, but it might mean that something fishy is going on there.

@tgross35 tgross35 added this to the 1.x milestone Aug 29, 2024
@tgross35 tgross35 added help wanted E-medium E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. and removed help wanted labels Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-medium E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
Projects
None yet
Development

No branches or pull requests

3 participants