Bug#670578: More information needed

2012-05-01 Thread Christian Grothoff
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I get this:

# gdb --args gnunet-service-mesh -c test_gnunet_vpn.conf
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as sparc-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /tmp/gnbuild/bin/gnunet-service-mesh...done.
(gdb) r
Starting program: /tmp/gnbuild/bin/gnunet-service-mesh -c
test_gnunet_vpn.conf

Program received signal SIGBUS, Bus error.
0xf7f28b24 in idx_of (m=0x34a98, key=0xfffed46a) at
container_multihashmap.c:136
136   return (*(unsigned int *) key) % m-map_length;
(gdb) ba
#0  0xf7f28b24 in idx_of (m=0x34a98, key=0xfffed46a) at
container_multihashmap.c:136
#1  0xf7f29460 in GNUNET_CONTAINER_multihashmap_put (map=0x34a98,
key=0xfffed46a, value=0x33638,
opt=GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE) at
container_multihashmap.c:425
#2  0x0002278c in handle_local_new_client (cls=0x0, client=0x34bc8,
message=0xfffed7c0) at gnunet-service-mesh.c:3871
#3  0xf7f62c14 in GNUNET_SERVER_inject (server=0x33078, sender=0x34bc8,
message=0xfffed7c0) at server.c:866
#4  0xf7f63f1c in client_message_tokenizer_callback (cls=0x33078,
client=0x34bc8, message=0xfffed7c0) at server.c:1071
#5  0xf7f67048 in GNUNET_SERVER_mst_receive (mst=0x34c40,
client_identity=0x34bc8, buf=0xfffed7c0 , size=14, purge=0,
one_shot=-1) at server_mst.c:264
#6  0xf7f63a90 in process_incoming (cls=0x34bc8, buf=0xfffed7c0,
available=14, addr=0x33ee0, addrlen=2, errCode=0) at server.c:1015
#7  0xf7f1e360 in receive_ready (cls=0x34b38, tc=0xd860) at
connection.c:1054
#8  0xf7f5c3c8 in run_ready (rs=0x32b68, ws=0x32bf0) at scheduler.c:602
#9  0xf7f5d1c4 in GNUNET_SCHEDULER_run (task=0xf7f7111c service_task,
task_cls=0xda80) at scheduler.c:790
#10 0xf7f73c60 in GNUNET_SERVICE_run (argc=3, argv=0xdc94,
service_name=0x2ea60 mesh, options=GNUNET_SERVICE_OPTION_NONE,
task=0x281ac run, task_cls=0x0) at service.c:1766
#11 0x00028ba4 in main (argc=3, argv=0xdc94) at
gnunet-service-mesh.c:4870

#0  0xf7f28b24 in idx_of (m=0x34a98, key=0xfffed46a) at
container_multihashmap.c:136


31 static unsigned int
32 idx_of (const struct GNUNET_CONTAINER_MultiHashMap *m,
33 const GNUNET_HashCode * key)
34 {
35   GNUNET_assert (m != NULL);
36   return (*(unsigned int *) key) % m-map_length;
37 }
38

(gdb) print (long) (key)
$1 = -76694
(gdb) print ((long)key) % 4
$2 = -2

Ok, so clearly the bus error is justified.  Now, where does key come from?

(gdb) up
#1  0xf7f29460 in GNUNET_CONTAINER_multihashmap_put (map=0x34a98,
key=0xfffed46a, value=0x33638,
opt=GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE) at
container_multihashmap.c:425
#2  0x0002278c in handle_local_new_client (cls=0x0, client=0x34bc8,
message=0xfffed7c0) at gnunet-service-mesh.c:3871


3800  static void
  3801  handle_local_new_client (void *cls, struct GNUNET_SERVER_Client
*client,
  3802   const struct GNUNET_MessageHeader *message)
  3803  {
  3804struct GNUNET_MESH_ClientConnect *cc_msg;
  3805struct MeshClient *c;
  3806GNUNET_MESH_ApplicationType *a;
  3807unsigned int size;
  3808uint16_t ntypes;
  3809uint16_t *t;
  3810uint16_t napps;
  3811uint16_t i;
  3812
  3813GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, new client connected\n);
  3814/* Check data sanity */
  3815size = ntohs (message-size) - sizeof (struct
GNUNET_MESH_ClientConnect);
  3816cc_msg = (struct GNUNET_MESH_ClientConnect *) message;
  3817ntypes = ntohs (cc_msg-types);
  3818napps = ntohs (cc_msg-applications);
  3819if (size !=
  3820ntypes * sizeof (uint16_t) + napps * sizeof
(GNUNET_MESH_ApplicationType))
  3821{
  3822  GNUNET_break (0);
  3823  GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
  3824  return;
  3825}
  3826
  3827/* Create new client structure */
  3828c = GNUNET_malloc (sizeof (struct MeshClient));
  3829c-id = next_client_id++;
  3830GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,   CLIENT NEW %u\n, c-id);
  3831c-handle = client;
  3832GNUNET_SERVER_client_keep (client);
  3833a = (GNUNET_MESH_ApplicationType *) cc_msg[1];
  3834if (napps  0)
  3835{
  3836  GNUNET_MESH_ApplicationType at;
  3837  GNUNET_HashCode hc;
  3838
  3839  c-apps = GNUNET_CONTAINER_multihashmap_create (napps);
  3840  for (i = 0; i  napps; i++)
  3841  {
  3842at = ntohl (a[i]);
  3843GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,   app type: %u\n, at);
  3844GNUNET_CRYPTO_hash (at, sizeof (at), hc);
  3845/* store in clients hashmap */
  3846GNUNET_CONTAINER_multihashmap_put 

Bug#670578: More information needed

2012-04-28 Thread Jurij Smakov
Hello,

Is there an upstream bug for that? If there is, can you please provide 
a reference?

Can you post a stack trace, preferrably obtained with the latest 
Debian binaries (gnunet version 0.8.1b-8), if possible?

Thanks.
-- 
Jurij Smakov   ju...@wooyd.org
Key: http://www.wooyd.org/pgpkey/  KeyID: C99E03CC



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org