View Issue Details

IDProjectCategoryView StatusLast Update
0000442LDMud 3.3Networkingpublic2018-01-29 21:57
Reporterfippo Assigned Tolars 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.3.712 
Fixed in Version3.3.716 
Summary0000442: socket closes after reading MAX_TEXT bytes
DescriptionWhen reading large chunks of data from a socket, the driver prematurely closes the socket.

ip->text_end remains at MAX_TEXT, which triggers a zero-byte read in the next cycle, closing the socket.

In the attached example 'reader.c', feed is called first with a newline \n only (most likely the result of a 'faking NL' ~ line 3230 of comm.c), then with the data, finally with an empty string. After that, the driver tries to read zero bytes, which closes the socket.

Workaround: increase MAX_TEXT

(hint: decrease MAX_TEXT for debugging :-)
TagsNo tags attached.
Attached Files
reader.c (273 bytes)
test.py (544 bytes)

Activities

fippo

2006-01-09 12:27

reporter   ~0000473

test.py reproduces the bug (with MAX_TEXT set to 128).
Only the string of ones is received on LPC level

lars

2007-10-07 16:42

reporter   ~0000561

While the problem is indeed caused with the faking of a NL when reading a full buffers worth of data
in charmode with combine-charset(!), I couldn't quite determine what exactly is going wrong.

The cheap solution is simply to not read MAX_TEXT worth of data in charmode, avoiding the situation
altogether.

Issue History

Date Modified Username Field Change
2006-01-09 12:12 fippo New Issue
2006-01-09 12:12 fippo File Added: reader.c
2006-01-09 12:26 fippo File Added: test.py
2006-01-09 12:27 fippo Note Added: 0000473
2007-10-07 16:42 lars Status new => resolved
2007-10-07 16:42 lars Fixed in Version => 3.3.716
2007-10-07 16:42 lars Resolution open => fixed
2007-10-07 16:42 lars Assigned To => lars
2007-10-07 16:42 lars Note Added: 0000561
2010-11-16 09:42 lars Source_changeset_attached => ldmud.git master 3ba704b3
2018-01-29 18:59 lars Source_changeset_attached => ldmud.git master 3ba704b3
2018-01-29 21:57 lars Source_changeset_attached => ldmud.git master 3ba704b3