Pintos - UserProg all tests fail is_kernel_vaddr() - pintos

I am doing the Pintos project on the side to learn more about operating systems. I had tons of devops trouble at first with it not running well on an 18.04 Ubuntu droplet. I am now running it on the VirtualBox image that UCCS tells students to download for pintos.
I finished project 1 and started to map out my solution to project 2. Following the instructions to create a file I ran
pintos-mkdisk filesys.dsk --filesys-size=2
pintos -- -f -q
but am getting error
Kernel PANIC at ../../threads/vaddr.h:87 in vtop(): assertion
`is_kernel_vaddr (vaddr)' failed.
I then tried running make check (all the tests). They are all failing for the same reason.
Am I missing something? Is there something I need to implement to fix this? I reread the instructions and didnt see anything?
Would appreciate help!
Thanks

I had a similar problem. My code for Project 1 ran fine, but I could not format the filesystem for Project 2.
The failure for me came from the following call chain:
thread_init() -> ... -> thread_schedule_tail() -> process_activate() -> pagedir_activate() -> vtop()
The problem is that init_page_dir is still NULL when pagedir_activate() is called. init_page_dir should have been initialized in paging_init() but this is called after thread_init().
The root cause was that my scheduler was being called too early, i.e. before the call to thread_start(). The reason for my problem was that I had built in a call to thread_yield() upon completion of every call to lock_release() which makes sense from a priority donation standpoint. Unfortunately, locks are used prior to the scheduler being ready! To fix this, I installed a flag called threading_started that bails in the first line of my thread_block() and thread_yield() functions if thread_start() has not yet been called.
Good luck!

Related

Docker container failed to start when deploying to Google Cloud Run

I am new to GCP, and am trying to teach myself by deploying a simple R script in a Docker container that connects to BigQuery and writes the system time. I am following along with this great tutorial: https://arbenkqiku.github.io/create-docker-image-with-r-and-deploy-as-cron-job-on-google-cloud
So far, I have:
1.- Made the R script
library(bigrquery)
library(tidyverse)
bq_auth("/home/rstudio/xxxx-xxxx.json", email="xxxx#xxxx.com")
project = "xxxx-project"
dataset = "xxxx-dataset"
table = "xxxx-table"
job = insert_upload_job(project=project, data=dataset, table=table, write_disposition="WRITE_APPEND",
values=Sys.time() %>% as_tibble(), billing=project)
2.- Made the Dockerfile
FROM rocker/tidyverse:latest
RUN R -e "install.packages('bigrquery', repos='http://cran.us.r-project.org')"
ADD xxxx-xxxx.json /home/rstudio
ADD big-query-tutorial_forQuestion.R /home/rstudio
EXPOSE 8080
CMD ["Rscript", "/home/rstudio/big-query-tutorial.R", "--host", "0.0.0.0"]
3.- Successfully run the container locally on my machine, with the system time being written to BigQuery
4.- Pushed the container to my container registry in Google Cloud
When I try to deploy the container to Cloud Run (fully managed) using the Google Cloud Console I get this error: 
"Cloud Run error: Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable. Logs for this revision might contain more information. Logs URL:https://console.cloud.google.com/logs/xxxxxx"
When I review the log, I find these noteworthy entries:
1.- A warning that says "Container called exit(0)"
2.- Two bugs that say "Container Sandbox: Unsupported syscall setsockopt(0x8,0x0,0xb,0x3e78729eedc4,0x4,0x8). It is very likely that you can safely ignore this message and that this is not the cause of any error you might be troubleshooting. Please, refer to https://gvisor.dev/c/linux/amd64/setsockopt for more information."
When I check BigQuery, I find that the system time was written to the table, even though the container failed to deploy.
When I use the port specified in the tutorial (8787) Cloud Run throws an error about an "Invalid ENTRYPOINT".
What does this error mean? How can it be fixed? I'd greatly appreciate input as I'm totally stuck!
Thank you!
H.
The comment of John is the right source of the errors: You need to expose a webserver which listen on the $PORT and answer to HTTP/1 HTTP/2 protocols.
However, I have a solution. You can use Cloud Build for this. Simply define your step with your container name and the args if needed
Let me know if you need more guidance on this (strange) workaround.
Log information "Container Sandbox: Unsupported syscall setsockopt" from Google Cloud Run is documented as an issue for gVisor.

JEdit plugin error while loading Isabelle

I am working with a Windows 10 device and after some work with Isabelle I get the following error:
The following plugin could not be loaded:
C:\Users\PC\Desktop\Isabelle2018\src\Tools\jEdit\dist\jars\Isabelle-jEdit.jar:
Cannot start:
*** [line 1 of "preferences"] error: bad input
I note this problem appears in this version and in a previous Windows 8 version when not switching off properly the machine.
In the Isabelle list I got an answer to this problem:
The error indicates that the $ISABELLE_HOME_USER/etc/preferences file is in a bad state: the file is written each time Isabelle/jEdit shuts down, and switching off the computer in the middle might have corrupted it.
You can try to repair or delete that file. The location of $ISABELLE_HOME_USER on Windows is usually something like C:\Users\my_name.isabelle\Isabelle2018.
I think this problem may be encountered by other people in the community and this answer may save some time to them.

Call to undefined method SprintListController::buildApplicationPage()

I want to install phabricator-extensions-Sprint for phabricator. I followed the installation below:
To install the Sprint extension:
update your phabricator and libphutil to HEAD run git clone
https://github.com/wikimedia/phabricator-extensions-Sprint.git
/srv/phab/libext/sprint from the /srv/phab/phabricator/bin directory
run:
./config set load-libraries '{"sprint":"/srv/phab/libext/sprint/src"}'
But when I ran the Sprint in Application, I received the bug:
>>> UNRECOVERABLE FATAL ERROR <<<
Call to undefined method SprintListController::buildApplicationPage()
/opt/phabricator/libext/sprint/src/controller/SprintListController.php:46
┻━┻ ︵ ¯\_(ツ)_/¯ ︵ ┻━┻
I have to tried to do adding_new_classes but not effected.
Please help.
Sprint extension was recently broken by this commit in Phabricator:
https://secure.phabricator.com/rP2201c65eb73fb99b8625bea45c273d262f2c289f#19bb764c
The quick fix is to restore removed buildApplicationPage method by putting it into src/controller/SprintListController.php, it will fix the bug you describe.
However using Sprint extension looks like a questionable choice in the long run, given the problems discussed here:
https://phabricator.wikimedia.org/T90906

RHadoop Stream Job Fail with Apache Oozie

I'm really just looking to pick the community's brain for some leads in figuring out what is going on with the issue I'm having.
I'm writing a MR job with RHadoop (rmr2, v3.0.0) and things are great -- IO with HDFS, mapping, reducing. No problems. Life is great.
I'm trying to schedule the job with Apache Oozie, and am running into some issues:
Error in mr(map = map, reduce = reduce, combine = combine, vectorized.reduce, :
hadoop streaming failed with error code 1
I've read the rmr2 debugging guide, but nothing is really getting to the stderr because the job fails before anything even gets scheduled.
In my head, everything points to a difference in environments. However, Oozie is running the job as the same user that I'm able to run everything with via cli, and all of the R environment variables (fetched with Sys.getenv()) are the same, excepting there's some additional class path stuff set with Oozie.
I can post more of the OS or Hadoop versions and config details, but sleuthing some version-specific bugs seems like a bit of a red herring as everything runs fine at the command line.
Anybody have any thoughts what might be some helpful next steps in hunting this beast down?
UPDATE:
I overwrote the system function in the base package to log the user, the host name of the node, and the command being executed before the internal call to system. So before any system call is actually executed, I get something like the following in the stderr:
user#host.name
/usr/bin/hadoop jar /usr/lib/hadoop-mapreduce/hadoop-streaming-2.2.0.2.0.6.0-102.jar ...
When ran with Oozie, the command printed in the stderr fails with an exit status of 1. When I run the command on user#host.name, it runs successfully. So essentially the EXACT same command with the SAME user on the SAME node fails with Oozie, but runs successfully from cli.

CruiseControl / phpUnderControl Artifacts issues

I have set up Git and CruiseControl, and just finished getting phpUnderControl working (a nightmare in itself as it is missing packages and all sorts).
So I have all the plugins in it like phpunit and php-documentor.
When I run 'ant' on my project it builds fine (just to check my build.xml is good)
When running the build from PHPUnderControl it hangs on the graph generation
[cc]Sep-08 01:10:22 ecutePublisher- executing command: /root/phpUnderControl/bin/phpuc.php graph logs/BIOSYNERGY artifacts/BIOSYNERGY
And it sits here for hours, in 'publishing' status on cruisecontrol, but clicking in to says build complete, and I see maybe 4 out of an expected 9 graphs if I am lucky.
If I run it manually, it takes about 2 seconds and gives me all 9 graphs (but the building it still stuck on 'publishing' until I stop cruisecontrol.
Also, the Coverage atrifacts seem to work, but no index.html file is generated, so the tab for coverage shows an error.
Documentation sometimes works, sometimes doesn't but no errors about it.
Code browser never seems to display any code?
Is there something missing that the Artifacts Publisher needs?
<artifactspublisher subdirectory="api" dest="artifacts/${project.name}" dir="projects/${project.name}/build/api"/>
<artifactspublisher subdirectory="coverage" dest="artifacts/${project.name}" dir="projects/${project.name}/build/coverage"/>
<execute command="phpcb --log projects/${project.name}/build/log --output projects/${project.name}/build/phpcb"/>
<artifactspublisher dir="projects/${project.name}/build/phpcb" dest="artifacts/${project.name}" subdirectory="php-code-browser"/>
<execute command="/root/phpUnderControl/bin/phpuc.php graph logs/${project.name} artifacts/${project.name}"/>
Thanks for any help!
CC is installed at: http://pixelhero.co.uk:8080
If you're not tied to phpUnderControl, I recommend switching to Jenkins as it is actively developed and has a working project template by the main author of PHPUnit.

Resources