Closed misterdjules closed 10 years ago
There seems to be a bug with coreadm's handling of core files paths patterns. In other words, setting incorrect core files paths patterns with coreadm causes it to stop working. Even a reboot doesn't put it back in a sane state. It also seems that relative paths are considered incorrect by coreadm.
I don't know if and when it'll be fixed though, so I introduced a change that lowers the chance of having students set relative path for core files patterns.
It certainly doesn't fix the issue, but I couldn't think of anything else for now.
The best I can come up with right now is to sniff that the path passed to coreadm is absolute. Maybe setting a coreadm
shell alias in the shell that runs the submission script would allow us to monkey-patch coreadm and exit early if the path is relative? Otherwise, we'd probably need to do some pattern matching in the code that check the submission script.
It's definitely a bug in coreadm. However, if you have the ability to intercept and test whether the path is absolute, you also have the ability to correct it and make it absolute yourself. The readlink(1) utility's -f option does exactly this -- and as a bonus, it also handles symlinks for you.
@wesolows Thank you for suggesting to use readlink, definitely better than to exit early!
Just for the record, when coreadm
goes into maintenance mode is cannot be used anymore, this puts it back in a usable state:
$ svccfg -s system/coreadm:default setprop config_params/global_pattern='/some/absolute/path'
$ svcadm refresh coreadm
$ svcadm clear coreadm
When the following solution script of the "GENERATE CORE WHEN APP CRASHES" exercise is executed:
the following error message appears:
It seems that from that point on, coreadm cannot be used anymore, and always gives the same error message. Rebooting the instance doesn't make coreadm work.