On my first post with the same $topic, I’ve described a ptrace bug on FreeBSD. I’ve reported this issue on freebsd-hackers mailing list and submitted a PR and FreeBSD developers have fixed the problem.

Here’s how they did it:

A big thanks!