View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003127 | GNUnet | obsolete | public | 2013-11-25 08:07 | 2024-05-03 13:49 |
| Reporter | LRN | Assigned To | oehlmann | ||
| Priority | high | Severity | crash | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | Git master | ||||
| Target Version | 0.10.0 | Fixed in Version | 0.10.0 | ||
| Summary | 0003127: Crash in test_ats_solver_request_and_add_address_ril | ||||
| Description | subj | ||||
| Steps To Reproduce | Run test_ats_solver_request_and_add_address_ril on W32 | ||||
| Additional Information |
Reading symbols from d:\progs\gnunet\lib\gnunet\libexec\gnunet-service-ats.exe...done.
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 16752.0x4070]
0x7586321a in KERNELBASE!DebugBreak () from C:\Windows\syswow64\KernelBase.dll
(gdb) t
[Current thread is 1 (Thread 16752.0x4070)]
(gdb) bt
#0 0x7586321a in KERNELBASE!DebugBreak () from C:\Windows\syswow64\KernelBase.dll
#1 0x62b4742a in GNUNET_abort () at common_logging.c:287
#2 0x0390161f in agent_estimate_q (agent=0xda3f10, state=0xda43c8, action=0) at libgnunet_plugin_ats_ril.c:377
#3 0x03901756 in agent_get_action_best (agent=0xda3f10, state=0xda43c8) at libgnunet_plugin_ats_ril.c:475
#4 0x03903619 in agent_step (agent=0xda3f10) at libgnunet_plugin_ats_ril.c:1214
#5 0x039041ed in ril_step (solver=0xda1ff0) at libgnunet_plugin_ats_ril.c:1449
#6 0x0390729c in GAS_ril_bulk_stop (solver=0xda1ff0) at libgnunet_plugin_ats_ril.c:2218
#7 0x00402697 in GAS_addresses_add (handle=0xcafd18, peer=0xd9cd08, plugin_name=0xd9cd45 "test", plugin_addr=0xd9cd40, plugin_addr_len=5, session_id=0, atsi=0xd9cd30, atsi_count=2)
at gnunet-service-ats_addresses.c:785
#8 0x0040f263 in GAS_handle_address_add (cls=0x0, client=0xda3e90, message=0xd9cd00) at gnunet-service-ats_scheduling.c:279
#9 0x62b83510 in GNUNET_SERVER_inject (server=0xd98bd8, sender=0xda3e90, message=0xd9cd00) at server.c:985
#10 0x62b841a8 in client_message_tokenizer_callback (cls=0xd98bd8, client=0xda3e90, message=0xd9cd00) at server.c:1205
#11 0x62b86402 in GNUNET_SERVER_mst_receive (mst=0xda2cd8, client_identity=0xda3e90, buf=0x27fbd6 "", size=0, purge=0, one_shot=-1) at server_mst.c:220
#12 0x62b83da4 in process_incoming (cls=0xda3e90, buf=0x27fb8c, available=74, addr=0xd9e2e8, addrlen=28, errCode=0) at server.c:1136
#13 0x62b50474 in receive_ready (cls=0xda3e00, tc=0x28fc00) at connection.c:1062
#14 0x62b7f729 in run_ready (rs=0xd9e9b8, ws=0xd9f9d0) at scheduler.c:593
#15 0x62b7ffa5 in GNUNET_SCHEDULER_run (task=0x62b8bc6c <service_task>, task_cls=0x28fda8) at scheduler.c:808
#16 0x62b8cb3b in GNUNET_SERVICE_run (argc=3, argv=0xd89560, service_name=0x413099 <_Jv_RegisterClasses+4272281> "ats", options=GNUNET_SERVICE_OPTION_NONE, task=0x4017ec <run>, task_cls=0x0) at service.c:1478
#17 0x004018e9 in main (argc=3, argv=0xd89560) at gnunet-service-ats.c:194
(gdb) up
#1 0x62b4742a in GNUNET_abort () at common_logging.c:287
287 DebugBreak ();
(gdb)
#2 0x0390161f in agent_estimate_q (agent=0xda3f10, state=0xda43c8, action=0) at libgnunet_plugin_ats_ril.c:377
377 GNUNET_assert(!isnan(result));
(gdb) p result
$1 = -nan(0x8000000000000)
(gdb) l
372 for (i = 0; i < agent->m; i++)
373 {
374 result += state[i] * agent->W[action][i];
375 }
376
377 GNUNET_assert(!isnan(result));
378
379 if (isinf(result))
380 {
381 return isinf(result) * (DBL_MAX / 2); //is still big enough
(gdb) p agent
$2 = (struct RIL_Peer_Agent *) 0xda3f10
(gdb) p *agent
$3 = {next = 0x0, prev = 0x0, envi = 0xda1ff0, peer = {public_key = {q_y = '1' <repeats 32 times>}}, is_active = 1, step_count = 1, W = 0xda2d18, m = 44, n = 6, s_old = 0xda4698, a_old = 0, e = 0xda4530,
address_inuse = 0xda4850, addresses_head = 0xda2880, addresses_tail = 0xda2880, bw_in = 1024, bw_out = 1024, suggestion_issue = 0, suggestion_address = 0xda4850}
(gdb) p state[0]
$4 = 0
(gdb) p state@44
$5 = {0xda43c8, 0x0, 0x39018d9 <agent_update_weights+134>, 0xda3f10, 0xda4698, 0x27f7d8, 0x390166e <agent_decide_exploration+26>, 0x0, 0xffffffff, 0x193c15fc, 0x0, 0xffffffff, 0xffefffff, 0xffffffff, 0x0,
0x0, 0xd9cd30, 0x27f848, 0x3903619 <agent_step+541>, 0xda3f10, 0xda43c8, 0x3fd8f392, 0xda43c8, 0x0, 0x0, 0x20000, 0x0, 0x0, 0x41000000, 0x5292f0ab, 0x9021314, 0x5, 0x0, 0xb0712060, 0x3fd8f392, 0x20000,
0xda43c8, 0x498, 0x0, 0x0, 0x0, 0x0, 0xd9cd30, 0xd9cd08}
(gdb) p state[0]@44
$6 = {0, 65536, 0, 0, 65536, 0, 0, 4294967295, 0, 0, 4294967295, 0, 0, 4294967295, 0, 0, 4294967295, 0, 1024, 65536, 0, 1024, 65536, 0, 0, 512, 0, 0, 512, 0, 0, 131072, 0, 0, 131072, 0, 1, 1, 1, 1, 1024,
1024, 1, 2}
(gdb) p agent->W
$7 = (double **) 0xda2d18
(gdb) p action
$8 = 0
(gdb) p agent->W[0][0]@44
$9 = {-nan(0x8000000000000) <repeats 44 times>}
| ||||
| Tags | No tags attached. | ||||
|
|
I've added some assertions. Here's what gdb says:(gdb) l 1435 //calculate reward discounts (once per step for all agents) 1436 solver->global_discount_variable = pow (M_E, ((-1.) * ((double) solver->parameters.beta) * tau)); 1437 GNUNET_assert (!isnan (solver->global_discount_variable)); 1438 solver->global_discount_integrated = (1 - solver->global_discount_variable) 1439 / ((double) solver->parameters.beta); 1440 GNUNET_assert (!isnan (solver->global_discount_integrated)); 1441 1442 //calculate network state vector 1443 envi_state_networks(solver); 1444 (gdb) p solver->global_discount_variable $1 = 1 (gdb) p solver->parameters.beta $2 = 0 That is, (1 - 1) = 0, and solver->parameters.beta is also 0, so 0 / 0 gives us nan (1 / 0 would be inf instead). Can't dig any deeper, since i don't understand the meaning of these parameters, and whether they should/shouldn't be 1 or 0 or whatever. |
|
|
Thank you for the detailed investigation. Beta has to be a positive number. (in case of interest, it's used as here: http://webdocs.cs.ualberta.ca/~sutton/book/ebook/node111.html) I introduced a validity check for the configuration parameters. If they're not in a legal range a default value is set now. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-11-25 08:07 | LRN | New Issue | |
| 2013-11-25 08:07 | LRN | Status | new => assigned |
| 2013-11-25 08:07 | LRN | Assigned To | => Matthias Wachs |
| 2013-11-25 08:12 | Matthias Wachs | Assigned To | Matthias Wachs => oehlmann |
| 2013-11-27 06:36 | LRN | Note Added: 0007725 | |
| 2013-11-29 12:45 | Christian Grothoff | Priority | normal => high |
| 2013-11-29 12:45 | Christian Grothoff | Severity | minor => crash |
| 2013-11-29 12:45 | Christian Grothoff | Product Version | => Git master |
| 2013-11-29 12:45 | Christian Grothoff | Target Version | => 0.10.0 |
| 2013-12-16 15:06 | oehlmann | Note Added: 0007891 | |
| 2013-12-16 15:08 | oehlmann | Status | assigned => resolved |
| 2013-12-16 15:08 | oehlmann | Fixed in Version | => Git master |
| 2013-12-16 15:08 | oehlmann | Resolution | open => fixed |
| 2013-12-16 20:22 | Christian Grothoff | Fixed in Version | Git master => 0.10.0 |
| 2013-12-24 20:53 | Christian Grothoff | Status | resolved => closed |
| 2024-05-03 13:49 | Christian Grothoff | Category | ATS service => obsolete |