I have a binary that is freezing, and that binary happens to be my package manager, preventing me from installing any new packages.

Running under gdb, I can get a back trace when the process is frozen, and I get:

#0  0xb6cd9abc in syscall () from /lib/libc.so.6                                                                                                                                                                  
#1  0xb60a99b0 in startParsing () from /usr/lib/libexpat.so.1

So it looks like expat is making a syscall that never returns.

Is there a "low level" way for me to find out more about that syscall? I'd like to install strace, but since this is my package manager failing, I can't easily get strace onto the machine.

The CPU is arm, making it slightly more complicated to download ready made binaries.

  • You can get strace easily: download the package, unpack it yourself, then run. May 8 '18 at 15:38
  • Probably depends on the operating system you're running. Linux? Some BSD? Something else?
    – ilkkachu
    May 8 '18 at 15:46
  • @ilkkachu Linux. I've tagged the question as such.
    – user50849
    May 8 '18 at 15:54
  • Why not inspect the memory address assigned to StartParsing()? strace isn't going to give you any more than gdb or mdb. More than likely the file StartParsing() is working on is large, how long did you let it run?
    – jas-
    May 8 '18 at 16:10
  • @jas- Actually strace will give you much more information. strace will tell you what call was made, and the arguments to it. GDB does not provide this as the debugging symbols have been stripped out.
    – phemmer
    May 8 '18 at 17:20

Assuming you have strace installed:

strace /path/to/binary

edit: I didn't read the last bit which said you don't have strace, you should be able to download a strace tarball and build it without using your package manager. You could build it statically on another machine and copy it across if you don't have build tools installed.

  • I ended up solving it by downloading strace source and compiling it.
    – user50849
    May 10 '18 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.