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

ptrace call in src/breakpoint.c:29 returned -1: No such process (3) #71

Open
Arinerron opened this issue Nov 9, 2021 · 1 comment
Open
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Arinerron
Copy link
Owner

Arinerron commented Nov 9, 2021

$ heaptrace -F /bin/bash -c 'help & help & help' > /dev/null
...
... #3232: malloc(0x10)                                                                             = 0x555555683a10 
... #3233: malloc(0x20)                                                                             = 0x555555683a30 
... #3234: malloc(0x20)                                                                             = 0x555555683a60 
... #3235: malloc(0x20)                                                                             = 0x555555683a90 
... #3236: malloc(0x20)                                                                             = 0x555555683ac0 
... #3237: malloc(0x40)                                                                             = 0x555555683af0 
... #3238: malloc(0x05)                                                                             = 0x555555683b40 
... #3239: malloc(0x05)                                                                             = 0x555555683b60 
Detected fork in process (1313003->1313006). Following fork...
... #3240: free(#3239)                                                                                                                                                                                                                             (#3239=0x555555683b60)
... #3241: malloc(0x10)                                                                             = 0x555555683b60 
... #3242: malloc(0x05)                                                                             = 0x555555683b80 
... #3243: malloc(0x10)                                                                             = 0x555555683ba0 
... #3244: malloc(0x70)                                                                             = 0x55555564d6b0 
... #3245: malloc(0x02)                                                                             = 0x555555683bc0 
... #3246: free(#3245) heaptrace warning: ptrace call in src/breakpoint.c:29 returned -1: No such process (3):
	ptrace(PTRACE_POKEDATA, ctx->pid, vaddr, (orig_data & ~((uint64_t)0xff)) | ((uint64_t)'\xcc' & (uint64_t)0xff))
heaptrace warning: heaptrace failed to install "_tmp" breakpoint at 0xffffffffffffffff in process 1313006: No such process (3)
heaptrace warning: ptrace call in src/debugger.c:112 returned -1: No such process (3):
	ptrace(PTRACE_POKEDATA, ctx->pid, reg_rip, ((uint64_t)bp->orig_data & ~((uint64_t)0xff)) | ((uint64_t)'\xcc' & (uint64_t)0xff))
heaptrace warning: ptrace call in src/debugger.c:718 returned -1: No such process (3):
	ptrace(PTRACE_SETOPTIONS, ctx->pid, NULL, PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORK | PTRACE_O_TRACECLONE | PTRACE_O_TRACEEXEC)
heaptrace warning: ptrace call in src/debugger.c:719 returned -1: No such process (3):
	ptrace(PTRACE_CONT, ctx->pid, NULL, NULL)

redirecting to /dev/null seems to sometimes trigger this bug

@Arinerron Arinerron added the bug Something isn't working label Nov 9, 2021
@Arinerron Arinerron added this to the 2.0 milestone Nov 9, 2021
@Arinerron Arinerron self-assigned this Nov 9, 2021
@Arinerron
Copy link
Owner Author

here's another

... #3277: malloc(0x20)                                                                             = 0x5555556830c0 
... #3278: malloc(0x40)                                                                             = 0x5555556830f0 
... #3279: malloc(0x05)                                                                             = 0x555555683140 
... #3280: malloc(0x05)                                                                             = 0x555555683160 
Detected fork in process (1091067->1091069). Following fork...
... #3281: free(#3280)                                                                                                                                                                                                                             (#3280=0x555555683160)
... #3282: malloc(0x10) heaptrace warning: ptrace call in src/breakpoint.c:29 returned -1: Input/output error (5):
	ptrace(PTRACE_POKEDATA, ctx->pid, vaddr, (orig_data & ~((uint64_t)0xff)) | ((uint64_t)'\xcc' & (uint64_t)0xff))
heaptrace warning: heaptrace failed to install "_tmp" breakpoint at 0xffffffffffffffff in process 1091069: Input/output error (5)

============ END HEAPTRACE =============
Statistics:
... mallocs count: 2689
... callocs count: 549
... frees count: 42
... reallocs count: 2
... unfreed bytes: 0x37620

you have to run it a few times

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
None yet
Development

No branches or pull requests

1 participant