marcopalena / polito-os161-docker

A compact Docker image to compile, run and debug the teaching operating system OS/161.
MIT License
20 stars 6 forks source link

Debug socket binding not working in M1 build #4

Closed whytox closed 2 years ago

whytox commented 2 years ago

Hi, so, I finally started my self-built container successfully using a mounted volume, but there is another problem. When running sys161 -w kernel I get the following:

os161user@2e9e52bbb028:~/os161/root$ sys161 -w kernel
sys161: bind: Invalid argument
sys161: Could not bind debug socket; debugging disabled
sys161: bind: Invalid argument
sys161: Could not set up meter socket; metering disabled
sys161: System/161 release 2.0.8, compiled Mar 14 2022 10:06:22
sys161: Waiting for debugger connection...

And, as you can read from the third line, it means I cannot debug.

I tried also with the image shipped by you (for the Linux/amd64 platform), but I got the same result.

Have someone else had this issue? Please, if everything is working fine for you with the same configuration, drop a comment. Thank you.

davideaimar commented 2 years ago

I get the same error if the container uses a named volume. Try to use a volume created with just:

docker volume create polito-os161-vol

For me it solved the problem. You can't directly access the files from your local filesystem anymore, but you can rebuild the image adding git and use that to manage your project files.