View Issue Details

IDProjectCategoryView StatusLast Update
0002874GNUnetpublic2013-12-24 20:55
ReporterFlorian Dold Assigned ToSree Harsha Totakura  
PriorityhighSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.10.0Fixed in Version0.10.0 
Summary0002874: Assertion failed at stream_api.c:1345.
DescriptionA stream socket connected to another stream socket on the same host sometimes fails with this assertion in a scheduled task.

This bug seems to be non-deterministic and somewhat timing-sensitive, as with -LDEBUG the problem does not occur as often.

I can't infer from the source code what the cause of this assertion is, I think this should be commented.
Additional Information#0 0x00007ffff75d6037 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff75d9698 in __GI_abort () at abort.c:90
#2 0x00007ffff7b89af9 in GNUNET_abort () at common_logging.c:293
#3 0x00007ffff7969ba6 in set_state_established (cls=<optimized out>, socket=0x76b060)
    at stream_api.c:1344
#4 0x00007ffff7969402 in send_message_notify (cls=0x76b060, size=<optimized out>, buf=<optimized out>)
    at stream_api.c:634
#5 0x00007ffff66ce5c1 in send_callback (cls=0x76b290, size=236, buf=<optimized out>) at mesh_api.c:1564
#6 0x00007ffff7b85e6c in client_notify (cls=0x76b660, size=236, buf=0x76c570) at client.c:1054
#7 0x00007ffff7b8edae in process_notify (connection=0x76b420) at connection.c:1183
#8 transmit_ready (cls=0x76b420, tc=<optimized out>) at connection.c:1314
#9 0x00007ffff7bb6b79 in run_ready (ws=0x60a3d0, rs=0x60a340) at scheduler.c:597
#10 GNUNET_SCHEDULER_run (task=task@entry=0x7ffff7bbe900 <service_task>,
    task_cls=task_cls@entry=0x7fffffffddb0) at scheduler.c:786
TagsNo tags attached.

Relationships

parent of 0002877 closedSree Harsha Totakura stream doesn't distinguish between the application ports 

Activities

Florian Dold

2013-04-27 16:17

developer   ~0007065

Last edited: 2013-04-27 16:27

Isolated the bug, execute gnunet-set-bug to see it happen.

Not that you may have to execute it multiple times, as it does not always occur.

Sree Harsha Totakura

2013-04-28 06:46

updater   ~0007068

I cannot execute gnunet-set-bug. Stream depends on lockmanager and since the test case doesn't use testing library to start, it is getting blocked when stream tries to access lockmanager server which is not started.

How did you execute it?

After a default timeout I get this segfault:
 0x00007f7f3a77dbc6 in GNUNET_STREAM_read (socket=0x0, timeout=..., proc=0x4008ec <stream_data_processor>, proc_cls=0x0) at stream_api.c:3677
#1 0x0000000000400937 in listen_cb (cls=0x0, socket=0x0, initiator=0x0) at gnunet-set-bug.c:55
#2 0x00007f7f3a77b4d6 in lockmanager_acquire_timeout (cls=0x1f08670, tc=0x7fff1bafebf0) at stream_api.c:3038
#3 0x00007f7f3a9ce3a1 in run_ready (rs=0x1ef6460, ws=0x1ef64f0) at scheduler.c:597
#4 0x00007f7f3a9cebf0 in GNUNET_SCHEDULER_run (task=0x7f7f3a9c9464 <program_main>, task_cls=0x7fff1bafee90) at scheduler.c:786
#5 0x00007f7f3a9c9e9b in GNUNET_PROGRAM_run2 (argc=1, argv=0x7fff1baff068, binaryName=0x400b05 "gnunet-set", binaryHelp=0x400b00 "help", options=0x400b20,
    task=0x40094c <run>, task_cls=0x0, run_without_scheduler=0) at program.c:273
#6 0x0000000000400a1a in main (argc=1, argv=0x7fff1baff068) at gnunet-set-bug.c:103

Sree Harsha Totakura

2013-04-28 06:49

updater   ~0007069

Ok, lockmanger dependency seems to be solved if I start my local peer...

Florian Dold

2013-04-29 14:44

developer   ~0007071

I don't know if this helps, but I get the following warning, but only the first time the stream assertion fails:

fs-12542 WARNING External protocol violation detected at stream_api.c:2973.

Christian Grothoff

2013-04-30 14:08

manager   ~0007072

I can also still reproduce this.

Sree Harsha Totakura

2013-04-30 16:10

updater   ~0007073

Cause of this bug stems from 0002877 as we start the local peer which starts FS to start a stream server. Then, gnunet-bug-set again opens a stream server and its client is confused by 2 servers responding to it.

The client should nevertheless be made robust to deal with such mishaps/exploits.

Sree Harsha Totakura

2013-05-02 10:26

updater   ~0007075

fixed in SVN 27014

Issue History

Date Modified Username Field Change
2013-04-27 15:49 Florian Dold New Issue
2013-04-27 15:49 Florian Dold Status new => assigned
2013-04-27 15:49 Florian Dold Assigned To => Sree Harsha Totakura
2013-04-27 16:17 Florian Dold Note Added: 0007065
2013-04-27 16:27 Florian Dold Note Edited: 0007065
2013-04-28 06:46 Sree Harsha Totakura Note Added: 0007068
2013-04-28 06:49 Sree Harsha Totakura Note Added: 0007069
2013-04-29 14:44 Florian Dold Note Added: 0007071
2013-04-30 14:08 Christian Grothoff Note Added: 0007072
2013-04-30 16:06 Sree Harsha Totakura Relationship added parent of 0002877
2013-04-30 16:10 Sree Harsha Totakura Note Added: 0007073
2013-05-02 10:26 Sree Harsha Totakura Note Added: 0007075
2013-05-02 10:26 Sree Harsha Totakura Status assigned => resolved
2013-05-02 10:26 Sree Harsha Totakura Fixed in Version => 0.10.0
2013-05-02 10:26 Sree Harsha Totakura Resolution open => fixed
2013-05-13 08:49 Christian Grothoff Target Version => 0.10.0
2013-12-24 20:55 Christian Grothoff Status resolved => closed
2014-12-15 19:13 Christian Grothoff Category stream library => (No Category)