An aircraft has been heard flying overhead. Your team catch a brief glimpse of the aircraft through storm clouds. It is being severely buffeted by strong winds. You see multiple things are dropped. Some items fall quickly, other items blow in the wind. Shortly afterwards some leaflets are seen floating down from the sky.
The leaflets say:
Dear Survivors,
Please be assured help is on the way. We hope that rescue teams will reach you in approx. 24 hours. Due to rough terrain and poor visibility we have had difficulty pinpointing your location from the air. Supplies have been dropped at several locations that we think you may be able to reach. Please see approximate locations of drops on the map.
DO NOT RISK INJURY TO YOURSELVES as you will have to survive independantly until rescue!
(IN REAL LIFE: Look for triangular survivor tokens. You should retrieve the token, bring it to Scout Leaders Area and redeem it for items recovered from supply drop cache.)
Thur
x repair Maeve's guitar using wood glue, leave for 48hrs
Sat
- Drove down & back from Limerick. Met Eimear&Stephen&Aoife.
x rsync'd photos james laptop -> USB drive
x look for Maeve school photos - found a few cute ones but not for sending to journal
x Strung/tuned guitar. But as strings tightened glue stretched :-(
Sun
x fix guitar with superglue
x fix Kate bike one set brake pads replaced
x fix Maeve bike brake squeal (brake cables oiled, tightened // front brake pads fully off and back on - nuts were in ok order // BALANCED each side of brakes front and back (spring adjusted screws both sides)
x fix James bike disc brake pads (from Halfords) back brake was worn just down to metal, front brake less worn but replaced
x fixed 3 bike tubes
x Strung/tuned guitar. But as strings tightened glue stretched :-(
Mon
x Strung/tuned guitar. But the superglue is not holding.
x Repair guitar using glue + bracket. (cut the bracket)
x Strung/tuned guitar. repair is holding.
. guitar bracket flush, round bottom corner, hammer a curve in it
- need a mini-anvil :)
Tue
x morn: tuned guitar - it's starting to hold in tune ok, Maeve tested it
Books
x gave rationality.pdf Harry Potter to Kate/...
. reading graphic novel last man Y
for Wed/future . . .
. Glenmalure hike plan
. scouts plan hike for Jan/Feb ?
. scouts PLC . . long term plan . . adventures, skills, special interest, Survivor, County Cup
. scouts Annual Camp plans
. scouts County meetings/activities
. scouts James leader training
. Cycling submission: DART crossing/Booterstown
. DLR fernhill submission
This blog acts as an occasional diary or article log for me.
I have a book for Scouts and work which is diary/planner journal.
I have often scrappy bits of paper with task lists or planning ideas.
Also task manager app, google calendar, gmail, .. .
3. Made white and orange control point markers from plastic corriboard - with a control number and symbol of chemical element. Attached coloured pencil and little Darkness-into-Light tea light to control.
4. Scouters met the day before and put out most controls hidden on course.
5. Scouters met before meeting and put out controls which are more exposed.
6. Ran the challenge!
Challange Directions: STAY SAFE! Stay together. Be careful of traffic. Be kind and polite to members of the public. Do course safely but as fast as possible. Visit all marks. Record code of mark with coloured marker on your control sheet.
Num Score Description Code
1 10 maple tree near path
2 50 NE corner. behind bushes, up a tree, at fence
3 30 NE of lampost. alder tree
4 30 cypress tree near scout den
5 20 line up gaa olafs nets
6 10 beech near car park
7 20 path opposite lamp post
8 30 NW of forked tree
9 50 opposite lamp post in hedge
10 10 lamp post by garden
11 10 willow grove and bank
12 20 Southside of junction box
13 30 lamp post
BalallyScoutOrienteering.pdf - map and event description with controls
There are a few issues open around docker exec hanging but this one seems quite specific to running docker exec under the timeout command and to latest docker version 1.12.2 . . .
Have scripts which run docker exec like this: timeout 1m docker exec -i $id sh -c "$command"
They had been working ok. After upgrade to docker 1.12.2 the scripts hang on those docker exec commands. Interestingly, if I run the command on command-line (bash shell from ssh) then no hangs are seen. If the command is run from inside a #!/bin/bash script then the hang happens all the time.
BUG REPORT INFORMATION
Description docker exec command hangs when run in a bash script using timeout command and same command using timeout doesn't hang from command-line
Steps to reproduce the issue:
make a script like this called ugh.sh and run it:
#!/bin/bash
timeout 1m docker exec -it $contid sh -c "ls"
chmod 755 ugh.sh; ./ugh.sh
NOTE that the very same command run in shell doesn't hang.
Have you tried the --foreground option to timeout? If docker is behaving as a monitor itself then this should timeout all children and be the least invasive way to run docker
Thank you @pixelb. That works. Interesting! Using timeout --foreground 1m docker exec . . . etc the commands now do not hang (when running in bash script from bash shell which is when we saw hang before.). The hang was not and is not seen when the timeout and docker exec was called interactively from shell. I realise now (slightly more) the significance of that.
That looks like a good workaround for our scripts.
Samsung Galaxy Nexus.
3.8G of photos in internal storage.
Options are MTP "mounting" or PTP.
Ubuntu 14.xx
1.
First attempt copying using file manager . . . started out okay. Reported 3.8G will be copied over in 7 mins . . 15 mins . . later 1 hour and x mins. And it was getting stuck / hanging up (looked like at the same point).
Unplug/replug USB did not bring back MTP connection after hang. Needed to go to phone USB computer connection Settings and un-check and then re-check MTP to recover it.
1.59M 100% 1.67MB/s 0:00:00 (xfr#1834, to-chk=957/2800) Camera/IMG_20130808_123846.jpg 1.98M 100% 1.25MB/s 0:00:01 (xfr#1835, to-chk=956/2800) rsync: read errors mapping "/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C017%5D/Internal storage/DCIM/Camera/IMG_20130808_123846.jpg": No data available (61) Camera/IMG_20130808_123902.jpg 1.43M 100% 1.57MB/s 0:00:00 (xfr#1836, to-chk=955/2800) rsync: read errors mapping "/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C017%5D/Internal storage/DCIM/Camera/IMG_20130808_123902.jpg": No data available (61) Camera/IMG_20130808_124320.jpg 1.58M 100% 1.21MB/s 0:00:01 (xfr#1837, to-chk=954/2800) rsync: read errors mapping "/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C017%5D/Internal storage/DCIM/Camera/IMG_20130808_124320.jpg": No data available (61) Camera/IMG_20130808_124435.jpg 1.54M 100% 2.00MB/s 0:00:00 (xfr#1838, to-chk=953/2800) rsync: read errors mapping "/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C017%5D/Internal storage/DCIM/Camera/IMG_20130808_124435.jpg": No data available (61) Camera/IMG_20130808_124530.jpg 1.90M 100% 1.54MB/s 0:00:01 (xfr#1839, to-chk=952/2800) rsync: read errors mapping "/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C017%5D/Internal storage/DCIM/Camera/IMG_20130808_124530.jpg": No data available (61) Camera/IMG_20130808_124625.jpg 32.77K 1% 126.98kB/s 0:00:17
. . restarted . .
. . stuck again . .
. . seemed to be getting stuck on the same files . .
These errors seem to be encountered if rsyncing from files which get changed while sync happens. I think android should not be changing them. I don't think MTP would expose corrupt disk problem ? Something like antivirus locking the files should not be problem. Anyway, MTP connection a bit flaky . . maybe something on the android side is locking files or MTP drivers are a bit funny.
3.
Tried rsync with --remove-source-files on whole and on file selections (e.g. Camera/IMG_201606*) still got stuck. Each time after hang needed to go into droid unselect MTP and select again to connect again. At least files to be checked/transferred are being reduced now by removing them after they are synced.
rsync was getting stuck on the same file all the time. cp seemed to have less of a hanging problem. more tolerant of read errors? So made a script to do copy and remove if copy successful.
# Script using cp -p (and remove files as we go)
DEST=/home/jamesc/Pictures/201611FionnOldMobilePhone/DCIM/Camera/ cd /run/user/1000/gvfs/mtp*/Intern*/DCIM
FILES=$(ls Camera/)
for f in $FILES; do echo -n $f; cp -p Camera/$f $DEST/ && rm Camera/$f && echo success; done
This was run in a while true loop periodically recovering MTP connection when it hung.
while true; do ~/bin/sync_flaky_mtp.sh; sleep 1; done
And it would hang . . . periodically recovered MTP connection as already described.
5.
The script evolved . . .
Binary
files Camera/IMG_20160104_095626.jpg and
/home/jamesc/Pictures/201611FionnOldMobilePhone/DCIM/Camera//IMG_20160104_095626.jpg
differ IMG_20160104_100128.jpgalready RM IMG_20160104_100157.jpgalready
#!/bin/bash
DEST=/home/jamesc/Pictures/201611FionnOldMobilePhone/DCIM/Camera/ cd /run/user/1000/gvfs/mtp*/Intern*/DCIM FILES=$(ls Camera/) #echo FILES=$FILES ls Camera/ |wc -l for f in $FILES; do echo -n $f; if [[ ! -e $DEST/$f ]]; then # the timeout doesn't work on frozen mtp file
# we run this full script in a while true; do ~/bin/sync_flaky_mtp.sh; sleep 1; done loop # and periodically visit, if stuck unlock phone, deselect MTP and select it again # (to interrupt and restart MTP connection) # simply unplug & replug doesn't bring MTP connection back ok
timeout 20s cp -p Camera/$f $DEST/ && rm Camera/$f && echo success; else echo already done by earlier script which did not tidy up; diff -u Camera/$f $DEST/$f if [[ $? == 0 ]]; then rm Camera/$f && echo RM else # doing this copy on the weird files causes nasty freezy freezes. #cp -p Camera/$f $DEST/$f && rm Camera/$f && echo success;
# ALOT of files found to be a few bytes different.
# another copy caused hanging . . . so if dest file kindof looks ok we just remove source
# a few bytes in size different ls -al Camera/IMG_20150117_171621.jpg $DEST/Camera/IMG_20150117_171621.jpg -rw------- 1 jamesc jamesc 1277901 Jan 17 2015 Camera/IMG_20150117_171621.jpg -rwxr-----
1 jamesc jamesc 1275306 Nov 3 01:09 $DEST/Camera/IMG_20150117_171621.jpg
# copy again ? results in same size difference, date/time fixed up though
char c;
int i;
printf("%02x",c[&i]);
//printf("%02x",c[i]); // doesn't compile, error, cannot access c as array
// "error: subscripted value is neither array nor pointer nor vector"
c[&i] there is SOOOO BAD and WROOONG. Semantically wrong. But apparently not syntactically wrong in c.
Why does it compile?
Because 1. array[i] == *(array+i) == *(i+array) == i[array]
And 2. c casts char to int happily
In case of c[&i] c is the index added to pointer &i.
Now &i + value of c indexes an undefined area of memory so it is not good to use this!!
char c;
int i[10];
// normal access into array (bad to use a char as array index though)
for(c=0;c<10;c++) printf("%02x",i[c]); // normal-ish
for(c=0;c<10;c++) printf("%02x",*(i+c)); // equivalent pointer arithmetic
for(c=0;c<10;c++) printf("%02x",*(c+i)); // equivalent
for(c=0;c<10;c++) printf("%02x",c[i]); // allowed BUT NOT NORMAL
char c;
int i;
int buffer[20]; // buffer helps prog not seg fault!
// abnormal access into memory at offset of (int)c from &i
//for(c=0;c<10;c++) printf("%02x",&i[c]); // COMPILE ERROR
for(c=0;c<10;c++) printf("%02x",*(&i+c)); // a bit weird
for(c=0;c<10;c++) printf("%02x",*(c+&i)); // not normal
for(c=0;c<10;c++) printf("%02x",c[&i]); // but it compiles and runs(mostly)
for(c=0;c<10;c++) printf("%02x,",i[&c]); // this is all
printf(" ");
for(c=0;c<10;c++) printf("%02x,",*(i+&c)); // a bit weird
printf(" ");
for(c=0;c<10;c++) printf("%02x,",*(&c+i)); // not normal
//for(c=0;c<10;c++) printf("%02x,",&c[i]); // COMPILE ERROR
printf("\n");
Gaoithe commentedon Nov 9, 2016 •
edited
timeout 1m docker exec -i $id sh -c "$command"
Interestingly, if I run the command on command-line (bash shell from ssh) then no hangs are seen.
If the command is run from inside a #!/bin/bash script then the hang happens all the time.
BUG REPORT INFORMATION
docker exec command hangs when run in a bash script using timeout command and
same command using timeout doesn't hang from command-line