Opened 7 years ago

Closed 7 years ago

#5448 closed defect (fixed)

Record startup problem (rainbow)

Reported by: rwh Owned by: rwh
Priority: high Milestone: Update.1
Component: camera-activity Version:
Keywords: rainbow-integration Cc: mstone, olpc-dev@…, jg
Blocked By: Blocking:
Deployments affected: Action Needed:
Verified: no

Description

Record does not start on joyride 1398. Log attached.

Probably issue with rainbow on dir-access.

Attachments (1)

record.log (4.1 KB) - added by rwh 7 years ago.

Download all attachments as: .zip

Change History (19)

Changed 7 years ago by rwh

comment:1 Changed 7 years ago by jg

  • Cc mstone added
  • Keywords rainbow-integration added
  • Milestone changed from Never Assigned to Update.1

comment:2 Changed 7 years ago by AlexL

I got the same error in the logs on Joyride 1408. After turning off security, (rm /etc/olpc-security) Record loaded fine.

comment:3 Changed 7 years ago by mstone

I'm not sure why you're trying to 'rm -rf' the instance dir, but it will probably work better if you use the correct path.

According to the rainbow source code, this should be /activities/uid_to_instance_dir/<uid>, not /activities/uid_to_home_dir/<uid>/instance. Does $SAR/instance point to the wrong place?

comment:4 Changed 7 years ago by erikb

Will review and have fix out tomorrow.

comment:5 Changed 7 years ago by erikb

  • Cc olpc-dev@… added

comment:6 Changed 7 years ago by erikb

  • Status changed from new to assigned

To get the instance directory in an activity, we call

os.path.join( self.get_activity_root(), "letsCallThisInstance" )

and to make the shared between sessions tmp directory we call:

os.path.join( self.get_activity_root(), "letsCallThisTmp" )

The source code, while well-organized, is a little oblique. What should activity authors call to get the instance and shared tmp directories?

comment:7 Changed 7 years ago by mstone

Something equivalent to

sar = os.environ['SUGAR_ACTIVITY_ROOT']
instance_dir = os.path.join(sar, 'instance')
tmp_dir = os.path.join(sar, 'tmp')
data_dir = os.path.join(sar, 'data')

ought to do the trick.

comment:8 Changed 7 years ago by mstone

This turns out to be more subtle than I recognized on the first read. The fundamental issue is that permission to unlink inodes (i.e. to delete a dirent) is granted by authority of having write access to the containing directory. This makes things exciting in our model since activities are granted write access to neither /activities/uid_to_home_dir/<uid> (which would allow you to unlink the 'instance' symlink) or nor /activities/uid_to_instance_dir (which would allow you to unlink the directory pointed to by the 'instance' symlink). In conclusion, since you are actually trying to return the instance and temp dirs to a pristine state, you should do _exactly_ that by unlinking the inodes contained in those directories (and nothing else) or you should handle the permissions errors that result from attempting to unlink inodes contained in directories to which you do not have write access.

comment:9 Changed 7 years ago by erikb

  • Resolution set to fixed
  • Status changed from assigned to closed

Thanks, got it. Fix is Record v47.

comment:10 follow-up: Changed 7 years ago by erikb

  • Cc jg added
  • Keywords ship.2? added

JG - can we get this into ship.2? Just switched the paths to the right Rainbow places.

comment:11 in reply to: ↑ 10 Changed 7 years ago by erikb

Replying to erikb:

JG - can we get this into ship.2? Just switched the paths to the right Rainbow places.

err... update.1 :-)

comment:12 Changed 7 years ago by jg

  • Keywords ship.2? removed

Ok for update.1.

comment:13 Changed 7 years ago by jg

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:14 Changed 7 years ago by jg

  • Owner changed from erikb to dgilmore
  • Status changed from reopened to new


comment:15 Changed 7 years ago by marco

  • Resolution set to fixed
  • Status changed from new to closed

This is not in yet. Please let's try to get it all the approved packages as soon as possible, otherwise the process becomes really painful.

comment:16 Changed 7 years ago by marco

  • Resolution fixed deleted
  • Status changed from closed to reopened

Argh, obviously I didn't mean to close it.

comment:17 Changed 7 years ago by dgilmore

  • Owner changed from dgilmore to rwh
  • Status changed from reopened to new

please test build 661

comment:18 Changed 7 years ago by rwh

  • Resolution set to fixed
  • Status changed from new to closed

Verified as working in update-1 build 665

Note: See TracTickets for help on using tickets.