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

Pre-compiled binary segfaults on call to time() #5072

Closed
wspear opened this issue Apr 10, 2020 · 3 comments
Closed

Pre-compiled binary segfaults on call to time() #5072

wspear opened this issue Apr 10, 2020 · 3 comments

Comments

@wspear
Copy link

wspear commented Apr 10, 2020

  • Your Windows build number: 10.0.18363.752

  • What you're doing and what's happening:
    wget tau.uoregon.edu/pdt_lite.tgz #This is a ~200MB tarball containing the pdtoolkit, a source parser used for code performance analysis instrumentation
    tar -zxf -pdt_lite.tgz
    cd pdtoolkit-3.25.1/x86_64/bin
    gunzip edgcpfe.gz #Normally this would be provided by doing ./configure;make;make install in the top level directory
    ./edgcpfe #If getting to this point is a pain in the neck I can look for a way to provide this 9MB file directly. This is not the only provided binary that crashes but they all do so with a similar stacktrace. We do not have access to the source for these parsers.

  • What's wrong / what should be happening instead:
    This pre-compiled parser binary crashes with a segmentation fault. This happens in normal usage with the expected arguments but also when run with no arguments. It runs normally on all other known x86_64 platforms.

  • Strace of the failing command: gist

  • Backtrace:

Starting program: /home/wspear/bin/test/pdtoolkit-3.25.1/x86_64/bin/edgcpfe 

Program received signal SIGSEGV, Segmentation fault.
0xffffffffff600400 in ?? ()
(gdb) bt
#0  0xffffffffff600400 in ?? ()
#1  0x00000000005a763d in time ()
#2  0x0000000000496398 in get_time () at host_envir.c:1899
#3  0x00000000004963bc in get_timer (timer=0x7ffffffedce0) at host_envir.c:1910
#4  0x0000000000403194 in cfe_main (argc=1, argv=0x7ffffffedf88) at cfe.c:81
#5  0x0000000000403290 in main (argc=1, argv=0x7ffffffedf88) at cfe.c:188
@sirredbeard
Copy link
Contributor

I see

times({tms_utime=0, tms_stime=1, tms_cutime=0, tms_cstime=0}) = 386829

in your strace.

I was thinking maybe it is trying a time-related syscall that isn't supported on WSL, see #4973 and #4898.

I didn't see anything that jumped out at me in sys/times.h or bits/time.h.

Do you have a link to the code for edgecpfe, specifically cfe.c?

@therealkenc
Copy link
Collaborator

therealkenc commented Apr 10, 2020

9619  setrlimit(RLIMIT_CPU, {rlim_cur=RLIM64_INFINITY, rlim_max=RLIM64_INFINITY}) = 0
9619  times({tms_utime=0, tms_stime=1, tms_cutime=0, tms_cstime=0}) = 386829
9619  --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xffffffffff600400} ---

I was thinking maybe it is trying a time-related syscall that isn't supported on WSL, see #4973 and #4898.

Nah /dupe #1462 (message)

[edit] See also #4694 (message) for WSL2.

@ghost
Copy link

ghost commented Apr 10, 2020

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

@ghost ghost added the duplicate label Apr 10, 2020
@microsoft microsoft deleted a comment Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants