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

ox hangs when opening this file #54

Closed
ldhieu opened this issue Nov 3, 2020 · 6 comments
Closed

ox hangs when opening this file #54

ldhieu opened this issue Nov 3, 2020 · 6 comments
Labels
bug Something isn't working
Projects

Comments

@ldhieu
Copy link

ldhieu commented Nov 3, 2020

Describe the bug
ox (v0.2.5 with no config) hangs (forever) if instructed to open this file

To Reproduce
Steps to reproduce the behavior:

  1. ox README.txt
  2. hangs

Expected behavior
File is opened and ox does not hang

Desktop (please complete the following information):

  • Mac OS X 10.15.7
  • rustc 1.48.0-beta.5 (4c78178b1 2020-10-21)
  • ox 0.2.5 installed via manual method (cargo install --git https://github.com/curlpipe/ox)

the file is attached here (it's the README.txt [1] file found in apache-maven-3.6.3 binary release .tar.gz). You might have to download the maven archive here http://maven.apache.org/download.cgi and extract it, then try to open it, as I don't know whether attaching the file to github messes up its line ending. a gzipped version [2] of the readme.txt is provided)

[1] README.txt
[2] README2.txt.gz

@ldhieu
Copy link
Author

ldhieu commented Nov 3, 2020

dtruss output attached here if it helps:

SYSCALL(args) 		= return
open("/dev/dtracehelper\0", 0x2, 0xFFFFFFFFE90AFC40)		= 3 0
ioctl(0x3, 0x80086804, 0x7FFEE90AFB50)		= 0 0
close(0x3)		= 0 0
mprotect(0x106CD7000, 0x28000, 0x1)		= 0 0
access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0)		= -1 2
bsdthread_register(0x7FFF73AFDB7C, 0x7FFF73AFDB68, 0x2000)		= 1073742047 0
sysctlbyname(kern.bootargs, 0xD, 0x7FFEE90AED00, 0x7FFEE90AECF0, 0x0)		= 0 0
ioctl(0x2, 0x4004667A, 0x7FFEE90AEF74)		= 0 0
mprotect(0x106D57000, 0x1000, 0x0)		= 0 0
mprotect(0x106D5E000, 0x1000, 0x0)		= 0 0
mprotect(0x106D5F000, 0x1000, 0x0)		= 0 0
mprotect(0x106D66000, 0x1000, 0x0)		= 0 0
mprotect(0x106D55000, 0x90, 0x1)		= 0 0
mprotect(0x106D67000, 0x1000, 0x1)		= 0 0
mprotect(0x106D55000, 0x90, 0x3)		= 0 0
mprotect(0x106D55000, 0x90, 0x1)		= 0 0
issetugid(0x0, 0x0, 0x0)		= 0 0
getentropy(0x7FFEE90AE540, 0x20, 0x0)		= 0 0
getentropy(0x7FFEE90AE590, 0x40, 0x0)		= 0 0
getpid(0x0, 0x0, 0x0)		= 19514 0
stat64("/AppleInternal\0", 0x7FFEE90AF170, 0x0)		= -1 2
csops_audittoken(0x4C3A, 0x7, 0x7FFEE90AECC0)	= -1 22
proc_info(0x2, 0x4C3A, 0xD)		= 64 0
csops_audittoken(0x4C3A, 0x7, 0x7FFEE90AE540)	= -1 22
fcntl(0x0, 0x1, 0xFFFFFFFFE90B0820)		= 0 0
fcntl(0x1, 0x1, 0x0)		= 0 0
fcntl(0x2, 0x1, 0x0)		= 0 0
sigaction(0xD, 0x7FFEE90B0748, 0x7FFEE90B0770)		= 0 0
dtrace: error on enabled probe ID 2210 (ID 572: syscall::sysctl:return): invalid kernel access in action #10 at DIF offset 28
getrlimit(0x1003, 0x7FFEE90B0768, 0x0)		= 0 0
mmap(0x7FFEE88B1000, 0x1000, 0x3, 0x1012, 0xFFFFFFFFFFFFFFFF, 0x0)		= 0x7FFEE88B1000 0
mprotect(0x7FFEE88B1000, 0x1000, 0x0)		= 0 0
sigaction(0xB, 0x0, 0x7FFEE90B07A0)		= 0 0
sigaction(0xB, 0x7FFEE90B0778, 0x0)		= 0 0
sigaction(0xA, 0x0, 0x7FFEE90B07A0)		= 0 0
sigaction(0xA, 0x7FFEE90B0778, 0x0)		= 0 0
sigaltstack(0x0, 0x7FFEE90B0770, 0x0)		= 0 0
mmap(0x0, 0x21000, 0x3, 0x1002, 0xFFFFFFFFFFFFFFFF, 0x0)		= 0x106D68000 0
mprotect(0x106D68000, 0x1000, 0x0)		= 0 0
sigaltstack(0x7FFEE90B0770, 0x0, 0x0)		= 0 0
getentropy(0x7FFEE90AF120, 0x10, 0x0)		= 0 0
open("/Users/ldhieu/Library/Application Support/ox/ox.ron\0", 0x1000000, 0x1B6)		= -1 2
open("README.txt\0", 0x1000000, 0x1B6)		= 3 0
fstat64(0x3, 0x7FFEE90AEE10, 0x0)		= 0 0
dtrace: error on enabled probe ID 2186 (ID 174: syscall::read:return): invalid kernel access in action #12 at DIF offset 68
dtrace: error on enabled probe ID 2186 (ID 174: syscall::read:return): invalid kernel access in action #12 at DIF offset 68
close_nocancel(0x3)	= 0 0
ioctl(0x1, 0x40087468, 0x7FFEE90AF910)		= 0 0
ioctl(0x1, 0x40487413, 0x7FFEE90AF910)	= 0 0
ioctl(0x1, 0x80487414, 0x7FFEE90AF590)		= 0 0
bsdthread_create(0x106C7B2C0, 0x7FF2E8433150, 0x700008522000)		= 139599872 0
thread_selfid(0x0, 0x0, 0x0)		= 509597 0
sigaltstack(0x0, 0x700008521F40, 0x0)		= 0 0
mmap(0x0, 0x21000, 0x3, 0x1002, 0xFFFFFFFFFFFFFFFF, 0x0)		= 0x106D89000 0
mprotect(0x106D89000, 0x1000, 0x0)		= 0 0
sigaltstack(0x700008521F40, 0x0, 0x0)		= 0 0
open("/dev/tty\0", 0x1000002, 0x1B6)		= 3 0
madvise(0x7FF2E8600000, 0x10000, 0x9)		= 0 0
madvise(0x7FF2E8611000, 0x100000, 0x9)		= 0 0

it hangs here

If I do kill -9 on the dtruss process (so that ox continues), it outputs this repeatedly

read(0x3, "\0", 0x1)		= -1 5

alongside some intermittent

dtrace: 307632 dynamic variable drops with non-empty dirty list

and

read(0x3, "\0", 0x1)		= -1 mprotect5

@adriaanbd
Copy link

adriaanbd commented Nov 4, 2020

Had the same issue opening a terraform file on WSL2 Ubuntu, see #53.

@curlpipe
Copy link
Owner

curlpipe commented Nov 4, 2020

Thanks for the info guys, I will take a look into this odd behaviour. Hopefully it's an easy fix.

@adriaanbd
Copy link

Looking forward to using it Ox and provide more feedback :)

@curlpipe curlpipe added the bug Something isn't working label Nov 6, 2020
@curlpipe curlpipe added this to Tasks in 0.2.* Nov 8, 2020
@curlpipe curlpipe moved this from Tasks to In Progress in 0.2.* Nov 9, 2020
@curlpipe
Copy link
Owner

I have now concluded that the reason is 100% because of the dos line endings. I will work on fixing this immediately.

@curlpipe
Copy link
Owner

curlpipe commented Nov 11, 2020

Fixed in 0.2.7

@curlpipe curlpipe moved this from In Progress to Complete in 0.2.* Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
0.2.*
Complete
Development

No branches or pull requests

3 participants