maximum subarray variant
JavaScript 140 chars

For the first solution, I assume that the fuel pits are provided in order order of location around the track and in the form:

var fuelPitInfo = [
    {
       location: 2,//The location from some point on the track
       fuelDistance: 1//The distance you can travel with the fuel from this stop
    },
    ..
]


Thus, a potential non code-golfed JavaScript function to calculate a working starting location is as follows (test fiddle):

function calculateStartingLocation(trackLength, fuelPitInfo) {
    for(i=0;;i++){
        var fuelPit = fuelPitInfo[i];
        var remainingFuelDistance = fuelPit.fuelDistance;
        for(j=i+1;;j++){
            var nextFuelPit = fuelPitInfo[j = j % fuelPitInfo.length];
            if (i == j) return fuelPitInfo[i].location;
            remainingFuelDistance -= (nextFuelPit.location - fuelPit.location + trackLength) % trackLength;
            if (remainingFuelDistance &lt; 0) break;
            remainingFuelDistance += nextFuelPit.fuelDistance;
            fuelPit = nextFuelPit;
        }
    }
}


And the code-golfed function version (140 chars) is as follows (assuming location is replaced with l and fuelDistance is replaced with d in the provided fuelPitInfo object) (test fiddle):

function a(b,c){for(i=0;e=c[i],f=e.d;i++){for(j=i+1;g=c[j=j%c.length];){if(i==j++)return c[i].l;f-=(g.l-e.l+b)%b;if(f&lt;0)break;f+=g.d,e=g;}}}