I am using the new connection pooling in my module for accounting/authentication against couchbase ( https://github.com/leprechau/rlm_couchbase ). This was working very well until I rebuilt recently (yesterday) against the latest release_branch_3.0.0 branch. I am now seeing the below errors in the logs that cause radiusd to crash. Wed Aug 28 15:39:30 2013 : Info: rlm_couchbase (couchbase): Closing connection (16): Too many free connections (23 > 20) Wed Aug 28 15:39:31 2013 : Info: rlm_couchbase (couchbase): Closing connection (35): Too many free connections (22 > 20) Wed Aug 28 15:39:32 2013 : Info: rlm_couchbase (couchbase): Closing connection (39): Too many free connections (21 > 20) Wed Aug 28 15:39:37 2013 : Info: rlm_couchbase (couchbase): Opening additional connection (53) Wed Aug 28 15:39:40 2013 : Info: rlm_couchbase (couchbase): Opening additional connection (54) Wed Aug 28 15:39:46 2013 : Info: talloc: access after free error - first free may be at src/lib/valuepair.c:146 Wed Aug 28 15:39:46 2013 : Info: Bad talloc magic value - access after free I cannot reproduce it with -X or -xx but can see it plainly when started normally. I also cannot seem to reproduce it if I set the pool start/min/max/spare all to 1 in my module configuration. Has there been a change in the connection pool API that would require a change in my code using this API? -- Aaron
On Aug 28, 2013, at 3:40 PM, Aaron Hurt <ahurt@ena.com> wrote:
I am using the new connection pooling in my module for accounting/authentication against couchbase ( https://github.com/leprechau/rlm_couchbase ). This was working very well until I rebuilt recently (yesterday) against the latest release_branch_3.0.0 branch. I am now seeing the below errors in the logs that cause radiusd to crash.
Wed Aug 28 15:39:30 2013 : Info: rlm_couchbase (couchbase): Closing connection (16): Too many free connections (23 > 20) Wed Aug 28 15:39:31 2013 : Info: rlm_couchbase (couchbase): Closing connection (35): Too many free connections (22 > 20) Wed Aug 28 15:39:32 2013 : Info: rlm_couchbase (couchbase): Closing connection (39): Too many free connections (21 > 20) Wed Aug 28 15:39:37 2013 : Info: rlm_couchbase (couchbase): Opening additional connection (53) Wed Aug 28 15:39:40 2013 : Info: rlm_couchbase (couchbase): Opening additional connection (54) Wed Aug 28 15:39:46 2013 : Info: talloc: access after free error - first free may be at src/lib/valuepair.c:146 Wed Aug 28 15:39:46 2013 : Info: Bad talloc magic value - access after free
I cannot reproduce it with -X or -xx but can see it plainly when started normally. I also cannot seem to reproduce it if I set the pool start/min/max/spare all to 1 in my module configuration. Has there been a change in the connection pool API that would require a change in my code using this API?
-- Aaron - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
I have also seen this: Info: talloc: access after free error - first free may be at src/main/util.c:230 -- Aaron
Aaron Hurt wrote:
I am using the new connection pooling in my module for accounting/authentication against couchbase ( https://github.com/leprechau/rlm_couchbase ). This was working very well until I rebuilt recently (yesterday) against the latest release_branch_3.0.0 branch. I am now seeing the below errors in the logs that cause radiusd to crash.
Please run it under "valgrind": $ valgrind --tools=memcheck radiusd -f
I cannot reproduce it with -X or -xx but can see it plainly when started normally. I also cannot seem to reproduce it if I set the pool start/min/max/spare all to 1 in my module configuration. Has there been a change in the connection pool API that would require a change in my code using this API?
No. The connection pool code hasn't changed in a long time. The assertion is caused by a free of a VALUE_PAIR, which is then used by later code. Valgrind should tell you what's going on. Alan DeKok.
On Aug 29, 2013, at 8:29 AM, Alan DeKok <aland@deployingradius.com> wrote:
Aaron Hurt wrote:
I am using the new connection pooling in my module for accounting/authentication against couchbase ( https://github.com/leprechau/rlm_couchbase ). This was working very well until I rebuilt recently (yesterday) against the latest release_branch_3.0.0 branch. I am now seeing the below errors in the logs that cause radiusd to crash.
Please run it under "valgrind":
$ valgrind --tools=memcheck radiusd -f
I cannot reproduce it with -X or -xx but can see it plainly when started normally. I also cannot seem to reproduce it if I set the pool start/min/max/spare all to 1 in my module configuration. Has there been a change in the connection pool API that would require a change in my code using this API?
No. The connection pool code hasn't changed in a long time.
The assertion is caused by a free of a VALUE_PAIR, which is then used by later code. Valgrind should tell you what's going on.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
Thank you, I found the error and it was totally my fault. I was using talloc against the instance context instead of request inside my preacct handler before passing that to pairmake. Valgrind indeed helped me find it. -- Aaron
participants (2)
-
Aaron Hurt -
Alan DeKok