|
|
| Author |
Message |
|
| anderst |
Posted: Tue Nov 21, 2006 2:49 pm |
|
|
|
User
Joined: 21 Nov 2006
Posts: 37
|
I wonder if anyone has ever come across a bug in the OTP behaviour modules.. e.g. gen_server, gen_fsm, gen_event and others? The throught came about, as they must be the best tested and most used modules around.
If you did find any, how did you come across them?
BR,
Anders |
|
|
| Back to top |
|
| Mazen |
Posted: Wed Nov 22, 2006 1:47 pm |
|
|
|
User
Joined: 20 Jul 2006
Posts: 164
Location: London
|
anderst wrote: The throught came about, as they must be the best tested and most used modules around.
yup... The best way to make sure something is working is to test it, and something as fundamental as the behaviours are probably really good tested... The best way to break it would probably to look into the code and find something it can't handle  |
|
|
| Back to top |
|
| uwiger |
Posted: Fri Nov 24, 2006 7:44 am |
|
|
|
User
Joined: 03 Jul 2006
Posts: 604
Location: Sweden
|
anderst wrote: I wonder if anyone has ever come across a bug in the OTP behaviour modules.. e.g. gen_server, gen_fsm, gen_event and others?
Well, we have (of course - we beta-tested the very first OTP version), but it's a pretty rare occasion nowadays.
I'm racking my brain to recall a behaviour bug, but the one thing that comes to mind is that supervisors could hang for ever during shutdown, if the child process had unlinked itself from its parent, or if it had been started e.g. with gen_server:start() instead of start_link(). While one might argue that this would be a bug in user code, and not in the behaviour per se, we thought that the supervisor should be safe enough that it couldn't be subverted that easily - that, and the consequence of such a minor bug could in fact deadlock the entire system.
At the time, this wasn't easy to fix, since we didn't have monitors. Nowadays, the supervisor uses both links and monitors (or both belt and suspenders, as the Swedish saying goes).
BTW, didn't Fredrik Linder just report a bug in gen.erl the other day? The addition of a 'monitor' option in spawn_opt() apparently wasn't fully covered in gen:start() (or wouldn't that have been in proc_lib?)
BR,
Ulf W |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|