On Thu, May 21, 2020 at 12:46 PM De Vries <f1r3flyp1...@gmail.com> wrote:
> Hi, > > Sorry if this is a bit of a newbie question. I'm trying to run a pretty > simple application on OSv: pxz <https://github.com/jnovy/pxz>. I'm able > to run other apps like mysql for example without any problem. > I have tried this the following way. First, I compiled the pxz executable > with the -fPIE flag on the host machine, then put it in a new folder at > osv/apps/pxz. I then ran the following: > ./scripts/manifest_from_host.sh -r ~/osv/apps/pxz/pxz > ./apps/pxz/usr. > manifest > ./scripts/build image=pxz > > It generates the following usr.manifest > # (PIE) Position Independent Executable > /pxz: /home/user1/osv/apps/pxz/pxz > # -------------------- > # Dependencies > # -------------------- > /usr/lib/libgomp.so.1: /usr/lib/x86_64-linux-gnu/libgomp.so.1 > /usr/lib/liblzma.so.5: /lib/x86_64-linux-gnu/liblzma.so.5 > # -------------------- > > Running it with > ./scripts/run.py -e "pxz --version" > > Results in > OSv v0.55.0-6-g557251e1 > eth0: 192.168.122.15 > Booted up in 407.56 ms > Cmdline: pxz --version > > But it just hangs. No errors, but also no output. I have tried actually > using pxz (not just --version) to compress a file but that also hangs > indefinitely (while this works fine on the host machine). > It's hard to say. It seems like you did everything right. I assume that if you run "pxz --version" on the host it works properly - prints a version number and exits - right? During the "hang", does OSv do some busy loop ("top" will show you the OSv vm taking 100% CPU) or waits for something? One thing you can do to figure out what is going on is to attach gdb to the running VM, and inquire from it what threads are running, and what they are waiting for. It's not trivial to do, but not particular difficult either, and explained well (I hope) here: https://github.com/cloudius-systems/osv/wiki/Debugging-OSv#debugging-osv-with-gdb Note that you don't need to rebuild OSv specially for debugging to debug it this way. > > Running ./scripts/run.py with the -V flag looks completely fine except > maybe for the last line that is printed (after it prints Cmdline: pxz > --version): > sysconf(): stubbed for parameter 0 > > This is a _SC_ARG_MAX parameter to sysconf(), it is indeed not implemented (and can be trivially implemented) but I doubt that this is the problem causing the hang (I also wonder why this program would need to check _SC_ARG_MAX if it's just planning to print the version number, not exec() anything - you can look at this software's source code to see what it does with _SC_ARG_MAX. > I have also tried to run pxz using the way its done in the native-example > application, but that also results in it hanging indefinitely. > What could be the issue here? > > -- > You received this message because you are subscribed to the Google Groups > "OSv Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to osv-dev+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/osv-dev/9ce2c259-c6e9-475d-aa73-e7e6d71cd722%40googlegroups.com > <https://groups.google.com/d/msgid/osv-dev/9ce2c259-c6e9-475d-aa73-e7e6d71cd722%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/CANEVyjvzkBHjObupP5kYTHaF2RBzJFUhGCHJi-pZS6M-zhDoHw%40mail.gmail.com.