Graham Leggett wrote: > As soon as I read this the first thing that leaped to mind was > "pool lifetimes".
Thank you very much for your detailled reply. I thought I was aware of pool lifetimes before encountering this issue. What really surprised me was that if I put e.g. a heap bucket (as apr_brigade_split_line does) from one brigade into another, this couples these brigades in terms of pools and thread safety. In my opinion this creates a very dangerous situation in very harmlessly looking code and is really hard to debug if you don't know that you're up to. As I had race conditions instead of crashes, the APR_BUCKET_DEBUG and APR_RING_DEBUG macros could just bounce me a little bit into the right direction (by crashing sometimes instead of weird things happening). But as I was not aware of the problem, the stack traces left me clueless. I understand it now, but I think it would help people who are new to bucket brigades very much, if this behaviour would be clearly pointed out (personally preferred in code/doxygen doc). I could also think of special debug code to test such cases, but would imagine that this is really difficult to implement. By the way, I don't want to bother you with the full details of my problem unsolicited. If you're interested, just let me know. Regards, Edgar
