[PATCH 1/1] cr: add a few more ckpt_write_err()s

Serge E. Hallyn serue at us.ibm.com
Fri Sep 11 14:27:42 PDT 2009


Quoting Oren Laadan (orenl at librato.com):
> 
> I wonder if it can be useful to decide on a common "format", that
> can be useful in the future for automatic error analysis. E.g:
> 
> "[PID %d ERR %d]: .....", for error with a specific task, and
> "[PID %d ERR %d OBJ %d]: ......" for error with an object, and so on.
> 
> Or even a bit more fancy, like:
> 
> 	ckpt_write_err("EO", "error message %p blah", err, obj, ptr);
> 			SPEC   FMT		      VARS...
> 
> Which ckpt_write_err() will translate to
> 
> 	sprintf(s, "[PID %d ERR %d] FMT", VARS...);
> 
> So the SPEC "EO" (stands for ERR, OBJ) becomes "[PID %d ERR %d OBJ %d]: "
> (pid is mandatory, the rest requested by the caller):
> 	E -> ERR %d
> 	O -> OBJ %d
> 	P -> PTR %p
> 	S -> SYM %pS
> 	etc...

Yes, it'd be useful.  BTW it also would be useful to have mktree/
restart auto-detect such error strings and report them.

-serge


More information about the Containers mailing list