Sample menu:

FAQs will be posted here. Keep checking this page.

Waitlists and getting enrolled

We are aware that many people are on the waitlist and that those people very much want to take the class. Please do not send email to the 746 faculty or staff about this... there is nothing we can do for you specifically. Students with the required prerequisites will be enrolled into the class when other students drop (officially), and no preference will be given based on personal pleas and emails. The only thing that will help is to encourage any friends who are planning to drop to do so as soon as possible so that people who really want the class can be enrolled.

LAB 2 (CloudFS)

Question:The handout mentions a 64-bit snapshot, but we are given 32-bits?

Answer:
Please assume that the handout says 32-bits. You should create a reasonable resolution monotonically increasing timestamp using these bits.

 

Question:Do I have to use extended attributes in my solution?

Answer:
No.

 

Question:I use extended attributes, do I have to use libtar? if not, what can I and what can’t I use?

Answer:
The handout suggests that you use libtar to archive the contents of your SSD. You may however not use an archiving technique at all, or use one of the other approved libraries. The approved list of libraries is:

1. libtar
2. libarchive (http://libarchive.org/downloads/libarchive-3.1.2.zip) , you can only use the source listed here, any deviations are akin to cheating.
3. Using System() to call “tar”, this approach makes cloudfs fork processes and you really should not be doing that, it is completely your responsibility to debug and ensure that this works. A filesystem spawning a shell/process is a dangerous design.

Note that you are responsible for making sure that your method works on autolab. If you want you use a different tar-like library, get our permission and have us post it on this list. You are not allowed to use a library that is not on this list.

 

Question:What should I be using for the timestamp, seconds or usecs? OR my tests fail because the duration between snapshots is too short

Answer:
The handout mentions that you should use seconds for your timestamp, this was an error and it should be a higher resolution timestamp. Please use a resolution that allows consecutive snapshots to have an increasing timestamp value.

 

Question: rm -rf gives IOError after reinit_env() is called in the script.

Answer:
We found a bug in our script. Please replace the functions.sh in the scripts folder with the new functions.sh.
The change is just an addition of the following 3 lines

shopt -s dotglob
rm -rf $SSD/*
shopt -u dotglob

after line number 118 in the file.

 

Question: test_part3.sh expects a file named 'big4'. Where should I get the file from?

Answer:
You can get the file from here.

 

Question: Are the test scripts and starter code for part 3 released?

Answer:
(UPDATE: there was bug in snapshot-test.c (with the open command) which was fixed on 04/23/2015 11:50 AM, redownload that file if you got it before that)The handout is here. The starter code is here.

 

Question:
"An error occurred while parsing the autoresult returned by the Autograder.
Error message: undefined method `split' for nil:NilClass
Score for this problem: 0.0"

Answer:
This happens when your job times out either because of cloudfs crashing on autolab or because of too much log being printed which goes beyond 300 seconds.

You should check the following:
1. Are you handling all the commandline arguments to cloudfs properly?
2. Do you have a lot of logs being printed in your code?

 

Question: My code passes all the tests for part 2 on autolab but I still get a 0? I get some autodriver error and I am not really sure what that means.

Answer:
Update. This error has been fixed! Please send an email to the staff mailing list if you are still facing this issue. Click on your score (0.0) to open the feedback for the submission. AUTORESULT_STRING prints your score in the 'Results' section for part 2 as 'Part1score:Part2score'. We are aware that you are getting a score of 0 even if you have scored full. We are working on it and will update your scores soon.

 

Question: Can we have a copy of the slides on part 3?

Answer:
Here you go.

 

Question: How to use the virtual box image?

Answer:
Instructions on how to use this image can be found HERE. Please go through the instructions before running the image.

 

Question: Hash Header file

Answer:
In order to maintain hashes in cloudfs implemented in C, uthash.h can be used. If you are using C++ there are hash table functions in STL, called maps.

For usage refer to : http://troydhanson.github.io/uthash
Students are allowed to use only uthash.h from this link.

1) One student asked and was granted permission to use this file. Others can do the same.
2) 746-staff does not know if this code is correct and will not be debugging it. If there are bugs in this code, you will not get extra time or help debugging it.
3) It is certainly possible that using this code ends up costing you more time than it saves.

Decision to use this file is entirely the responsibility of the student.

 

Question: Username/Password for logging into the Virtual Machine?

Answer:
Username: student
Password: password
This account is not a superuser account.

 

Question: The handout says that we are provided with two Virtual disk images, but I found only one of course website. Where is the SSD disk image?

Answer:
The SSD disk image is provided to you in VirtualBox image itself. The ssd_image directory in the home directory has the .disk image file.

 

Question: The handout says that the SSD image is ext2 but the actual image on the VM is ext4. Why?

Answer:
It doesn't matter. There shouldn't be any dependency on filesystem type with Fuse. It should work the same with all the EXTs (ext2, ext3, ext4).

 

Question: I always need to reboot the VM to see a change in place. Is there another way?

Answer:
There sure is! Just run the ./reset.sh script in the scripts folder and you'll be good to go.

 

Question: I want to develop on my own 64-bit machine but the compilation complains about the libs3 library.

Answer:
You can find the 64-bit libs3.a here.
As for libdedup.a, you can compile it yourself. We have already provided the source code for libdedup.

 

Question: How can I use cscope in this environment?

Answer:
1. The VM already has ssh built-in. You can use ssh and git to develop on your machine and run on the VM.
2. You can mount the VM using sshfs and work on it as a local directory.
3. You can download cscope binaries and scp them on the VM.

 

Question: make cloud-example fails. How to fix this?

Answer:
cloud-example.c includes cloudfs.h which is at cloudfs/cloudfs.h.
To solve this change line number 17 in cloud-lib/cloud-example.c from
#include "cloudfs.h" to #include <../cloudfs/cloudfs.h> and then make cloud-example again.

 

Question: Building s3-client fails. How to fix this?

Answer:
In s3-client/Makefile, please change the line 106 to the following:
$(VERBOSE_SHOW) gcc -o $@ $^ $(LIBRARY) $(LDFLAGS)
Essentially, you are just changing the order of $(LIBRARY) and $(LDFLAGS).

 

Question: Using extended attributes gives me a ENOTSUP.

Answer:
You need to specify the attribute class to be able to correctly set an extended attribute.
Please consult the attr man page.

 

Question: Autolab debugging

Answer: Autolab provides methods to log operations. This can be done by logging to /tmp/cloudfs.log.

On the local machine this can be done by
logfile = fopen("/tmp/temp_log", "w");
setvbuf(logfile, NULL, _IOLBF, 0); /* To ensure that a log of content is not buffered */
int fuse_stat = fuse_main(argc, argv, &cloudfs_operations, NULL);
and then printing logs to logfile.

On Autolab the file name needs to be cloudfs.log. Corresponding commands will be :

logfile = fopen("/tmp/cloudfs.log", "w");
setvbuf(logfile, NULL, _IOLBF, 0); /* To ensure that a log of content is not buffered */
int fuse_stat = fuse_main(argc, argv, &cloudfs_operations, NULL);


Do use this to debug your code. Please not that there is a limit on the number of log lines we can print on Autolab, so be conservative about logging. Also, please note the placement of fopen is before fuse_main().

 

Question: Complier reports an 'implicit declaration' error for a function I have already implemented and all the required header files are already included. Am I missing something?

Answer:
Adding '#define _XOPEN_SOURCE 500' to your cloudfs.c should fix the problem. Read up on why you need it before using it.

 

LAB 1 (FSCK)

 

Question: How can I test for the behaviour of the system fsck for specific errors?

The best way to do this is using dd to extract the partition and using a tool like debugfs to modify parts of it and reinsert the modified partition, and then running the run_fsck.pl script on the modified partition (reading the run_fsck.pl and insert_errors.pl script is useful too).
An example set of commands are:

$ mkdir tmp
$ dd if=disk of=tmp/partition_1 bs=51 skip=63 count=48132
$ debugfs -w tmp/partition_1
$ dd if=tmp/partition_1 of=disk bs=512 seek=63 conv=notrunc

The debugfs step can be replaced by any write call to a specific location within the file.

You can get more information on these commands by checking the man pages.
$ man debugfs
$ man dd

Alternatively, you can check the following links:
debugfs
dd