Bus Error when loading SQL clients
rlm_sql (sql_clients): Attempting to connect rlm_sql_mysql #19 rlm_sql_mysql: Starting connect to MySQL server for #19 rlm_sql (sql_clients): Connected new DB handle, #19 rlm_sql (sql_clients): Processing generate_sql_clients rlm_sql (sql_clients) in generate_sql_clients: query is SELECT master.netreg_id, CONCAT(ip1,'.',ip2,'.',ip3,'.',ip4),master.name, master.nas_type,master.nas_secret FROM master WHERE master.nas_secret != '' rlm_sql (sql_clients): Reserving sql socket id: 19 rlm_sql (sql_clients): Read entry nasname=139.184.9.43,shortname=hp-e-artc-3-sw1,secret=zzz rlm_sql (sql_clients): Adding client 139.184.9.43 (hp-e-artc-3-sw1) to clients list rlm_sql (sql_clients): Read entry nasname=139.184.8.160,shortname=hp-e-russ-1-sw3,secret=xxx rlm_sql (sql_clients): Adding client 139.184.8.160 (hp-e-russ-1-sw3) to clients list Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000080 0x00003584 in client_add (clients=0x0, client=0x3cdb80) at client.c:215 215 if (!clients->trees[client->prefix]) { GDB Backtrace shows #0 0x00003584 in client_add (clients=0x0, client=0x3cdb80) at client.c:215 #1 0x00206d5c in rlm_sql_instantiate (conf=0x27090, instance=0x3cad74) at rlm_sql.c:337 #2 0x0000b3f8 in find_module_instance (modules=0x1, instname=0x311e40 "sql_clients") at modules.c:302 #3 0x0000beb8 in setup_modules (reload=1, config=0x300b50) at modules.c:807 #4 0x0000ae24 in read_mainconfig (reload=0) at mainconfig.c:917 #5 0x0000e7c4 in main (argc=4, argv=0xbffffa48) at radiusd.c:287 This has broken since cvs build date 21/09/07 and is broken in cvs build 12/10/07 Thanks, Arran
Alan DeKok wrote:
Arran Cudbard-Bell wrote:
215 if (!clients->trees[client->prefix]) {
And what are the contents of client->prefix, and clients->trees[client->prefix] ? Or is "clients" still NULL?
Also try a "cvs update". I think I found a logic bug.
rlm_sql (sql_clients): Adding client 139.184.9.43 (hp-e-artc-3-sw1) to clients list ASSERT FAILED client.c[201]: root_clients == NULL Program received signal SIGABRT, Aborted. 0x900482ec in kill () (gdb) bt #0 0x900482ec in kill () #1 0x9012e7d4 in abort () #2 0x000108c8 in rad_assert_fail (file=0x0, line=2155905152, expr=0x2 <Address 0x2 out of bounds>) at util.c:339 #3 0x000033e4 in client_add (clients=0x23390, client=0x3cdad0) at client.c:201 #4 0x00206d5c in rlm_sql_instantiate (conf=0x27090, instance=0x3cad74) at rlm_sql.c:337 #5 0x0000b2c8 in find_module_instance (modules=0x0, instname=0x311e40 "sql_clients") at modules.c:302 #6 0x0000bd88 in setup_modules (reload=0, config=0x300b50) at modules.c:807 #7 0x0000acf4 in read_mainconfig (reload=0) at mainconfig.c:917 #8 0x0000e7a4 in main (argc=4, argv=0xbffffa48) at radiusd.c:287 (gdb) print client->prefix $2 = 32 (gdb) print clients->trees[client->prefix] $3 = (struct rbtree_t *) 0x70726f78 (gdb) $4 = (struct rbtree_t *) 0x70726f78
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
Alan DeKok wrote:
Arran Cudbard-Bell wrote:
rlm_sql (sql_clients): Adding client 139.184.9.43 (hp-e-artc-3-sw1) to clients list ASSERT FAILED client.c[201]: root_clients == NULL
The assert is wrong. Delete it. (committed in CVS, too)
Yep, works now . Thanks . Hmm, and on to the next issue... /etc/raddb/unlang/preprocess.conf[97]: ERROR: Unknown value hard-ban for attribute Autz-Type /etc/raddb/unlang/preprocess.conf[96]: Failed to parse "update" subsection. Ah you added proper checking. ok so Autz-Types Values now need to be added. .. and the next one ... Ignoring request to accounting address 139.184.14.180 port 1813 as server default-outer from unknown client 139.184.9.131 port 1031 Ready to process requests. Ignoring request to authentication address 139.184.14.180 port 1812 as server default-outer from unknown client 139.184.6.134 port 1024 Ready to process requests. Ignoring request to accounting address 139.184.14.180 port 1813 as server default-outer from unknown client 139.184.9.230 port 1025 Ready to process requests. Ignoring request to accounting address 139.184.14.180 port 1813 as server default-outer from unknown client 139.184.9.215 port 1026 Ready to process requests. Ignoring request to authentication address 139.184.14.180 port 1812 as server default-outer from unknown client 139.184.6.134 port 1024 Ready to process requests. Ignoring request to accounting address 139.184.14.180 port 1813 as server default-outer from unknown client 139.184.8.243 port 1025 Ready to process requests. Ignoring request to accounting address 139.184.14.180 port 1813 as server default-outer from unknown client 139.184.9.230 port 1025 Ready to process requests. Ignoring request to accounting address 139.184.14.180 port 1813 as server default-outer from unknown client 139.184.9.215 port 1026 Ready to process requests. Ignoring request to authentication address 139.184.14.180 port 1812 as server default-outer from unknown client 139.184.6.134 port 1024 Seems like clients are not being added in the global context /at all. --- I also get a strange error message about needing to use virtual-servers .... WARNING: Please update your configuration to use virtual servers! server { modules { } WARNING: Server (null) is empty, and will do nothing! } radiusd: #### Opening IP addresses and Ports #### listen { type = "auth" ipaddr = radius1.sussex.ac.uk IP address [139.184.14.180] port = 1812 client radius1.sussex.ac.uk { secret = "xxx" shortname = "wolverine" nastype = "other" } client radius2.sussex.ac.uk { secret = "xxx" shortname = "cyclops" nastype = "other" } client roaming0.ja.net { secret = "xxx" shortname = "janet_roaming0" nastype = "other" } client roaming1.ja.net { secret = "xxx" shortname = "janet_roaming1" nastype = "other" } client roaming2.ja.net { secret = "xxx" shortname = "janet_roaming2" nastype = "other" } client 127.0.0.1 { secret = "test_key" shortname = "localhost" nastype = "other" } } listen { type = "acct" ipaddr = radius1.sussex.ac.uk IP address [139.184.14.180] port = 1813 } All clients are being added by a instance of rlm_sql called 'sql_clients' which is listed in the instantiate section of radiusd.conf There is one virtual-server listening called default-outer defined as server default-outer { listen { ipaddr = radius1.sussex.ac.uk # ipv6addr = :: # any. ::1 == localhost port = 1812 type = auth # interface = eth0 # clients = per_socket_clients } # This second "listen" section is for listening on the accounting # port, too. # listen { ipaddr = radius1.sussex.ac.uk # ipv6addr = :: port = 1813 type = acct # interface = eth0 # clients = per_socket_clients } And one called default-inner , which doesn't listen, and only has requests proxied to it. There are no other server stanzas anywhere. Thanks, Arran
Alan Dekok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
Arran Cudbard-Bell wrote:
Hmm, and on to the next issue...
/etc/raddb/unlang/preprocess.conf[97]: ERROR: Unknown value hard-ban for attribute Autz-Type /etc/raddb/unlang/preprocess.conf[96]: Failed to parse "update" subsection.
Ah you added proper checking. ok so Autz-Types Values now need to be added.
No... it's that it was trying to load the config in one pass. Everyone knows that compilers need two passes to resolve all of the symbols... so I've added a second pass.
.. and the next one ...
Ignoring request to accounting address 139.184.14.180 port 1813 as server default-outer from unknown client 139.184.9.131 port 1031
That one I'm unsure about. I don't understand why it's happening... UNLESS the clients are getting added by the SQL code, and then nuked when the "read clients from files" code is executed.
I also get a strange error message about needing to use virtual-servers
Nuked. Alan DeKok.
participants (2)
-
Alan DeKok -
Arran Cudbard-Bell