Hide menu

TDDB68 Concurrent programming and Operating Systems

FAQ

The purpose of this page is to collect some common problems that students encounter. It is by no means complete, but the ambition is to exend this page with more problems and in time it will hopefully become a valuable resource. If you have something that you think would fit on this page. Please send a mail to mikael.asplund@liu.se with the problem and solution (following the format below).

General issues

  • Problem: pintos/pintos-gdb not found (missing path)

    Solution:

    Make sure you have set the path properly in all the windows that you open. Add this line to your $HOME/.bashrc so it will be done automatically:

        export PATH="${HOME}/pintos/src/utils/:${PATH}/"
      

VM-related

  • Problem: gdb macros not available
      ...
      pintos-gdb: 19: exec: gdb: not found
    

    Solution:

    You are probably trying to run pintos-gdb from within the trusty environment. Only pintos should be run from within the trusty environment, pintos-gdb should be run in a normal environment.

Emulator-related

  • Problem: Can't exec "qemu"
      qemu: -s: Failed to find an available port: Address already in use
    

    Solution:

    Most likely there is already an instance of qemu running. Issue a top command or ps command, locate the qemu process still running and kill it.

  • Problem: Can't exec "qemu"

    when running the pintos command "pintos --qemu -- -f -q", an error message is produced stating

          Can't exec "qemu": No such file or directory at /src/utils/pintos line 877.
    	
    	command failed
        

    Solution:

    Recreate the qemu symbolic link:

    ln -s /usr/bin/qemu-system-i386 /src/utils/qemu
    

Debugging

  • Problem: pintos is stuck waiting for gdb to connect to it from another shell

    Solution:

    This problem seems to be caused by running on Thinlinc. Since other students might be running on the same machine, it can interfere with your instance. Login to a dedicated machine.

  • Problem: debugger does not stop at breakpoints, this problem seems to appear in the LiU linux environment for some students

    Solution:

    This might be cause by having the wrong gcc version. Fix by setting gcc explicitly to gcc-4.8 in Make.config (must be changed in the first two cases in the file) under src/ and then clean and recompile.

  • Problem: How to use a graphical debugger?

    Solution:

    In addition to the gdb-pintos command which provides an interactive but text-based interface, you can also use the graphical frontend ddd. To start ddd you follow all the instructions from lab0 except replacing the line:

    pintos-gdb kernel.o
    

    with

    ddd --debugger pintos-gdb kernel.o
    

    (As usual you must have setup your path correctly for it to work). The commands to gdb should be provided in the gdb console at the bottom of the ddd window. You can open the source files directly in ddd and set breakpoints by right-clicking in the source panel.


Page responsible: M. Asplund and K. Arvidsson
Last updated: 2024-03-07