Future work on ABRT (ABRT v2?)
* Minimizing resource usage when idle. - stop running abrtd daemon continuously. - spawn ccpp hooks only when crash occurs. - handle python crashes only when they occur. - kernel oopses are detected by a small dedicated daemon or even by a cron job. - after crash data is dumped, a hook spawns abrtd "not-exactly-daemon-now" for further processing of the crash: more info collected, dbus signal emitted, etc. - python hook can perform dbus call asking abrtd to *create* the crash dump on its behalf, avoiding selinux problems. This still doesn't need abrtd to run continuously, dbus autostart helps here. - abrtd, started by any of these methods, shound time out and exit on timeout.
* Convert plugins to children. - plugins communicate back to parent abrtd via messages over stdout and by exit code. - can run plugins under non-root. - any resource leaks in plugins don't have long-lasting effects: as soon as they exit, everything is freed. - can easily run concurrent plugins without more difficult multithreaded coding. - crashes in plugins do not take abrtd down. - abrtd no longer needs to link against a lot of libraries. - plugins do not need to link against dbus libraries. - avoid problems with library initialization. - plugin executables may find new uses on their own (557943 RFE: Manually report a bz through abrt).
* Request files and other user data from non-root helper. - biggest problem is ccpp crash: hook is started by root, there is no way to access ~/files if they are e.g. on NFS4 volume or denied by selinux. - may want to collect non-file based info ($DISPLAY value etc). - abrtd needs to have a new dbus signal "hey, I have a crash, does anyone have any additional data for me?". - perhaps abrtd should try to collect this info itself, and ask for help only if it didn't work (how to avoid tripping over selinux?). - GUI applet or an "agent" daemon running under user UID (think about servers) can listen for such dbus signals and respond with dbus calls "hey abrtd, I have this additional data for that crash". - find out whether this "agent" can utilize dbus autostart.
* Make it possible to run abrtd under user, not root. - GUI applet may chose to not talk to system abrtd, but instead start an abrtd under current user and talk to it. - this is safer wrt security. - perhaps some functions will still need to be done by system abrtd (e.g. debuginfo download and caching).
* Gradually migrate code to C.
* Gradually migrate to common style: if (function(param, param)) { /* braces are preferred but optional for one-statement if */ body; } if (err) return; /* one-line ifs discouraged */
* Reorganize source tree into: doc examples src includes (a few files only, or even only one file abrt.h) lib (foo.c + foo.h) cli gui daemon plugins hooks
Near term
* Delete *Socket*.* and Firefox.* files.
* Save "ls -lR /proc/$PID" listing in the crash.
Seems that it contains everything we discussed, although I still think we should change the plugin API, so we can build "smarter" UI(s). But for now I'd like to add just some notes about python coding style in case someone will hack the gui:
- classes: CamelCase - methods/function: small case, underscores - indent: 4 spaces - variables: small case, underscores - 1 line to separate function/methods - separate logical blocks (even inside the functions) by 1 line
- there is a paper about the python coding style: http://www.python.org/dev/peps/pep-0008/ but it's quite long, so the above should be enough for now and I'll be gradually convert the style in .py sources
J.
On 03/23/2010 05:55 PM, Denys Vlasenko wrote:
Future work on ABRT (ABRT v2?)
Minimizing resource usage when idle.
- stop running abrtd daemon continuously.
- spawn ccpp hooks only when crash occurs.
- handle python crashes only when they occur.
- kernel oopses are detected by a small dedicated daemon or even by a cron job.
- after crash data is dumped, a hook spawns abrtd "not-exactly-daemon-now" for further processing of the crash: more info collected, dbus signal emitted, etc.
- python hook can perform dbus call asking abrtd to *create* the crash dump on its behalf, avoiding selinux problems. This still doesn't need abrtd to run continuously, dbus autostart helps here.
- abrtd, started by any of these methods, shound time out and exit on timeout.
Convert plugins to children.
- plugins communicate back to parent abrtd via messages over stdout and by exit code.
- can run plugins under non-root.
- any resource leaks in plugins don't have long-lasting effects: as soon as they exit, everything is freed.
- can easily run concurrent plugins without more difficult multithreaded coding.
- crashes in plugins do not take abrtd down.
- abrtd no longer needs to link against a lot of libraries.
- plugins do not need to link against dbus libraries.
- avoid problems with library initialization.
- plugin executables may find new uses on their own (557943 RFE: Manually report a bz through abrt).
Request files and other user data from non-root helper.
- biggest problem is ccpp crash: hook is started by root, there is no way to access ~/files if they are e.g. on NFS4 volume or denied by selinux.
- may want to collect non-file based info ($DISPLAY value etc).
- abrtd needs to have a new dbus signal "hey, I have a crash, does anyone have any additional data for me?".
- perhaps abrtd should try to collect this info itself, and ask for help only if it didn't work (how to avoid tripping over selinux?).
- GUI applet or an "agent" daemon running under user UID (think about servers) can listen for such dbus signals and respond with dbus calls "hey abrtd, I have this additional data for that crash".
- find out whether this "agent" can utilize dbus autostart.
Make it possible to run abrtd under user, not root.
- GUI applet may chose to not talk to system abrtd, but instead start an abrtd under current user and talk to it.
- this is safer wrt security.
- perhaps some functions will still need to be done by system abrtd (e.g. debuginfo download and caching).
Gradually migrate code to C.
Gradually migrate to common style: if (function(param, param)) { /* braces are preferred but optional for one-statement if */ body; } if (err) return; /* one-line ifs discouraged */
Reorganize source tree into: doc examples src includes (a few files only, or even only one file abrt.h) lib (foo.c + foo.h) cli gui daemon plugins hooks
Near term
Delete *Socket*.* and Firefox.* files.
Save "ls -lR /proc/$PID" listing in the crash.
crash-catcher@lists.fedorahosted.org