Why is the status is failed?

You did not provide all input data, so the problem is not reproducible by forum readers. (And of course you used rand).

Perhaps the input data is poorly scaled (numbers which are many orders of magnitude from one) - that could cause the solver to fail. A different solver might help. At least try sedumi. Try Mosek if you have it available, because that is the most numerically robust solver, and it provides the best warning and diagnostic information.

You should ignore any output value of f1 and f2 as being meaningless. Even if the problem had been solved, they might not contain correct values, as discussed in Why the value of expression is not equal to the assignment? .